1

Selendroid is unable to click on a UI Element in WebView, but is able to identify the web element.

Following is the stack trace . Please help.

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) 
threesixnine
  • 1,733
  • 7
  • 30
  • 56
Sagar Raj
  • 11
  • 1
  • The native view is working fine . But is seen only in the web view after recent changes on the server . In the earlier builds the same action would work – Sagar Raj Aug 27 '15 at 11:47

1 Answers1

1

If you add 'unsafe-eval' to the Content-security-Policy header of the .html file, you can interact with the element. It is because of the security settings!

  • This response should be a comment since it is not an actual answer to their question – Jeff Feb 05 '16 at 16:18