android自动化测试,使用robotium与webview,在jsp中用iframe标签,获取到iframe里src的另一个jsp的信息。
发布网友
发布时间:2022-05-31 17:21
我来回答
共1个回答
热心网友
时间:2023-10-20 19:33
有可能获取不到,robotium没有提供iframe焦点转移的功能,有可能只能获取到父HTML内的节点信息。你可以参考robotium的API文档:http://www.zsshc.net/
static By className(String className)
Select a WebElement by its class name.
static By cssSelector(String selectors)
Select a WebElement by its css selector.
String getValue()
Returns the value.
static By id(String id)
Select a WebElement by its id.
static By name(String name)
Select a WebElement by its name.
static By tagName(String tagName)
Select a WebElement by its tag name.
static By textContent(String textContent)
Select a WebElement by its text content.
static By xpath(String xpath)
Select a WebElement by its xpath.
你可以试试用By的Xpath方式是否能够定位的到。追问这个好像找不到怎么操作的,你这里能举一个例子吗?