In Selenium IDE, can I store an element to use in subsequent asserts?
Posted
by Colin Fine
on Stack Overflow
See other posts from Stack Overflow
or by Colin Fine
Published on 2010-05-19T11:19:29Z
Indexed on
2010/05/19
12:00 UTC
Read the original article
Hit count: 167
selenium-ide
I've just started using Selenium-IDE (not looked at selenium-RC yet: if somebody tells me that that is the answer to my question I'll look at it)
One of the operations I'm testing generates some output in a table in the next HTML page, but the order of the rows is not predictable.
I can obviously use 'assertTextPresent', but I want to do a bit more, and check that various bits of text are in the same row.
What I would like to be able to do is to identify a tr by some content, and then use that tr in subsequent asserts; something like
storeExpression //table[@id='TABLE_6']/td[.='case_1']/.. row
assertText ${row} 'Some text'
assertText ${row} 'Some other text'
to check that 'Some text' and 'Some other text' occur in the same table row as 'case_1'.
I haven't got this to work so far, and I'm not sure whether it is possible, or what syntax to use if it is.
Has anybody managed to do this?
© Stack Overflow or respective owner