Advertisement
Atanasov_88

Untitled

Dec 15th, 2015
336
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.92 KB | None | 0 0
  1. {
  2.  
  3.         driver.get("https://drooble.com/");
  4.  
  5.         String validName = "qatester@abv.bg";
  6.         String validPassword = "123456";
  7.         String pageName = "Yamaha";
  8.  
  9.         WebElement loginButton = driver.findElement(By.cssSelector("#nav > div > nav > a.login"));
  10.         loginButton.click();
  11.  
  12.         WebElement validEmailAccount = driver.findElement(By.id("user-email"));
  13.         validEmailAccount.click();
  14.         validEmailAccount.sendKeys(validName);
  15.  
  16.         WebElement validPasswordAccount = driver.findElement(By.id("user-password"));
  17.         validPasswordAccount.click();
  18.         validPasswordAccount.clear();
  19.         validPasswordAccount.sendKeys(validPassword);
  20.  
  21.         WebElement enterAccountPage = driver.findElement(By.id("loginButton"));
  22.         enterAccountPage.click();
  23.  
  24.         WebElement createBandPageButton = driver.findElement(By.id("right-menu-create-band"));
  25.         createBandPageButton.click();
  26.  
  27.         assertEquals("https://drooble.com/en/create-page", driver.getCurrentUrl());
  28.  
  29.         WebElement chooseButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[1]/div/fieldset[1]/div/nav/a"));
  30.         chooseButton.click();
  31.         Thread.sleep(10);
  32.  
  33.         WebElement bandButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[1]/div/fieldset[1]/div/nav/div"));
  34.         bandButton.click();
  35.  
  36.         WebElement selectBandButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[1]/div/fieldset[1]/div/nav/div/a[2]"));
  37.  
  38.  
  39.         WebElement getStartedButton = driver.findElement(By.cssSelector("html body div#page-content div#content-wrapper div.wrapper.row div.main-container.create-page div.steps-form.row.text-center div.large-7.columns.steps-content div.steps-controls.text-left input.button.right.inspectletIgnore"));
  40.         getStartedButton.click();
  41.  
  42.         WebElement pageNameField = driver.findElement(By.id("page-name"));
  43.         pageNameField.clear();
  44.         pageNameField.click();
  45.         pageNameField.sendKeys(pageName);
  46.  
  47.         WebElement clearField = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[2]"));
  48.         clearField.click();
  49.  
  50.  
  51.         WebElement nextButton = driver.findElement(By.cssSelector(".steps-controls input[type='submit']"));
  52.         nextButton.click();
  53.  
  54.         WebElement aboutSection = driver.findElement(By.id("page-about"));
  55.          aboutSection.click();
  56.          aboutSection.sendKeys("Fan page of" + pageName);
  57.  
  58.        WebElement clearFieldAbout = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[2]"));
  59.        clearFieldAbout.click();
  60.    
  61.  
  62.        // continueButton.click();
  63.  
  64.  
  65.        // Thread.sleep(2000);
  66.  
  67.        // continueButton.click();
  68.  
  69.       //  WebElement finishButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/div/input"));
  70.        // finishButton.click();
  71.  
  72.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement