我正试图在Python
中编写我的自定义Robot Framework
库。
我正在扩展AppiumLibrary
,并试图编写一个函数,从活动中单击id为countryGermany
的元素。
目前我得到一个错误:Element 'countryGermany' did not appear in 5 seconds
。我也尝试了id=countryGermany
选择器,同样的错误。你知道吗
我的代码如下所示:
from PageObject import PageObject
class Foo(PageObject):
def choose_country(self):
self.open_application('http://localhost:4723/wd/hub', platformName='Android', deviceName='CB512A784E', appPackage='com.example.MyApplication', appActivity='.MainActivity')
self.wait_until_page_contains_element('bar')
return self.tap('bar')
如何单击该元素?你知道吗
这5秒是非常短的超时,因为应用程序刚刚启动。你知道吗
相关问题 更多 >
编程相关推荐