Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- {
- "username": "kishan",
- "password": "patel"
- }
- ]
- describe ('Login Page Data Driven' , function() {
- browser.ignoreSynchronization = true;
- beforeEach(function(){
- browser.get('your url');
- browser.driver.manage().window().maximize();
- });
- it('To verify Login, using Data Driven Technique from Json file', function()
- {
- var testData = require('D:/json path'); //this is the path where your json is stored
- var user= element(by.id("username"));
- var password = element(by.id("password"));
- user.sendKeys(testData[1].username);
- password.sendKeys(testData[1].password);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement