I am trying to reset a password, I get to the email to reset the password but I can not figure out how to select the reset button within the email body, Any suggestion?
Please post the HTML for the Reset password dialog.
See Inspector in this post:
Your screenshot is cropped at the left and top. I need to see if the button in the dialog is inside an iframe. I also need to see the HTML structure to work out a selector that will allow you to target the button.
Anybody know?
Sorry, I forgot this thread.
Try this:
String js = '''
var ifr_doc = document.querySelector("msg_body").contentDocument;
var link = ifr_doc.querySelector("table table table table table table tr:nth-child[1]>td a");
link.click();
'''
WebUI.executeJavaScript(js, null)
If you want to follow along with my thinking, the rudiments of the code above are explained here:
I dont understand your response Im just learning Katalon and Not a great programmer
This is what I came up with but it doesnât workâŚ
WebUI.executeJavaScript(js, true)
String dynamicId = âbeta.govspend.app/reset/5d600aaf50cfb900216905d4___â
String xpath = (âhref="â + dynamicId) + â"]â
TestObject to = new TestObject(âa_Resetâ)
to.addProperty(âxpathâ, ConditionType.EQUALS, xpath)
WebUI.click(Reset)
Itâs not possible to teach you the art of programming here on a forum - no one has the time for that.
The code I gave you should be used in place of line 15 in your original screenshot. Move in to Script View, and try pasting that code instead of line 15.