求助:flutter 框架自動化測試時,無法輸入內容
self.driver.find_element_by_xpath("//android.widget.EditText[@text='請輸入工號']").click()
self.driver.find_element_by_xpath("//android.widget.EditText[@text='請輸入工號']").send_keys("15112319")
點選事件可以操作成功,但是輸入事件報錯,報錯如下:
[HTTP] --> POST /wd/hub/session/b444d990-4abe-42f7-972a-6e1f39c0eeff/element/e132143d-d48d-4dc4-9135-bbd4ebc7e2a2/value
[HTTP] {"text":"15112319","value":["1","5","1","1","2","3","1","9"],"id":"e132143d-d48d-4dc4-9135-bbd4ebc7e2a2"}
[W3C (b444d990)] Calling AppiumDriver.setValue() with args: [["1","5","1","1","2","3","1","9"],"e132143d-d48d-4dc4-9135-bbd4ebc7e2a2","b444d990-4abe-42f7-972a-6e1f39c0eeff"]
[WD Proxy] Matched '/element/e132143d-d48d-4dc4-9135-bbd4ebc7e2a2/value' to command name 'setValue'
[Protocol Converter] Added 'value' property ["1","5","1","1","2","3","1","9"] to 'setValue' request body
[WD Proxy] Proxying [POST /element/e132143d-d48d-4dc4-9135-bbd4ebc7e2a2/value] to [POST http://127.0.0.1:8200/wd/hub/session/37c0ad39-0fb1-4ae3-b6a0-54d332108d9a/element/e132143d-d48d-4dc4-9135-bbd4ebc7e2a2/value] with body: {"elementId":"e132143d-d48d-4dc4-9135-bbd4ebc7e2a2","text":"15112319","replace":false,"value":["1","5","1","1","2","3","1","9"]}
[WD Proxy] Got response with status 400: {"sessionId":"37c0ad39-0fb1-4ae3-b6a0-54d332108d9a","value":{"error":"invalid element state","message":"Cannot set the element to '15112319'. Did you interact with the correct element?","stacktrace":"io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '15112319'. Did you interact with the correct element?\n\tat io.appium.uiautomator2.handler.SendKeysToElement.setText(SendKeysToElement.java:88)\n\tat io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:119)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:41)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:253)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:247)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.net...
[W3C] Matched W3C error code 'invalid element state' to InvalidElementStateError
[W3C (b444d990)] Encountered internal error running command: io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Cannot set the element to '15112319'. Did you interact with the correct element?
[W3C (b444d990)] at io.appium.uiautomator2.handler.SendKeysToElement.setText(SendKeysToElement.java:88)
[W3C (b444d990)] at io.appium.uiautomator2.handler.SendKeysToElement.safeHandle(SendKeysToElement.java:119)
[W3C (b444d990)] at io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:41)
[W3C (b444d990)] at io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:253)
[W3C (b444d990)] at io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:247)
[W3C (b444d990)] at io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C (b444d990)] at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C (b444d990)] at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
[W3C (b444d990)] at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
[W3C (b444d990)] at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
[W3C (b444d990)] at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C (b444d990)] at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:266)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:345)
[W3C (b444d990)] at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)
[W3C (b444d990)] at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)
[W3C (b444d990)] at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
[W3C (b444d990)] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:131)
[W3C (b444d990)] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:611)
[W3C (b444d990)] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:552)
[W3C (b444d990)] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:466)
[W3C (b444d990)] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438)
[W3C (b444d990)] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:140)
[W3C (b444d990)] at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144)
[W3C (b444d990)] at java.lang.Thread.run(Thread.java:929)
[W3C (b444d990)]
相關文章
- 自動化測試框架框架
- 自動化測試框架Selenium入門框架
- 軟體測試框架——自動化測試框架框架
- 自動化管理框架下的內容框架
- 自動化測試框架思路框架
- 自動化測試框架指南框架
- 【自動化測試入門】自動化測試思維
- 自己動手寫Web自動化測試框架(6):自動化測試框架的規劃Web框架
- 實現動態自動匹配輸入的內容
- 測試開發之自動化篇-自動化測試框架設計框架
- 求助帖:JMeter 介面自動化測試——資料驅動JMeter
- 自動化測試框架比較框架
- 自動化測試框架介紹框架
- Selenium自動化測試框架框架
- 軟體測試自動化框架框架
- 介面自動化測試框架 HttpFPT框架HTTP
- 利用tox打造自動自動化測試框架框架
- T框架介紹(自動化測試框架)框架
- 《軟體自動化測試成功之道》內容簡介和前言
- UI自動化測試框架Cypress初探UI框架
- Python 自動化測試框架unittestPython框架
- 自動化測試QTP知識框架QT框架
- 自動化測試框架:擁抱Ruby框架
- 自動化測試框架的AW模式框架模式
- Flutter應用進行自動化測試Flutter
- vue.js輸入框輸入值內容實時跟著變化Vue.js
- 自動化測試系列 —— UI自動化測試UI
- Python自動化測試框架有哪些?Python入門!Python框架
- 軟體自動化測試有什麼優勢?自動化測試框架有哪些?框架
- Flutter 滾動元件內容更新時自動定位到底端的方法Flutter元件
- 自己動手寫Web自動化測試框架Web框架
- Robot Framework自動化測試框架核心指南-如何做好自動化測試平臺框架的設計Framework框架
- 淺談自動化測試框架開發框架
- 介面自動化測試框架搭建總結框架
- HamronyOS 自動化測試框架使用指南框架
- Python自動化測試框架介紹Python框架
- 常用網路介面自動化測試框架框架
- 四種常用的自動化測試框架框架