Topic: node ID and Selenium

Hi guys

I am struggling to get Selenium to select the correct node since the "uid" ( found using FireBug) keeps changing after adding another node. <span uid="6" class="mif-tree-name">test node</span>

Is it possible to populate the "uid" based on the id from the SQL database ie <span uid="1" class="mif-tree-name">test node</span>

Regards

Last edited by njk (2010-05-31 13:58:44)

Re: node ID and Selenium

uid - automatically generated value, you can't change it.

You can add node id based on id from SQL. I don't understand what you want to do.

Re: node ID and Selenium

moro wrote:

uid - automatically generated value, you can't change it.

You can add node id based on id from SQL. I don't understand what you want to do.

Thanks for the reply.

Example scenario : The tree consist of 2 subjects ( Maths, Science ). We add users to each of those nodes. This will make the users child nodes to the parent (Subject) nodes.

When telling SeleniumIDE/RC to click on the user "Frikkie", we tell it to click the uid because Selenium can not find the name in the tree. So what we are trying to do now is assign the SQL id number of when the user was created to the uid in the tree. This way the Selenium test will always select the correct user node.

Re: node ID and Selenium

you can change html structure in Mif.Tree.Draw::getHTML and add some attribute with sql id value