Skip to content
Advertisement

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??

JavaScript

Advertisement

Answer

I assume your response is in Json format. You can use Gson to convert the String to Map.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement