具有 WD 和 Mocha 测试的 Appium - 元素当前不可交互且可能无法操作(状态:12)

Appium with WD and Mocha testing - Element is not currently interactable and may not be manipulated (status: 12)

问题:

Android 模拟器

测试完美。

iOS 模拟器

有问题的测试是在离子混合应用程序上验证表单验证。在模拟器上进行初始表单交互后,以下测试都失败了,因为它们无法使用 clear() 或 sendKeys() 命令;抛出以下错误。

Error: [element.sendKeys("firstName")] Error response status: 13, UnknownError - An unknown server-side error occurred while processing the command. Selenium error: An unknown server-side error occurred while processing the command. Original error: Error while executing atom: Element is not currently inter-actable and may not be manipulated (status: 12)

在测试之间添加延迟时间没有效果,更改测试顺序会导致第一个通过而其余的失败。将测试放在不同的测试文件中会导致它们全部通过。非常感谢任何建议!!

手动

在模拟器中手动与应用程序交互,表单输入在响应输入验证后全部处于活动状态,我能够第二次提交表单。

环境

我的代码

Test Code

Appium Logs

能够通过使用 Mocha 框架提供的重试方法使其工作,但不确定这是最有效的解决方案。

https://github.com/appium/appium/issues/10256

描述('XYZ SCREEN: xyz.test.js',函数(){

this.retries(30);

it('Should do something',  async function() {
   await test code ...
});

});