=S
When the login fail this “errorMessage” appear on device, so i tried to rule the option (if appear the message login fail, also test fails) in that case the attribute Hidden to"visible or not visible".
You have other option to help me?
Already have try put this code: driver.executeScript(“client:client.setTestStatus(false,‘msg : test fail’)”);
“setUp();
sampleTest();
driver.executeScript(“client:client.setTestStatus(false,‘msg : test fail’)”);
tearDown();”
But gave me this error:
Exception in thread “main” org.openqa.selenium.JavascriptException: javascript error (javascript error. TypeError: client.setTestStatus is not a function in at line number 1) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: ‘3.9.1’, revision: ‘63f7b50’, time: '2018-02-07T22:42:22.379Z’
System info: host: ‘…’, ip: ‘…’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: '1.8.0_161’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {appActivity: “…”…, appPackage: …, autoAcceptAlerts: false, autoDismissAlerts: false, autoWebview: false, desired: {appActivity: ……, appPackage: …, deviceName: …, platformName: Android, platformVersion: 5.0, udid: 77671511090002076}, device.category: TABLET, device.majorVersion: 5.0.x, device.manufacture: …y, device.model: …, device.name: …, device.os: Android, device.screenSize: 1280x800, device.serialNumber: 77671511090002076, device.version: 5.0, deviceName: …, dontGoHomeOnQuit: false, dontStopAppOnReset: false, fullReset: false, instrumentApp: false, javascriptEnabled: true, keystorePath: ~/.android/debug.keystore, noReset: false, platform: ANDROID, platformName: ANDROID, platformVersion: 5.0, projectName: , reportDirectory: reports, reportFormat: xml, reportUrl: C:\Users\User01……, reservationDuration: 240, testName: Untitled, udid: 77671511090002076, useKeystore: false, waitForDeviceTimeout: 120000}
Session ID: 74ffccf8-7bc0-4859-b89d-fd49e93ecc11
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:160)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:129)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:537)
at org.test.Test.main(Test.java:38)