Selendroid无法在WebView中单击UI元素,但能够识别Web元素。
org.openqa.selenium.WebDriverException: CATCH_ALL:
java.lang.NumberFormatException: Invalid int: "{"message":"Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: \"default-src 'self'\".\n"}"
at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:410)
答案 0 :(得分:1)
如果将“unsafe-eval”添加到.html文件的Content-security-Policy标头中,则可以与该元素进行交互。 这是因为安全设置!