Handle Security warining

142 views
Skip to first unread message

Litha K

unread,
Nov 18, 2010, 4:13:45 PM11/18/10
to Watir General
Hi all,

I may be repeating this question regarding pop-ups, but all my
searches were in vain, hence apologies.

I am using watir-webdriver on a linux box and in one of my make
payment flows I am getting a security warning with 'Cancel' and
'Continue' options. How do I click Continue in this instance.

On windows box I can use autoit for sendKeys("ENTER"), so please
advice?

Many thanks,
Kay

Dave McNulla

unread,
Nov 19, 2010, 3:31:17 AM11/19/10
to Watir General

Jari Bakken

unread,
Nov 19, 2010, 3:50:53 AM11/19/10
to watir-...@googlegroups.com
On Thu, Nov 18, 2010 at 10:13 PM, Litha K <lith...@googlemail.com> wrote:
> I am using watir-webdriver on a linux box and in one of my make
> payment flows I am getting a security warning with 'Cancel' and
> 'Continue' options. How do I click Continue in this instance.

Could you provide some more details about what this security warning
looks like? A screenshot or the text of the warning would be helpful.

Litha K

unread,
Nov 19, 2010, 5:05:22 AM11/19/10
to Watir General

Hi Jari,

Sorry couldn't find the option to upload an image. Please find the
text:

Security warning:

Although this page is encrypted, the information you have entered is
to be sent over an uncrypted connection and could be easily be read by
a third party. Are you sure you want to continue sending this
information?

Cancel Continue.



FYI, I have also tried to suppress the warning in firefox options. Any
help would be much appreciated.



Thanks,
Kay





On Nov 19, 8:50 am, Jari Bakken <jari.bak...@gmail.com> wrote:

Jari Bakken

unread,
Nov 19, 2010, 5:54:47 AM11/19/10
to watir-...@googlegroups.com
On Fri, Nov 19, 2010 at 11:05 AM, Litha K <lith...@googlemail.com> wrote:
>
> Security warning:
>
> Although this page is encrypted, the information you have entered is
> to be sent over an uncrypted connection and could be easily be read by
> a third party. Are you sure you want to continue sending this
> information?
>
> Cancel   Continue.
>

OK. The proper solution is obviously to fix the app under test to not
use HTTP from an HTTPS page.

Failing that, here's how you can tweak Firefox preferences:

1. Find the preference you want to change in about:config
2. Create a new Firefox profile and set the preference:

tweaked_profile = Selenium::WebDriver::Firefox::Profile.new
tweaked_profile["some.preference"] = false

3. Create a new driver, passing in the profile

driver = Selenium::WebDriver.for :firefox, :profile => fixed_profile

4. Wrap the driver in a Watir::Browser instance

browser = Watir::Browser.new(driver)

It looks like WebDriver sets some relevant preferences to the correct
value though, see:

http://code.google.com/p/selenium/source/browse/trunk/rb/lib/selenium/webdriver/firefox/profile.rb#317

Reply all
Reply to author
Forward
0 new messages