I am trying without success to click on a particular button using SELENIUM & JAVA but i am getting this error message: That button has this: The XPATH is: I did this: What am i doing wrong in here? Answer If you use the xpath: Should work. Why this happened? The problem is that you were using the xpath: With
Tag: javascriptexecutor
casting of js.executeAsyncScript output to Map
I want to cast the output of below script into Map<string,string> but it is showing “java.lang.String cannot be cast to java.util.Map”error. How can we cast that in map?? Answer I assume your response is in Json format. You can use Gson to convert the String to Map.