【发布时间】:2020-04-09 23:44:27
【问题描述】:
我正在尝试对我的应用程序的 WEBVIEW 部分进行自动测试。 我可以切换到 WEBVIEW 上下文,但找不到 UI 元素。
self.driver.find_element_by_accessibility_id('StartTrainingButton').click()
time.sleep(5)
self.driver.switch_to.context('WEBVIEW')
time.sleep(10)
a = self.driver.find_element_by_id('first_name').value_of_css_property(".form-control")
print(a)
time.sleep(5)
self.driver.find_element(id, "wp-submit").click()
这里是文本框first_name的数据:
input class="form-control" type="text" name="first_name" id="first_name" value="" placeholder="Vorname" required=""
【问题讨论】:
-
你用的是模拟器还是真机?
-
我现在使用的是真机。
-
没人知道吗?
标签: python android mobile automated-tests appium