Currently Being Moderated

Reorder Locator

VERSION 2

Created on: Apr 23, 2008 6:33 PM by net.det - Last Modified:  Apr 24, 2008 2:28 AM by Thomas

 

Hello I'm recording some testcases in IDE and when i'm clicking on Links he always records

 

link="test". Is there a possibility to set the recorder to XPath? So that I don't need to enter code like //a\[@name='testlink'\] ?

 

Thanks

 

 

...

 

 

 

I'm testing a multi language web page and don't wanna create testcases for every language. So I need XPath to identify them.

 

 

And I know, that i can select the XPath form the dropdown while i'm recording. So the IDE knows it but uses the link='test' per default.

 

 

-


It's described here:

 

http://wiki.openqa.org/display/SIDE/Writing+extensions

 

 

Changing a variable called "LocatorBuilders.order" will change the order of the locator.

 

-


Thanks for the Answers. Works fine for me

 

@guai00 and all others who wants to know how it works:

 

 

  1. Create a File (for example extension.js) open it in an Editor and

  2. type somthing like this 
     
         LocatorBuilders.order = \['id', 'name', 'link', 'dom:name', 'xpath:attributes', 'xpath:img', 'xpath:link','xpath:href', 'dom:index', 'xpath:position'\];

  3. youcan change the order or leave something out.

  4. When opening IDE select - options -> options... -> general -> selenium IDE extension -> browse -> select the file and restart.

 

 

 

And then it should work

 

-


 

Thanks, reallimk!

 

It works fine with your suggestion! Thank you again!

 

 

This document was generated from the following thread: Selenium IDE recorder XPath

 

 

Tags: order, locator
Average User Rating
(1 rating)




There are no comments on this document

More Like This

  • Retrieving data ...

More by net.det