leochabi / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 1 forks source link

send key code to child windows of firefox #56

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Operating system and version (32/64bit) : xp pro 32 & sp3
.Net Framework version : VBA
Office name and version(32/64bit) : office 2007 32bit
Browser name and version : filrefox 27.0.1
SeleniumWrapper version : 2.5.0

What steps will reproduce the problem with a public website ?
1.
2.
3.

What is the expected output? What do you see instead?

Please provide any additional information below.
When I open an URL with firefox, proxy server asks a loging/password in a child 
windows of firefox. I tried to send an ENTER key to it to validate my 
login/password  recorded in firefox but it doesn't go to the child windows and 
control of VBA program is blocked on the open command. How could I do to send 
an ENTER key when focus is on chld windows of firefox ?

Original issue reported on code.google.com by epimethee78 on 28 Feb 2014 at 8:23

GoogleCodeExporter commented 8 years ago
It looks like basic authentication. If the popup makes the open command 
hanging, it won't be possible to handle the popup by simulating key press using 
Selenium.
However you can send the credentials in the URL to avoid the popup:

Dim driver As New SeleniumWrapper.WebDriver
driver.Start "firefox", "http://user:password@www.example.com"
driver.Open "/"
...

Or you can use a Firefox profile configured with your proxy:
Run "firefox -p" and create the profile "Selenium" for example, launch it and 
configure your proxy.

Then to use it in a script:
Dim driver As New SeleniumWrapper.WebDriver
driver.setProfile "Selenium"
driver.start "firefox", "http://www.example.com"
...

Or if there's no password to provide, you can set the autologin preference:
Dim driver As New SeleniumWrapper.WebDriver
driver.setPreference "signon.autologin.proxy", True
driver.start "firefox", "http://www.example.com"
...

Original comment by florentbr on 28 Feb 2014 at 4:53

GoogleCodeExporter commented 8 years ago
Hello,

I solved problem with AutoAuth module.
Thanks

Original comment by epimethee78 on 1 Apr 2014 at 9:42

GoogleCodeExporter commented 8 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40