How to use index properly for a button ?
Posted: Tue Aug 19, 2014 2:42 pm
Hi
I have a headache problem I hope someone can help me on this..There is an answer button in the middle of the page I am testing but somehow ranorex clicks another button instead of it..it clicks another Answer button (which is actually not seen on screen initially, only seen after clicking a back arrow button)
I am clicking the right button when recording but it tries to click other button during play (but it can not click bcos other button is not seen on the screen)
Why the hell Ranorex not clicking the button on screen and tried to click another button which is not actually visible on the screen initially ?
I am spying the button but not see an index attribute, I see Class is different for two Answer buttons.
I tried .//div[#'call_answer']//span[@innertext='Answer'][@class='answer_text']
but still clicks the other button ??
There is no index property but I still tried something for using index (as in the QTP)
I search the forum and found those pages
In this page
http://www.ranorex.com/forum/adressing- ... t6716.html
it is adviced to use and
"/dom[@domain='www.mydomain.com' and @browser~'Firefox']"
and in this page
http://www.ranorex.com/forum/combining- ... t5741.html
and in this page
http://www.ranorex.com/forum/variables- ... t3242.html
adviced to use as seperate brackets such as
/treeitem[@accessibledefaultaction='Expand'][1]
or
//tag[@class='highcharts-axis'][1]
Which one is true ? I tried
.//div[#'call_answer']//span[@innertext='Answer'][0]
.//div[#'call_answer']//span[@innertext='Answer'][1]
.//div[#'call_answer']//span[@innertext='Answer'][2]
but no help
also tried
.//div[#'call_answer']//span[@innertext='Answer'][@visible='True']
Which one is true ? I hope someone can help me on this..
I have a headache problem I hope someone can help me on this..There is an answer button in the middle of the page I am testing but somehow ranorex clicks another button instead of it..it clicks another Answer button (which is actually not seen on screen initially, only seen after clicking a back arrow button)
I am clicking the right button when recording but it tries to click other button during play (but it can not click bcos other button is not seen on the screen)
Why the hell Ranorex not clicking the button on screen and tried to click another button which is not actually visible on the screen initially ?
I am spying the button but not see an index attribute, I see Class is different for two Answer buttons.
I tried .//div[#'call_answer']//span[@innertext='Answer'][@class='answer_text']
but still clicks the other button ??
There is no index property but I still tried something for using index (as in the QTP)
I search the forum and found those pages
In this page
http://www.ranorex.com/forum/adressing- ... t6716.html
it is adviced to use and
"/dom[@domain='www.mydomain.com' and @browser~'Firefox']"
and in this page
http://www.ranorex.com/forum/combining- ... t5741.html
and in this page
http://www.ranorex.com/forum/variables- ... t3242.html
adviced to use as seperate brackets such as
/treeitem[@accessibledefaultaction='Expand'][1]
or
//tag[@class='highcharts-axis'][1]
Which one is true ? I tried
.//div[#'call_answer']//span[@innertext='Answer'][0]
.//div[#'call_answer']//span[@innertext='Answer'][1]
.//div[#'call_answer']//span[@innertext='Answer'][2]
but no help
also tried
.//div[#'call_answer']//span[@innertext='Answer'][@visible='True']
Which one is true ? I hope someone can help me on this..