wttech/bobcat

cross browser - android on bobcat 1.2.1 throws stacktrace when trying run on browserstack

Closed this issue · 4 comments

Hi Bobcat Team,

I have added iphone mobile device for regression test on BrowserStack and all works fine,

I am experiencing issue with Android, though i am passing correct command for running it .

I am on bobcat version 1.2.1

I have the below command works for iphone

mvn clean test "-Dcucumber.options=--tags @demo" -Dwebdriver.type=appium -Dwebdriver.appium.url=http://YYYYY: XXXXXXXXXXXXXXX @hub-cloud.browserstack.com/wd/hub -Dwebdriver.cap.browserName=iPad "-Dwebdriver.cap.device=iPad 5th" -Dwebdriver.cap.platformName=iOS -Dwebdriver.cap.realMobile=true -Dwebdriver.maximize=false "-Dwebdriver.cap.os_version=11.0" -Dwebdriver.cap.browserstack.debug=true -Dwebdriver.cap.browserstack.local=true -Dwebdriver.cap.browserstack.debug=true -Dwebdriver.cap.autoAcceptAlerts=true -Dbrowserstack.console=errors

but not for Android

mvn clean test "-Dcucumber.options=--tags @demo" -Dwebdriver.type=appium -Dwebdriver.appium.url=http://YYYYY: XXXXXXXXXXXXXXX @hub-cloud.browserstack.com/wd/hub -Dwebdriver.cap.browserName=android "-Dwebdriver.cap.device=Samsung Galaxy S7" -Dwebdriver.cap.realMobile=true -Dwebdriver.maximize=false "-Dwebdriver.cap.os_version=6.0" -Dwebdriver.cap.browserstack.debug=true -Dwebdriver.cap.browserstack.local=true -Dwebdriver.cap.browserstack.debug=true -Dwebdriver.cap.autoAcceptAlerts=true -Dbrowserstack.console=errors

and the error is coming from bobcat ! please if you could shad some light...

25-Apr-2018 10:19:36	1) Error in custom provider, java.lang.NullPointerException
build	25-Apr-2018 10:19:36	  while locating com.cognifide.qa.bb.provider.selenium.webdriver.WebDriverProvider
build	25-Apr-2018 10:19:36	  while locating org.openqa.selenium.WebDriver
build	25-Apr-2018 10:19:36	    for field at com.rx.automation.hooks.WindowMaximize.webDriver(WindowMaximize.java:13)
build	25-Apr-2018 10:19:36	  while locating com.rx.automation.hooks.WindowMaximize
build	25-Apr-2018 10:19:36	Caused by: java.lang.NullPointerException
build	25-Apr-2018 10:19:36		at com.cognifide.qa.bb.provider.selenium.webdriver.WebDriverType$8.createMobileDriver(WebDriverType.java:113)
build	25-Apr-2018 10:19:36		at com.cognifide.qa.bb.provider.selenium.webdriver.WebDriverType$8.create(WebDriverType.java:101)
build	25-Apr-2018 10:19:36		at com.cognifide.qa.bb.provider.selenium.webdriver.WebDriverProvider.create(WebDriverProvider.java:107)
build	25-Apr-2018 10:19:36		at com.cognifide.qa.bb.provider.selenium.webdriver.WebDriverProvider.get(WebDriverProvider.java:98)
build	25-Apr-2018 10:19:36		at com.cognifide.qa.bb.provider.selenium.webdriver.WebDriverProvider.get(WebDriverProvider.java:48)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.BoundProviderFactory.get(BoundProviderFactory.java:55)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.SingleFieldInjector.inject(SingleFieldInjector.java:53)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.MembersInjectorImpl.injectMembers(MembersInjectorImpl.java:110)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:94)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:254)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974)
build	25-Apr-2018 10:19:36		at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1013)
build	25-Apr-2018 10:19:36		at cucumber.runtime.java.guice.impl.GuiceFactory.getInstance(GuiceFactory.java:45)
build	25-Apr-2018 10:19:36		at cucumber.runtime.java.JavaHookDefinition.execute(JavaHookDefinition.java:60)
build	25-Apr-2018 10:19:36		at cucumber.runtime.Runtime.runHookIfTagsMatch(Runtime.java:223)
build	25-Apr-2018 10:19:36		at cucumber.runtime.Runtime.runHooks(Runtime.java:211)
build	25-Apr-2018 10:19:36		at cucumber.runtime.Runtime.runBeforeHooks(Runtime.java:201)
build	25-Apr-2018 10:19:36		at cucumber.runtime.model.CucumberScenario.run(CucumberScenario.java:40)
build	25-Apr-2018 10:19:36		at cucumber.runtime.junit.ExecutionUnitRunner.run(ExecutionUnitRunner.java:91)
build	25-Apr-2018 10:19:36		at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:63)
build	25-Apr-2018 10:19:36		at cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:18)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
build	25-Apr-2018 10:19:36		at cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:70)
build	25-Apr-2018 10:19:36		at cucumber.api.junit.Cucumber.runChild(Cucumber.java:93)
build	25-Apr-2018 10:19:36		at cucumber.api.junit.Cucumber.runChild(Cucumber.java:37)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
build	25-Apr-2018 10:19:36		at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
build	25-Apr-2018 10:19:36		at cucumber.api.junit.Cucumber.run(Cucumber.java:98)
build	25-Apr-2018 10:19:36		at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
build	25-Apr-2018 10:19:36		at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
build	25-Apr-2018 10:19:36		at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
build	25-Apr-2018 10:19:36		at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
build	25-Apr-2018 10:19:36		at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
build	25-Apr-2018 10:19:36		at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
build	25-Apr-2018 10:19:36	

@mmajchrzak any idea ?

Hi @reedsexpo,

you encountered a small bug, as you should have received some information in the log instead of a NPE :).

You are missing a parameter in your run: -Dwebdriver.cap.platformName=Android.

@mkrzyzanowski you are star ... Thanks .... missed it becouse platformName was not mentioned on the BrowserStack capability configuration guid ... But works now >)

Released in 1.5.0