Open Jacobvu84 opened 5 years ago
Nếu start Appium server bằng Desktop thì kịch bản có thể chạy. Nhưng không type được
[main] ERROR net.thucydides.core.steps.ConsoleLoggingListener - TEST FAILED AT STEP Trader enters 'ngothienphuong@gmail.com' into email field
[main] ERROR net.thucydides.core.steps.ConsoleLoggingListener - io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to 'ngothienphuong@gmail.com'. Did you interact with the correct element?
log4j:WARN No appenders could be found for logger (freemarker.cache).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 41.769 sec <<< FAILURE! - in serenitybdd.appiumtest.features.WhenUserOpenOXiiStory
open_oxii_on_web_view(serenitybdd.appiumtest.features.WhenUserOpenOXiiStory) Time elapsed: 39.705 sec <<< ERROR!
org.openqa.selenium.InvalidElementStateException: io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to 'ngothienphuong@gmail.com'. Did you interact with the correct element?
at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:96)
at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:37)
at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:250)
at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:241)
at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:44)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
at java.lang.Thread.run(Thread.java:764)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'VN_LW80999-D', ip: '10.129.142.151', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {app: C:\Users\Jacob\Downloads\Li..., appActivity: jp.naver.line.android.activ..., appPackage: jp.naver.line.android, automationName: uiautomator2, databaseEnabled: false, desired: {app: C:\Users\Jacob\Downloads\Li..., appActivity: jp.naver.line.android.activ..., appPackage: jp.naver.line.android, automationName: uiautomator2, deviceName: 5200d8a0ee477597, hub: http://localhost:4723/wd/hub, locationServicesEnabled: true, nativeWebScreenshot: true, noReset: false, platformName: android, platformVersion: 8.0.0, recreateChromeDriverSessions: true, session-override: true}, deviceApiLevel: 26, deviceManufacturer: samsung, deviceModel: SM-J600G, deviceName: 5200d8a0ee477597, deviceScreenDensity: 320, deviceScreenSize: 720x1480, deviceUDID: 5200d8a0ee477597, hub: http://localhost:4723/wd/hub, javascriptEnabled: true, locationContextEnabled: false, locationServicesEnabled: true, nativeWebScreenshot: true, networkConnectionEnabled: true, noReset: false, pixelRatio: 2, platform: LINUX, platformName: Android, platformVersion: 8.0.0, recreateChromeDriverSessions: true, session-override: true, statBarHeight: 48, takesScreenshot: true, viewportRect: {height: 1336, left: 0, top: 48, width: 720}, warnings: {}, webStorageEnabled: false}
Session ID: ec2abcc1-753a-4dd0-84af-c1f36c9603f3
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'VN_LW80999-D', ip: '10.129.142.151', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_171'
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
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 io.appium.java_client.DefaultGenericMobileElement.execute(DefaultGenericMobileElement.java:45)
at io.appium.java_client.MobileElement.execute(MobileElement.java:1)
at io.appium.java_client.android.AndroidElement.execute(AndroidElement.java:1)
at com.linecorp.tasks.Login.performAs(Login.java:40)
at serenitybdd.appiumtest.features.WhenUserOpenOXiiStory.open_oxii_on_web_view(WhenUserOpenOXiiStory.java:36)
public static final Target EMAIL_FIELD =
Target.the("email field").located(MobileBy.AndroidUIAutomator("new UiSelector().resourceId(\"jp.naver.line.android:id/text\").text(\"Email address\")"));
Thay vì dùng
public static final Target PASSWORD_FIELD =
Target.the("password field").located(MobileBy.id("jp.naver.line.android:id/registration_edittext_email"));
Appium 1.10.0 Java 1.8 java-client : 6.1.0 Android version of device: 8.0.0 Windows 10 adb shell getprop ro.build.version.sdk : 26