【发布时间】:2020-11-04 22:00:21
【问题描述】:
很遗憾,我不明白为什么 scroll 和 scrollTo 操作不起作用。
这很奇怪,因为swipe 操作对相同的元素工作正常。
当然,ScrollView 元素存在并且可见。
排毒版: 16.9.2
行动:
await element(by.id('some')).scrollTo('bottom');
元素:
<ScrollView testID="some">
错误信息:
Cannot find UI element.
Exception with Action: {
"Action Name": "Scroll To Bottom content edge",
...
Error Trace: [
{
"Description": "Interaction cannot continue because the desired element was not found.",
"Error Domain": "com.google.earlgrey.ElementInteractionErrorDomain",
"Error Code": "0",
"File Name": "GREYElementInteraction.m",
"Function Name": "-[GREYElementInteraction matchedElementsWithTimeout:error:]",
"Line": "124"
}
]
【问题讨论】:
标签: react-native e2e-testing detox