Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi
I'm using ruby 2.2.4-p230 and Watir WebDriver on Windows 7

I got noticed that when execute my Ruby script in a Chrome WebSite always the "Remember logins for sites" is disabled even when the default profile is not.
All this do not allow me to complete my script because my script must download and execute a .exe automatically.

I´m suspecting that the ruby interpreter or the ChromeDriver, is executed with a user with less security privileges.

Can someone know something about it, to solve this issue?

What I have tried:

After some hours, surfing on the web

I did with 2 option:
*** ON FIREFOX ***
Option 1
myprofile = Selenium::WebDriver::Firefox::Profile.new
myprofile['dom.disable_open_during_load'] = false
myprofile['browser.download.downloadDir'] = 'C:\\Any_path_differente_download'
myprofile['signon.rememberSignons'] = true

$b = Watir::Browser.new(:firefox, :profile => myprofile)

Option 2
$b = Watir::Browser.new :firefox, :profile => 'mycustomProfile'

**** ON CHROME ****
Option 1
prefs = {
:download => {
:prompt_for_download => false,
:default_directory =>"c:/Any_path_differente_download/"
}
}
switches = %w(--ignore-certificate-errors --disable-popup-blocking --disable-translate --disable-internal-flash)
$b = Watir::Browser.new :chrome, :prefs => prefs, :switches => switches

Option 2
$b = Watir::Browser.new :chrome, :profile => 'default'
Posted
Updated 18-Apr-16 11:52am

1 solution

As workaround , I Just did with QTP-HP, even that the QTP's Script is very basic, as:
Window("Mozila Firefox").Click XXX, YYY
Window("Mozila Firefox").Type string


this works for now, until I can find a solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900