Use of "addSelectionAndWait" and "removeSelectionAndWait" command

 "addSelectionAndWait" command in selenium IDE

When you are adding selection into multi select list box and page reloading due to the adding selection, you need to use addSelectionAndWait command to handle page loading event. You can use addSelection if page not reloading after adding selection.

I have not any perfect example of page reloading when adding selection in list box. Let me try to show you how to use addSelectionAndWait command.


New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.com/2013/09/testing.html
addSelectionname=FromLBlabel=Japan
addSelectionname=FromLBlabel=India
addSelectionAndWait name=FromLBlabel=Mexico

In this example, when selection label=Mexico, page not reloading so that this command will be not helpful
here. but you just need to consider it as page reloading.

 "removeSelectionAndWait" command in selenium IDE

Same as described in above example, removeSelectionAndWait command will works when page reloading when removing selection from multi select list box. here is example of how to use "removeSelectionAndWait" command in selenium IDE so that you can get some idea.

New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.com/2013/09/testing.html
addSelectionname=FromLBlabel=Japan
addSelectionname=FromLBlabel=Mexico
addSelectionname=FromLBlabel=Italy
addSelectionname=FromLBlabel=Greece
removeSelectionAndWai name=FromLBlabel=Mexico

No comments:

Post a Comment