Quality is delighting customers
I am getting below error while running multiple test cases in Appium.
Time elapsed: 0.227 s < FAILURE!
org.openqa.selenium.NoSuchSessionException:
A session is either terminated or not started (WARNING: The server did not provide any stacktrace information)
testng.xml file
<test name = "Smoke Test Case">
<classes>
<class name = "pack.testcase1"/>
<class name = "pack.testcase2"/>
</classes>
</test>
Base file:
DesiredCapabilities dc = new DesiredCapabilities();
dc.setCapability("no",true);
dc.setCapability("newCommandTimeout", 100000);
dc.setCapability("noReset", true);
dc.setCapability(MobileCapabilityType.DEVICE_NAME, "Sony");
dc.setCapability(MobileCapabilityType.APP, filepath.getAbsolutePath());
dc.setCapability("noRest", true);
driver = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),dc);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Result:
pack.testcase1> Opened the app immediately closed (not executed entire test case) throwing above error
pack.testcase2 > executed the test case
Can you guys help me on this issue.
Tags:
© 2021 Created by Quality Testing.
Powered by