I have a webdriver script that uses a redirection link to get to a target application link.
Is there is a possibility to have an "IF" step?
DX ASM
Use 'runScript' command and below example code or variations as a template:
(function() {
var xpath = "//input[@value='Submit']";
var result = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
var button = result.singleNodeValue;
if (button) {
button.click();
console.log("Submit button clicked.");
} else {
console.log("Submit button not found.");
}
})();