Forum Discussion

MoreK's avatar
MoreK
New Contributor
3 years ago

Covert some code from javascript to Groovy script

Working code in Groovy def handler = [(~/^Mac OS.*/) : { "open $it".execute() }, (~/^Windows.*/) : { "cmd /C start $it".execute() }, (~/.*/) : { //--- Open chrome in desktop machine def browsers ...
  • KarelHusa's avatar
    3 years ago

    MoreK ,

    controlling the browser and the DOM inside via Groovy from ReadyAPI seems to me too difficult.

     

    I would suggest doing the authentication directly within ReadyAPI (using OAuth or other authorization method which is in place), save the token and use it by your test steps. 

     

    Best regards,

    Karel