How to optimize rxpath
Posted: Wed Jan 05, 2011 7:00 pm
I had an rxpath from earlier, which wasn't flexibile as we waned to be, so I needed it to rewrite rxpath to become more flexibile. I did that, but now takes about 4 min and 20 sec to find element, and with earlier expresion it took only about 4-5 seconds.
Difference is only at the end at 'tr', 'td' and 'a' elements.
OLD ONE:
/dom[@domain='192.168.177.3:9080']/body/div/div/div/div/table/tbody/tr/td[@innertext='Presentation View']/../../../../../../div[2]/div[1]/div[2]/div[1]/div[1]/iframe[1]/body[1]/table[1]/tbody[1]
/tr[5]/td[{0}]/a[1]
where {0} is column parameter in string format
NEW ONE:
/dom[@domain='192.168.177.3:9080']/body/div/div/div/div/table/tbody/tr/td[@innertext='Presentation View']/../../../../../../div[2]/div[1]/div[2]/div[1]/div[1]/iframe[1]/body[1]/table[1]/tbody[1]
/tr/td/a[@innertext='{1}']/../../td[{0}]/a[1]
where {0} is column parameter in string format and
{1} is name of label
So basically I want to send to my method a type of label and rxpath should find item in the same row, and 2nd column.
Something like this example: http://www.ranorex.com/support/user-gui ... html#c2462
Is there a way to speed up this search, because 4 minutes are really long...
Or if there is some other way to make this work faster.
regards, Vajda
Difference is only at the end at 'tr', 'td' and 'a' elements.
OLD ONE:
/dom[@domain='192.168.177.3:9080']/body/div/div/div/div/table/tbody/tr/td[@innertext='Presentation View']/../../../../../../div[2]/div[1]/div[2]/div[1]/div[1]/iframe[1]/body[1]/table[1]/tbody[1]
/tr[5]/td[{0}]/a[1]
where {0} is column parameter in string format
NEW ONE:
/dom[@domain='192.168.177.3:9080']/body/div/div/div/div/table/tbody/tr/td[@innertext='Presentation View']/../../../../../../div[2]/div[1]/div[2]/div[1]/div[1]/iframe[1]/body[1]/table[1]/tbody[1]
/tr/td/a[@innertext='{1}']/../../td[{0}]/a[1]
where {0} is column parameter in string format and
{1} is name of label
So basically I want to send to my method a type of label and rxpath should find item in the same row, and 2nd column.
Something like this example: http://www.ranorex.com/support/user-gui ... html#c2462
Is there a way to speed up this search, because 4 minutes are really long...
Or if there is some other way to make this work faster.
regards, Vajda