Testing Browser Pop-up: Basic Auth with Capybara

The Problem:

In our company most of the server is port blocked, thus only inside developer, tester, project manager and product owner and client (spefici) can access the system. And besides we block normal or anonmous users registration and blocks google crawling.

Screen Shot 2015-10-25 at 8.56.43 PM

A Solution:

As we run test automation and we were preparing simple setup and configuration. And we could have hold javascript and give the input with valid information to pass on. So, we needed faster solution and we don’t want to see the popup – just pass us and get into project login system and execute rest of the services.

#pop_up_auth.rb under steps_definitions


When /^Given Enable port access$/ do
visit "<a href="http://google.com/users/sign_in?lan=en">http://moteel:mxxxxx3@myproject.com/users/sign_in?lan=en</a>"
end

#In feature block, I mentioned simply,


Given Enable port access

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s