Reputation: 3
I'm using selenium to test a web application but need some help. One of the nodes that needs to be clicked has a constant changing value on startup.
Example:
click css=#f0012 > ins.jstree-icon
On startup the letter before 0012 is randomly assigned (a letter from a-z). This means each time my selemnium script is run, I need to somehow obtain this character or just reference the 0012 so that the program knows which button to click.
I'm really stuck on this so would appreciate any help
Upvotes: 0
Views: 199
Reputation: 9029
This should work for you:
click css=[id$='0012'] > ins.jstree-icon
The $=
will look for elements that end in "0012".
Upvotes: 6