Selenium Webdriver _ issue related to 32bit/64bit server - selenium

I have created scripts on 64 bits server using selenium webdriver(eclipse).
but when i tried to run same script on 32 bits its not working.
Please let me know is their anything I need to do for it to work on both sides with no issues.

Selenium Webdriver will run on both 32 bit and 64 bit versions. Ensure that eclipse package is correctly chosen. For 32 bit windows chose 32 bit version of eclipse and for 64 bit windows chose 64 bit version of eclipse. Make sure that eclipse is configured correctly and then run the test.

Related

Error when running a 32 bit .dll on a 64 bit JVM Inteliij

I am getting the below error when I try to execute the below line of code in my project. I added a 64 bit JDK to my project properties . I am using Intellij as my IDE
System.loadibrary(smsjavaagentapi)
Fatal Error: Exception from System.loadibrary(smsjavaagentapi) java.lang.unsatisfiedLinkError smsjavaagentapi.dll: Can't load IA 32 bit .dll on an AMD 64-bit platform
I think the problem is that I am using a 64 bit JVM and I am trying to run a 32 bit .dll. I don't have an option to install 32 bit JDK on my machine and add it to my project properties nor I can port the .dll to 64 bit . Is there a work around for this?
There is a limitation at the OS level which prevents a 32-bit shared library being loaded by a 64 bit process, so your options are
modify the OS to allow this (not easy)
migrate the DLL to 64-bit by recompiling it.
install a 32-bit JVM (easier)
download a 32-bit JVM and unpack it without install it. (doesn't require any special permission)
You might find you can get a version of IntelliJ which ships with a 32-bit JVM, or install another program which installs a 32-bit JVM and use just the JVM.

How to fix the slow sendkeys on IE 11 with Selenium Webdriver 3.0.0?

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)

Where to find 64 bit version of chromedriver.exe for Selenium WebDriver?

Can anybody tell where I can find 64 bit version of chromedriver.exe? I tried it with 32bit also but it doesn't call main method.
There is no separate 64-bit version of Chromedriver. The version available at https://sites.google.com/a/chromium.org/chromedriver/downloads works on both 32 and 64-bit Windows, against either 32-or 64-bit Chrome.
This was confirmed in the Chromedriver issue tracker:
https://bugs.chromium.org/p/chromedriver/issues/detail?id=1797#c1
Yes, Chromedriver works on 64-bit Windows and against 64-bit Chrome successfully.
I came here while searching for the answer to if it works on 64-bit Chrome following the announcement that from version 58 Chrome will default to 64-bit on Windows provided certain conditions are met:
https://chromereleases.googleblog.com/2017/05/stable-channel-update-for-desktop.html
In order to improve stability, performance, and security, users who are currently on 32-bit version of Chrome, and 64-bit Windows with 4GB or more of memory and auto-update enabled will be automatically migrated to 64-bit Chrome during this update. 32-bit Chrome will still be available via the Chrome download page.
There is no separate chromedriver binary for Windows 64 bit. Chromedriver 32 bit binary works for both 32 as well as 64 bit versions of Windows. As of today, you can find the latest version of chromedriver Windows binary at https://chromedriver.storage.googleapis.com/2.25/chromedriver_win32.zip
In the below mentioned link, ChromeDriver.exe for Windows 32 bit exist.
http://chromedriver.storage.googleapis.com/index.html?path=2.24/
It is working for me in Win7 64 bit.
Windows 8 64bit runs both 32bit and 64bit applications. You want chromedriver 32bit for the 32bit version of chrome you're using.
The current release of chromedriver (v2.16) has been mentioned as running much smoother since it's older versions (there were a lot of issues before). This post mentions this and some of the slight differences between chromedriver and running the normal firefox driver:
http://seleniumsimplified.com/2015/07/recent-course-source-code-changes-for-webdriver-2-46-0/
What you mentioned about "doesn't call main method" is an odd remark. You may want to elaborate.
Sorry, but all the answers here are FALSE. There is x64 chrome driver version.
Please check this author's amazing work: https://github.com/macchrome/winchrome
All binaries are x64 and released as "Official Build".
You will find newest version of the chromedriver here: http://chromedriver.storage.googleapis.com/index.html - there is a 64bit version for linux.

Salesforce IDE starting error

I have installed the standalone IDE for salesforce force.com platform. On trying to start the ide i am getting "JVM terminated. Exit Code=-1" error. Any idea what this error code means ?
This is a common loading error for force.com IDE.
There are different solutions. Try anyone of these:
A) Change the workspace location.
OR
B) (i). Install Eclipse 3.6 for Java Developers (Helios) from the link http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/heliossr2
Click your operating system from the window on your right.
(ii). Using the below link, follow the instructions to install Force.com IDE plugin for Eclipse 3.6 http://wiki.developerforce.com/page/Force.com_IDE_Installation_for_Eclipse_3.6
OR
C) In the default Force.com IDE install directory:
C:\Program Files\salesforce.com\Force.com IDE
Locate the config file:
forceide
And comment out the following at the end of the file (note the leading #):
#-vmargs
#-Dfile.encoding=UTF-8
#-Xms256m
#-Xmx1024m
#-XX:PermSize=128M
#-XX:MaxPermSize=512M
I hope it works now.
Cheers!
This could be because of various reasons. Say, if you do not have enough memory (RAM) as specified in config file(forceide.ini). As said in this link Force.com IDE – JVM terminated , probably reduce MaxPermSize in config file to say 256M and check.
This exact thing happened to me a few days ago.
My setup is:
Windows 7 64 bit
jre7 64 bit
Force.com IDE 64 bit
When I ran the java auto update to update my jre it installed the 32 bit version (a whole other gripe). So I manually downloaded the 64 bit version of the jre installed it over the top of the 32 bit version and the IDE started working again.

Eclipse Galileo 32 bit windows trying to run on 64 bit windows?

While trying to run eclipse it gives the above error. Whats the problem?
Download 32 bit version of new JRE and JDK :P