Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. [
  2. {
  3. "username": "kishan",
  4. "password": "patel"
  5. }
  6. ]
  7.  
  8. describe ('Login Page Data Driven' , function() {
  9. browser.ignoreSynchronization = true;
  10.  
  11.  
  12. beforeEach(function(){
  13. browser.get('your url');
  14. browser.driver.manage().window().maximize();
  15. });
  16.  
  17. it('To verify Login, using Data Driven Technique from Json file', function()
  18.  
  19. {
  20. var testData = require('D:/json path'); //this is the path where your json is stored
  21. var user= element(by.id("username"));
  22. var password = element(by.id("password"));
  23. user.sendKeys(testData[1].username);
  24. password.sendKeys(testData[1].password);
  25. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement