HOW TO PERFORM DATA DRIVEN USING XML IN SELENIUM IDE ?

We can do XML data driven in Selenium IDE using SelBlocks.
Here is the very basic example to perform XML data driven in Selenium IDE using SelBlocks.




Create a testdata.xml file in the C drive with following details:


    <vars keyword="hello selenium" />
    <vars keyword="abhishek yadav qa" />





  • Write the below script in Selenium IDE.
Command
Target
Value
forXml
file://c:/testdata.xml
open
/

waitForPageToLoad
5000

typeAndWait
name=q
${keyword}
endForXml


* Base URL:
http://www.google.co.in/




  • Save the recorded script.
  • Run the recorded script.






Post a Comment

2 Comments

  1. What if any of the test data fails, how to skip it and move on next set of data in selenium

    ReplyDelete
    Replies
    1. Which type of failure? Can you provide more clarification?

      Delete


What would you like to add in my list? I look forward to reading your comments below.