In Selenium IDE, "assertNotSelectedIndexes" in addition to "assertNotSelectedIndex" commands are nearest same. Both are working amongst driblet downward or listing box of software spider web application page. If y'all knows how to role "assertNotSelectedLabel" in addition to "assertNotSelectedLabels" commands in addition to thence it volition locomote real tardily for y'all
to sympathise these ii commands. "assertNotSelectedIndex" dominance industrial plant amongst unmarried selected label in addition to "assertNotSelectedIndexes" dominance is useful amongst multiple selected labels.
to sympathise these ii commands. "assertNotSelectedIndex" dominance industrial plant amongst unmarried selected label in addition to "assertNotSelectedIndexes" dominance is useful amongst multiple selected labels.
"assertNotSelectedIndex" Command
This dominance is useful to verify the index of electrical current selected label from driblet downward or listing box. If index of electrical current selected label volition fit amongst expected in addition to thence it volition neglect in addition to provide fault inwards log.
Example 1
New Test | ||
Command | Target | Value |
open | ||
select | css=select | index=2 |
assertNotSelectedIndex | css=select | 1 |
assertNotSelectedIndex | css=select | 2 |
assertNotSelectedIndex | css=select | 3 |
In inwards a higher house example, 1st "assertNotSelectedIndex" dominance volition cash inwards one's chips because electrical current selected label has index = 2. But 2d "assertNotSelectedIndex" dominance volition neglect in addition to provide fault "[error] Actual value '2' did fit '2'".
"assertNotSelectedIndexes" Command
"assertNotSelectedIndexes" dominance volition run same every bit "assertNotSelectedIndex" dominance but for multiple selected labels. If expected in addition to actual volition fit in addition to thence script volition neglect in addition to provide fault inwards log. Run bellow given example.
Example 2
New Test | ||
Command | Target | Value |
open | ||
addSelection | css=select[name="FromLB"] | index=2 |
addSelection | css=select[name="FromLB"] | index=3 |
assertNotSelectedIndexes | css=select[name="FromLB"] | 2,4 |
addSelection | css=select[name="FromLB"] | index=2 |
removeSelection | css=select[name="FromLB"] | index=3 |
addSelection | css=select[name="FromLB"] | index=4 |
assertNotSelectedIndexes | css=select[name="FromLB"] | 2,4 |
addSelection | css=select[name="FromLB"] | index=5 |
In this example, 1st "assertNotSelectedIndexes" dominance volition cash inwards one's chips because electrical current selected indexes are ii in addition to 3. But 2d "assertNotSelectedIndexes" dominance volition neglect because right away expected selected indexes 2,4 volition fit amongst actual selected indexes 2,4 in addition to provide fault "[error] Actual value '2,4' did fit '2,4'".