I am automating a SAP application and I have a button with xPath
element[@controlid='100']/element[@class='Shell Window Class' and @instance='0']//element[@controlid='59648' and @class='AfxFrameOrView140']//toolbar[@class='ToolbarWindow32']/button[@text='Order']
I tried to use like this but it does not work
.//button[@text='Order']
alsı this doesnt work
.//button[0] or .//button[XX]
I wonder why this method does not work as its work in web (in web applications also sometimes doesnt work)
what is the rule here ? How can I simplfy thi button so that I can automate without using ids and so on.
Can not simplfy xpath of a button
Re: Can not simplfy xpath of a button
Hi,
It could simply be your nomenclature. There shouldn't be any '.' in front of '//'. Try the following path:
element[@controlid='100']/element[@class='Shell Window Class' and @instance='0']//element[@controlid='59648' and @class='AfxFrameOrView140']//toolbar[@class='ToolbarWindow32']//button[@text='Order']
Hopefully, this should do the trick.
It could simply be your nomenclature. There shouldn't be any '.' in front of '//'. Try the following path:
element[@controlid='100']/element[@class='Shell Window Class' and @instance='0']//element[@controlid='59648' and @class='AfxFrameOrView140']//toolbar[@class='ToolbarWindow32']//button[@text='Order']
Hopefully, this should do the trick.
Re: Can not simplfy xpath of a button
İt doesnt work. Ranorex puts . even if you dont use it