I am trying to use selenium with sikuli.So sikuli would not run on a 64 bit using the current java set up so in my project changed the runtime to point to a 32 bit runtime environment and added my selenium jars using the 32 bit iewebdriver now I have a problem with the above Looked every where on the net added the guava.jar file v.21 it did not solve the problem changed that to the guava 26jre.jar and still nothing is working here is my code and errors if anyone can spot where I am going wrong
error
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V
at org.openqa.selenium.remote.service.DriverService$Builder.usingPort(DriverService.java:285)
at org.openqa.selenium.ie.InternetExplorerDriver.setupService(InternetExplorerDriver.java:242)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:211)
at org.openqa.selenium.ie.InternetExplorerDriver.<init>(InternetExplorerDriver.java:150)
at riOSikuliAutomation.RiOSikuliAutomation.main(RiOSikuliAutomation.java:33)
and here is my code
DesiredCapabilities cap = DesiredCapabilities.internetExplorer();
cap.setCapability("nativeEvents", false);
cap.setCapability("unexpectedAlertBehaviour", "accept");
cap.setCapability("ignoreProtectedModeSettings", true);
cap.setCapability("disable-popup-blocking", true);
cap.setCapability("enablePersistentHover", true);
cap.setCapability("ignoreZoomSetting", true);
cap.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
InternetExplorerOptions options = new InternetExplorerOptions();
options.merge(cap);
System.setProperty("webdriver.ie.driver", "C:\\Users\\Selenium\\IEDriverServer.exe");
WebDriver driver = new InternetExplorerDriver(options);
as soon as it reads the last line the error pops up, anything I am not doing right please advise ?
This error message...
java.lang.NoSuchMethodError: com.google.common.base.Preconditions.checkArgument(ZLjava/lang/String;I)V
...implies that the IEDriverServer was unable to initiate/spawn a new WebBrowsing Session i.e. InternetExplorer Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Solution to your question would be either/all of the following steps:
Upgrade Guava to current levels of 26.0-jre (as per Selenium v3.14.0 Java clients).
Maven Dependency is as follows:
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>26.0-jre</version>
</dependency>
Ensure you don't have several versions in your dependency tree.
To look for the existing guava versions through Maven use the command:
mvn dependency:tree | less
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
MAVEN_HOME
directory .m2
and download the binaries afresh.