Page 1 of 1
Failing to correctly find a button
Posted: Wed Nov 20, 2013 12:03 pm
by AccidentReport
I'm currently recording some tests to perform some basic sanity on our web application and all has been going well until I reached these buttons:
button_highlight.png
Obviously when I record the test I am clicking on the Activate button, but when I replay (or highlight it through the repo) it is trying to click just above the button. I have gone through the repo item editor and have added additional items to the Xpath to help ID it but it doesn't seem to be working. The current path for the item is:
Code: Select all
?/?/frame[@id='frmChildContent']//div[#'ctl00_cphMain_contentAreas']//iframe[@id='ctl00_cphMain_frmServiceDetail']//input[@tagvalue='Activate' and @id='btnActivate' and @name='btnActivate' and @type='submit' and @value='Activate']
And the properties of the button show as:
button_props.png
Does anyone have any ideas what might need to be done to make it work properly and be able to ID and click the button correctly?
Thanks!
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 2:17 pm
by Swisside
Hello
Can you try to replace "input" by "inputtag" in your RxPath ?
Regards
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 2:33 pm
by AccidentReport
By default when I record the step the path is:
Code: Select all
/dom[@domain='iawebg.nat.bt.com' and @state='complete']/?/?/frame[@id='frmTopMain']//frame[#'frmChildMain']/?/?/frame[@id='frmChildContent']//div[#'ctl00_cphMain_contentAreas']//iframe[@id='ctl00_cphMain_frmServiceDetail']//input[#'btnActivate']
Whe I use the Spy to edit it I add the Value, Type and Name options from the inputtag section and the path changes to:
Code: Select all
/dom[@domain='iawebg.nat.bt.com' and @state='complete']/?/?/frame[@id='frmTopMain']//frame[#'frmChildMain']/?/?/frame[@id='frmChildContent']//div[#'ctl00_cphMain_contentAreas']//iframe[@id='ctl00_cphMain_frmServiceDetail']//input[@name='btnActivate' and @type='submit' and @value='Activate']
When you say to replace input I assume you mean the input on the last line of the path (//input[@name=...). I changed it to inputtag but it made no difference.
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 2:40 pm
by krstcs
It would be very helpful if you could make a snapshot of the application, or at least that button, and post it so we can look at the structure. There may be something in there that you are missing, or not telling us, and therefore that we don't know about.
What technology is your application-under-test written in? I see it is HTML, but are there any special frameworks that are being used (Silverlight, Java, etc.)?
What version of Ranorex are you using?
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 2:56 pm
by AccidentReport
Not sure what you mean by "make a snapshot of the application, or at least that button".
Like I said its a web based application. More fully it's a .net website (html, C# and javascript) using a back-end oracle database. Getting much more technical than that it a bit out of the scope of my job role as I'm only supposed to test it from an end-to-end point of view so don't much care about the how or why, so long as it does!
Ranorex is version 4.1.1.15872
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 3:01 pm
by Swisside
Hello
You'll find explainations here :
http://www.ranorex.com/support/user-gui ... files.html
It's useful to analyse the problem. If you cannot send it due to confidentiality or other reasons send your question here
[email protected].
Regards
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 3:14 pm
by AccidentReport
Not sure what can and what can't be shown so I'll email it in. Shouldn't matter too much as it's a public application but better to be safe. I'll email it to the email address you suggested.
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 3:37 pm
by Swisside
Could you tell us where to access the application with the troublesome button if it's public ?
Regards
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 3:49 pm
by AccidentReport
Sorry...misuse of words. It's in the public domain but you can only access it if you're a customer.
Re: Failing to correctly find a button
Posted: Wed Nov 20, 2013 3:55 pm
by Swisside
Okay fair enough
Hope the support will be able to help you.
If you can post the answer/solution/work around once your get a reply from the support it would be great.
Re: Failing to correctly find a button
Posted: Wed Dec 04, 2013 5:06 pm
by Support Team
Hello,
The solution for this issue was to disable 'Enable search by unique ID' in the 'General Settings'.
Regards,
Markus (T)