Hello everyone,
I try to execute a simple modification of value thanks to JavascriptExecutor, but I do not understand why the script returns a NullPointerException
can you help me, please
Hello everyone,
I try to execute a simple modification of value thanks to JavascriptExecutor, but I do not understand why the script returns a NullPointerException
can you help me, please
...
String js = "document.querySelector('#history div:nth-child(4) > div > input').value = '0.47';)"
WebUI.executeJavaScript(js, null)
thanks for your quick reply, but i get
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘document.querySelector(’#history div:nth-child(4) > div > input’).value = ‘0.47’;’ with class ‘java.lang.String’ to class ‘org.openqa.selenium.JavascriptExecutor’
thanks you Thomas