I'm running cross browser tests for a web application. One of the tests includes a step to click on a confirmation button of a browser dialog box as shown below:
IE
Safari
The test step works in IE but not in Safari. My xPath and repository for the item looks like this:
How can I edit the repository, so that the test step works for all browsers?
Thanks!
Confirmation Dialog - Cross Browser Testing
Re: Confirmation Dialog - Cross Browser Testing
Hi,
It does not work in Safari, because the base path refers to message title bar text, which is empty in Safari message box! You just have to find another attribute, which is the same regardless of used browser. What about this text "Confirm your choice to delete this user". Is it set by your AUT? if so, then use this text (part of it) to identify the dialog, instead of the title bar. Hope this helps?
It does not work in Safari, because the base path refers to message title bar text, which is empty in Safari message box! You just have to find another attribute, which is the same regardless of used browser. What about this text "Confirm your choice to delete this user". Is it set by your AUT? if so, then use this text (part of it) to identify the dialog, instead of the title bar. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Confirmation Dialog - Cross Browser Testing
Hi,
Edit your Xpath in such a way to identify ok button in any of the window.
Ex: /form/button[@text='OK']
It identifies "OK" button in any popup generated.
Hope it helps..
Edit your Xpath in such a way to identify ok button in any of the window.
Ex: /form/button[@text='OK']
It identifies "OK" button in any popup generated.
Hope it helps..
-
- Certified Professional
- Posts: 455
- Joined: Tue Feb 18, 2014 2:14 pm
- Location: Co Louth, Ireland
- Contact:
Re: Confirmation Dialog - Cross Browser Testing
Thanks odklizec and Nagarjuna for your helpful replies.
Thanks again!
I tried that approach but could not get it to work. What I did was use a workaround of replacing the step to click on the "OK" button, with a step with Key Sequence {Return}. That seems to work for all browsers. I will try using the approaches you both suggested when my knowledge and experience of xPath improves.odklizec wrote:/form/button[@text='OK']
Thanks again!