Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var webdriver = require('selenium-webdriver'),
- By = webdriver.By,
- until = webdriver.until;
- var driver = new webdriver.Builder()
- .forBrowser('chrome')
- .build();
- driver.manage().window().maximize();
- driver.get('https://www.facebook.com').then(function(){
- console.log("Go to the page");
- });
- driver.findElement(By.id("email")).sendKeys("fran.sosa@outlook.com.ar").then(function(){
- driver.sleep(1000);
- console.log("Then: I put my email");
- });
- driver.findElement(By.xpath("//*[@id='pass']")).sendKeys("hanna34").then(function(){
- driver.sleep(1000);
- console.log("Then: As an admin i enter my password");
- });
- driver.findElement(By.xpath('//*[@id="u_0_2"]')).click().then(function(){
- console.log("When: I click on the 'Login' button, i want to see the Admin Dashboard");
- driver.sleep(2000);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement