1

I want to test my native android app parallelly using Selenium grid .Is there any option to do the same in Selenium grid or in selendroid.

I tried steps mentioned in selendroid.io/scale.html and i encounter below mentioned error. Error

D:\mobile-test\selendroid grid>java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.17.0.jar:selenium-server-standalone-2.45.0.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444 Error: Could not find or load main class org.openqa.grid.selenium.GridLauncher

  • Yes you can test all **native**,**web**,**hybrid** apps with selendroid grid. Have a look at :[Selendroid Scalling](http://selendroid.io/scale.html). – MKay Nov 26 '15 at 04:29
  • BTW if you have already gone through procedure, are you facing any issue? – MKay Nov 26 '15 at 04:31
  • Yes i got an error:Error: Could not find or load main class org.openqa.grid.selenium.GridLauncher –  Nov 26 '15 at 04:36
  • D:\mobile-test\selendroid grid>java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.17.0.jar;selenium-server-standalone-2.45.0.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444 Error: Could not find or load main class org.openqa.grid.selenium.GridLauncher –  Nov 26 '15 at 04:38
  • You mean we can test native app in parallel or simultaneously using Selenium grid –  Nov 26 '15 at 04:39
  • You can add your mobile device having any type of android app to already established grid. Grid is not launching has nothing to do with type of app you are testing. – MKay Nov 26 '15 at 04:45
  • Have you launched your selenium-standalone server first? before starting the grid plugin? – MKay Nov 26 '15 at 04:46
  • Yes . I have done that . –  Nov 26 '15 at 04:48
  • java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.17.0.jar:selenium-server-standalone-2.48.2.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444 –  Nov 26 '15 at 04:49
  • I have used above mentioned comment –  Nov 26 '15 at 04:49
  • @mk08 I have tried with different versions of selendroid-grid-plugin and selenium-server-standalone but showing same error . –  Nov 26 '15 at 05:01
  • Let me try on my side. I used Appium to deal with android / iOS apps for automation testing. Hence I am sure you can connect mobile to grid. – MKay Nov 26 '15 at 05:36
  • Are you on windows? watch out for `:` in class path command. Windows use `;` to separate out multiple jars in classpath. – MKay Nov 26 '15 at 05:44
  • Yeah I could launch the selendroid grid with `D:\>java -Dfile.encoding=UTF-8 -cp "selendroid-grid-plugin-0.17.0.jar;selenium-s erver-standalone-2.46.0.jar" org.openqa.grid.selenium.GridLauncher -capabilityMatcher io.selendroid.grid.SelendroidCapabilityMatcher -role hub -host 127.0.0.1 -port 4444` – MKay Nov 26 '15 at 05:51
  • @mk08 thanks a lot it worked for me . –  Nov 26 '15 at 06:46
  • Great! Were you missing semi-Colan? – MKay Nov 26 '15 at 07:19
  • Yes was trying with : instead of semicolon –  Nov 26 '15 at 07:21
  • @mk08 Can you please write your mentioned solution as answer.So that it may help others too. –  Nov 27 '15 at 05:45
  • You may want to change the question statement, as the answer you got after lot of discussion in comments. – MKay Nov 27 '15 at 05:55
  • :) Solution I gave, is not following the question you asked. You can change the question something like `Could not find load main class GridLauncher for selendroid grid`. – MKay Nov 27 '15 at 06:10

1 Answers1

2

Issue is with Jar file separator. If you are working on Mac/Unix use path separator as colon :. If you are working on Windows then use path separator as semicolon ;.

The exact usage is given on Selendroid Scaling. But it is very easy to miss out. You will not get any direct error for using wrong path separator but will end up getting ClassNotFoundError or similar.

MKay
  • 818
  • 9
  • 32