Showing Exception while using Sikuli in Webdriver - sikuli

I have written Sikuli code(in java).showing exception on Pattern(image path).
Just started using selenium webdriver for testing .
[Code screenshots]

Related

org.openqa.selenium.remote.ProtocolHandshake createSession chrome

i am getting error org.openqa.selenium.remote.ProtocolHandshake createSession in selenium webriver when i run my file which will first launch the url and do login . i am using chrome v70 , chrome driver v2.43 and selenium server standalone v 3.13.0. Please can you help me
Remove the selenium server standalone v 3.13.0 from the Library tab of eclipse and importing of Selenium-java v3.13.0 and it will works

Automating mobile browser with Selenium

Can we automate chrome browser on mobile with Selenium.
Without using the Appium.
That is I need to automate browser on mobile without using appium but selenium.. So Is there a way to do same in JAVA..
Download jar for Android driver here:
https://github.com/selendroid/selendroid
Start is up from command line:
$ java -jar selendroid-standalone-0.17.0-with-dependencies.jar
In your test, instantiate the driver like this:
driver = webdriver.Remote(desired_capabilities=DesiredCapabilities.ANDROID)
just instal Appium and use desired capabilities, these here are a setup for emulator with pre-set emulator call "Android", managed in Android Studio, AVD Manager.
public static void main(String[] args) throws MalformedURLException{
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("device","Android");
capabilities.setCapability("app", "Chrome");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability(CapabilityType.VERSION, "4.3");
capabilities.setCapability(CapabilityType.PLATFORM, "WINDOWS");
WebDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
driver.get("http://www.yahoo.com");
}
or if this doesn't work try this bellow:
DesiredCapabilities capabilities=new DesiredCapabilities();//DesiredCapabilities.chrome();
ChromeOptions options=new ChromeOptions();
options.setExperimentalOptions("androidPackage", "com.android.chrome");
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
I'm using latest dependancies of appium server and appium-java-client

Unable to launch google chrome by selenium 3.4.1

I am using selenium version 3.4.0 and chrome version 59.xxx, Chrome driver version 2.30. Every time its shows error like-
Exception in thread "main" java.lang.NoSuchMethodError:
com.google.common.base.Preconditions.checkState(ZLjava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)V
at
org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:111)
at
org.openqa.selenium.chrome.ChromeDriverService.access$000(ChromeDriverService.java:32)
at
org.openqa.selenium.chrome.ChromeDriverService$Builder.findDefaultExecutable(ChromeDriverService.java:137)
at
org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:302)
at
org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:88)
at
org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:124)
at SampleTesting.main(SampleTesting.java:8)
Below is my code-
System.setProperty("webdriver.chrome.driver", "D:\\Newfolder\\Selenium jars\\exe files\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("www.google.com");
Please help to resolve my query
thank you very much.
Check your Guava library version. An upgrade to 21.0 should resolve this issue.
Reference: https://github.com/SeleniumHQ/selenium/issues/3880

while using real Android device I got "Selendroid server on the device didn't came up"

I tried to automated android device Galaxy S4 (v4.2.2).
I started with the "getting started" as appear in the selendroid.io web
I used selendroid-standalone-0.10.0-with-dependencies.jar
tried to automate the app tha the web provide as training : selendroid-test-app0.10.0.ap
java jdk 1.8
ADT was installed
by typing "adb devices " - I see the android device as well
the selendroid-standalone-0.10.0-with-dependencies.jar and the app were placed in teh same folder
6.. I run the command :
java -jar selendroid-standalone-0.10.0-with-dependencies.jar -app selendroid-test-app-0.10.0.apk" -- and 4444 port was opened as needed
Now , when I tried to run the follwing code :
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import io.selendroid.SelendroidCapabilities;
import io.selendroid.SelendroidDriver;
public class login {
public static void main(String[] args) throws Exception {
SelendroidCapabilities capa = new SelendroidCapabilities("io.selendroid.testapp:0.10.0");
WebDriver driver = new SelendroidDriver(capa);
}
}
and I got the following exceptions :
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Selendroid server on the device didn't came up after 20sec:
stop the selendroid server from command prompt (press ctrl+C) and uninstall the apk in your device if the apk is already installed.
Now install the resigned apk (which is already created when you run the selendroid server previously) in your device
Now start the selendroid server from your command promt like "java -jar -aut <.apk>"
Now, run your test. It will run without any error
Even I was getting this error.
Fix :
Don't install the app under test by yourself on the device/emulator.
Let selendroid resign and install the apk by itself.

JavaFx 2.0 + EJB + Netbeans - Runtime Exception

please,
I wrote a test app in JavaFx 2.0 + EJB in the Netbeans IDE and I got a problem running this app outside netbeans.
I have a form using FXML and an action of this form runs a EJB method. I am using the Glassfish Server.
When I run this test app on netbeans it works perfectly, but when I run the app outside of Netbeans like jnlp or in the browser ... the app can't access the EJB methods. I couldn't see the error message in webstart or in the browser. So, I ask:
1) How can I see the error message in a web start or in the browser? (like javaws test-app.jnlp)
2) I guess the error occurs because of classpath issues. (I need gf-client.jar and javaee-api-6.0.jar in the classpath in order the app works). How can I assure these jars are in the classpath?
Sorry by my english.
Thanks,
Cleber.
to see errors from jnlp you need to enable Java Console:
Control Panel - Java Properties - Advanced - Java Console - Enable Console
for jnlp case all external libs should be stated in jnlp file. Usually NetBeans do it for you, but you can debug this case by reviewing Java Console output.