I'm using Selenium webdriver with Google Chrome. This is the code I was using to set the proxy for chrome:
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--proxy-server=%s' % my_proxy)
This code worked for months. I'm coming back now and it is not working... I've tried older versions of Selenium, Chrome, Chromium, and the webdriver. None of the changes I do seem to work :(
Additionally, running chrome.exe from the command line while passing --proxy-server does not work! Chrome silently ignores the passed proxy...
Does anyone have any idea what is going on here? I've spent days trying to figure out how to get this simple selenium script working... Thanks so much :)
EDIT: I just tried running chrome.exe with the --proxy-server flags on a friend who has the same computer as mine and it worked...
This was one of the chrome extensions I had installed... If chrome.exe --proxy-server=xxx is not working try removing all extensions.
Hopefully no one else has to waste 3 days on this :(
I just got updated to Windows 10 (x64). My old desktop had IE 11 but a lower version, as it was running Windows 7. I now have the following IE version:
Version: 11.648.17134.0
Update Versions: 11.0.115
I downloaded the latest IEDriverServer.exe that Selenium gave me (3.14). When I run it, when I do the get(url) (various urls), afterwards it fails to find elements. I looked and noticed that before the get(), driver.getWindowHandles() had one entry, but after the get() it had zero entries. This is the latest version. I tried setting compatibility mode but that did not do any good (set or not set). The tests will work fine with Chrome but someone else wrote the test and did not verify values were non-null before calling element.sendKeys(str), which IE appears to allow but Chrome throws an exception. And there are so many instances.
So, I need to find the correct IEDriverServer for my Windows 10 IE but I am having trouble doing so. Google did not give me much except it led me to the driver I already downloaded.
Can anyone help?
As a thumb-rule you can always use the released IEDriverServer from the respective released Selenium clients.
As an example,
If you are using Selenium v3.14
Download, extract and use IEDriverServer_Win32_3.14.0.zip or IEDriverServer_x64_3.14.0.zip
Snapshot:
Update
However to work with IE11 you have to take care of a couple of things which are beyond the scope of this discussion and are as follows:
How does the registry entry HKEY_LOCAL_MACHINE\…\FEATURE_BFCACHE for InternetExplorerDriver solves the Internet Explorer 11 issue?
Internet Explorer Protective mode setting and Zoom levels
Selenium InternetExplorerDriver doesn't get focus on the window
How to ignore protected Mode Settings for Internet Explorer using setCapability() through Selenium and Java?
Firefox and chrome is working fine but with IE 11, the sendkeys are extremely slow. How do you fix this issue ?
My Environment:
Running IE 11.103
Operating System Windows 10
I'm using eclipse(Version: Neon Release (4.6.0)) with java 1.8
selenium Webdriver 3.0.0
In my environment:
WIN 10, selenium 3.4, IE64
I set:
Internet Options → Advanced → Security → ☑ Enable 64-bit processes for Enhanced Protected Mode
After a lot of reading online and experimenting
I had to set my path to point to my web-driver
Right Click on my Computer , then select "Advanced system settings", then click "Environment Variables", then select "Path" and click on edit. Now add the path to your IEDriverServer.exe, for example mine was "C:\eclipse\webdriver\IEDriverServer.exe". I would recommend restart your pc
You must run the 32 bit IE WEB driver
http://selenium-release.storage.googleapis.com/index.html
I downloaded 3.0
Now here is the piece of gold part that made the world of a difference to me.
Set your IE to run as administrator. Right click on IE shortcut and select options, under Shortcut tab click on advanced button then check checkbox "run as administrator". Now Restart IE
When you open IE , then go to tools, then Internet options and then security tab. I have unchecked "Enable Protected Mode" on Local intranet and trusted sites. Restart IE
I used the following Desired Capabilities(I found this on the internet)
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability(InternetExplorerDriver.ENABLE_PERSISTENT_HOVERING,false);
dc.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, false);
dc.setCapability(InternetExplorerDriver.UNEXPECTED_ALERT_BEHAVIOR, true);
dc.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
dc.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
dc.setJavascriptEnabled(true);
WebDriver driver = new InternetExplorerDriver(dc);
This worked in my environment please post what has worked for you
Take note: After this I was experimenting with the 64 bit driver.
If I made the (InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true), then it works sort off. In junit the assertion fails but I was able to use send key on the first page.
I fixed it by downloading and using a 32bit one. The thread that helped me resolve
https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/5116
Better Solution:
Take note: I have reset all my IE settings before doing this solution, also in my first answer I was running a much older version of IE driver.
Download the latest IE driver - I have downloaded version 3.4 32 bit (the 64 bit was still slow when I was testing it)
http://selenium-release.storage.googleapis.com/index.html?path=3.4/
You will need to change your IE settings
2.1 Go to Tools -> Internet Options -> Security. Set all zones to the same protected mode, enabled or disabled should not matter. Like this:
http://seleniumquery.github.io/images/ie-driver-protected-mode-disable.png
Now in you code add this:
public static void runInternetExplorer() {
System.setProperty("webdriver.ie.driver", "C:\\eclipse\\webdriver\\IE\\IEDriverServer.exe");
WebDriver webDriver = new InternetExplorerDriver();
new browser (webDriver);
}
When I run this, it run very nicely. I have left my previous answer if this solution isn't working.
I have been working on IE11 with
selenium library: selenium-server-standalone-3.141.59.jar
and have following finding:
On Window 10 64 bit version
IE 11 version 11.431.16299, updated version 11.0.65(KB4103765)
It works fine with IEDriverServer.exe (64 bit version)
no need extra setting on capability. Key in period is acceptable(for 6 characters within 1 sec)
On Window 10 64 bit version
IE 11 version 11.15.16299.0 updated version 11.0.47 KB4040685
It works very slow with IEDriverServer.exe (64 bit version)
To enter a 6 characters string, every character needs 3-4 secs to completed.
To solve the problem, the following coding I tested works fine for me.
InternetExplorerOptions options = new InternetExplorerOptions();
options.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);
On Window 7 Professional 32 bit version
IE 11 version 11.0.9600.18499, updated version 11.0.36(KB3191495)
It works fine with IEDriverServer.exe (32 bit version). Keyin period is acceptable.(6 characters within a sec)
No extra setting is needed
A note for ruby and webdiriver version 3+
The documentation has examples with native_events IE parameter, even it is written in console at the start point.
Actually the right parameter name is nativeEvent.
Set nativeEvent = false,
and webdriver will use fast JS instead off a slow native click simulation.
Release note v2.47.0.1:
Enabled fast failure for cookie manipulation in IE. The refactor of cookie
handling for the IE driver introduces an incompatibility with the 64-bit IE
driver and IE 10 and 11 running on 64-bit Windows. As is the case with
sending keystrokes and creating screenshots, a Windows hook procedure is now
used for getting and settingcookies in IE. That means that in IE 10 and 11
on 64-bit Windows, where the content rendering process is still 32-bit, you
must use the 32-bit IEDriverServer.exe in order to manipulate cookies.
This commit will now cause exceptions to be thrown if you attempt to set
or get cookies using the 64-bit driver against a 32-bit version of IE (or
vice versa), but in particular, this will affect users who mistakenly try
to use the 64-bit executable with IE 10 or 11 in 64-bit Windows.
(https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG)
So you should use 32 bit or the content rendering needs to be changed to 64 bit
IE 11 was running slow on a Windows 8.1 VM, I was running IEDriverServer.exe 3.5.1.0 (x32), I fixed by changing to IEDriverServer.exe 3.5.1.0 (x64). Note: 3.4.0.0 does not fix this issue. nativeEvents: false did not change anything. The driver is in my PATH, not sure what happens if it's not.
I changed to IEDriver 32 bit (from 64 bits) solved this problem for me.
IE 11, Windows 7, Selenium 3.4.
In IE11 Typing data in text fields(send key) is too slow while replaying tests.
Following is systems information.
IEDriver – 64 bit,
OS – windows7 64 bit,
IE10 – 64 bit
Note: I face the same issue and my issue was resolved to re-install IEDriver – 32 bit, it is working fine with 32-bit IE driver.
Posting this solution for developers using Python 3.6 and Selenium 3.14.
In my case the relevant IE settings are locked down by group policy so any solution requiring changes to IE settings is unworkable.
There was only 1 option setting that needed to be changed to fix slow sendkeys in my specific environment (Windows 7 x64, IE 11.0.9600 locked down, Python 3.6, Selenium 3.14.1):
from selenium import webdriver
from selenium.webdriver.ie.options import Options
opts = Options()
opts.require_window_focus = True
driver = webdriver.Ie(options=opts)
I have a project suite of automation tests that uses Protractor and Jasmine. As of a couple months ago, my tests stopped working in FireFox. Everything works perfectly in Chrome, and almost perfectly in IE.. because why would IE work ya know.
There have been multiple posts about this and I've read through all of them, but I haven't been able to determine if there's a workaround/solution to this. It's not entirely a HUGE deal if my tests run in FireFox, but with a web application it's mighty nice to be able to test all instances.
Basically what happens when I run a test in FireFox:
Command prompt acts like everything is about to run properly (FireFox driver starts up.. server remains running etc etc)
Firefox opens for a split second (icon appears on the task bar, browser flashes on the screen and closes)
After a good minute or so protractor gives me the following message:
[firefox #01-0] WebDriverError: Unable to connect to host XXX on port XXX
after 45000 ms.
With a ton of DEBUG lines referring to JSON files and Firefox addons.
Any thoughts or other sources I could check out would be sweet. Many thanks in advance.
Problem is with latest Firefox support from latest selenium-server. Use geckoDriver and it will work.
Follow this URL
We use the selenium webdriver dlls set up to run my automation suite. I encounter this problem when runnning tests in Firefox only. The tests in Firefox run very slow , taking 3-4 minutes to load pages, However, when I run the same test on the same machine using Firefox browser manually I don't encounter this slowness. At times while running automation on Firefox, we also get "Connection was reset" page. Also, the same tests run fine in Chrome and IE.
We use the following environment:
Firefox version 28, 37 (proxy is set to use system settings)
Webdriver (dlls) version 2.45
Windows 7
Earlier we used to run the same set up in Windows XP using Firefox version 14,16, and Webdriver version 2.37, we didn't experience this issue.
We invoke Firefox using the following code :
Proxy proxy = new Proxy();
proxy.Kind = ProxyKind.System;
FirefoxProfile profile = new FirefoxProfile();
profile.SetProxyPreferences(proxy);
RemoteWebDriver dr = new FirefoxDriver(new FirefoxBinary(#"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"), profile, TimeSpan.FromSeconds(120));
dr.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(3));
dr.Manage().Window.Maximize();
dr.Manage().Cookies.DeleteAllCookies();
dr.Navigate().GoToUrl(WebSiteUrl);
remaining tests steps......
Please can someone help me resolve this issue.
Thanks in advance.
This is how I solved the "extremely slow FirefoxDriver" problem:
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService();
service.Host = "::1";
IWebDriver driver = new FirefoxDriver(service);
The above code forces the geckodriver to use the IPv6 protocol, which works many times faster for the interactions with the UI elements.
Probably won't do you any good now, but I had the same problem with Firefox 45 and Webdriver 2.15. Turned the problem was the implicit wait setup. In my case, I had:
driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
This one line was taking 190 seconds (yes, more than 3 minutes!) to execute. Removing it cut the startup time to under 8 seconds!