INGenious icon indicating copy to clipboard operation
INGenious copied to clipboard

deviceName is a mandatory property in browser configuration

Open olaf-a opened this issue 8 months ago • 0 comments

If you create a browser configuration (for iOS for instance), and leave out the capability 'deviceName' the runtime fails with an error..

025-04-22 15:32:38:04S +0200 [SEVERE] com.ing.engine.execution.run.TestCaseRunner onError:java.lang.NullPointerException: Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "com.ing.engine.drivers.WebDriverCreation.getCurrentBrowser()" is null
java.lang.NullPointerException: Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "com.ing.engine.drivers.WebDriverCreation.getCurrentBrowser()" is null
	at com.ing.engine.core.CommandControl.canIFindElement(CommandControl.java:159)
	at com.ing.engine.core.CommandControl.sync(CommandControl.java:141)
	at com.ing.engine.core.CommandControl.sync(CommandControl.java:242)
	at com.ing.engine.execution.run.TestStepRunner.executeStep(TestStepRunner.java:146)
	at com.ing.engine.execution.run.TestStepRunner.executeStep(TestStepRunner.java:133)
	at com.ing.engine.execution.run.TestStepRunner.run(TestStepRunner.java:52)
	at com.ing.engine.execution.run.TestCaseRunner.runStep(TestCaseRunner.java:394)
	at com.ing.engine.execution.run.TestCaseRunner.run(TestCaseRunner.java:343)
	at com.ing.engine.core.Task.runIteration(Task.java:146)
	at com.ing.engine.core.Task.run(Task.java:74)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)

This is because getCurrentBrowser calls getEmulatorCapabilityValue with capability "deviceName" and this returns null. It should be noted somewhere that this is a mandatory capability or the code should be more resilient.

olaf-a avatar Apr 22 '25 13:04 olaf-a