Execute a function in js file referred in source of a html script by using Webdriver/Katalon commands

23 views Asked by At

The below html script is part of an application page loaded using Katalon webdriver open command:

Html script:

<script type="text/javascript" id="app_init" src="http://<hostname>:<port>/feature.js" ></script>

Function in feature.js:

var isFeatureReady = false;
function setFeatureReady(){
   isFeatureReady = true;
}

The plan is to execute the setFeatureReady function as part of webdriver javascript command to set the flag:

Webdriver commands

enter image description here

Please guide the way to trigger the function using commands

0

There are 0 answers