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.
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.
5 Comments
What if any of the test data fails, how to skip it and move on next set of data in selenium
ReplyDeleteWhich type of failure? Can you provide more clarification?
DeleteHi!
DeleteI use this method for registrations on the web. My xml contains ~ 100 users & 100 events.
If a registration is failed (e.g: the user is not right for the event)all of the remaining vars will not executing.
How can I solve this problem?
Thank you
I am receiving this error:
ReplyDelete[error] Unexpected Exception: Error: Error while fetching URL 'file://c:/data.xml':: [Exception... "Failure" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: chrome://selblocksseleexten/content/extensions/data-reader.js?1486673134223 :: FileReader.prototype.getDocumentSynchronous :: line 269" data: no].
Any idea why?
I am getting this error "A element could not be loaded, or was empty.. " Please help me..
ReplyDeleteWhat would you like to add in my list? I look forward to reading your comments below.