Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- driver.get("https://drooble.com/");
- String validName = "qatester@abv.bg";
- String validPassword = "123456";
- String pageName = "Yamaha";
- WebElement loginButton = driver.findElement(By.cssSelector("#nav > div > nav > a.login"));
- loginButton.click();
- WebElement validEmailAccount = driver.findElement(By.id("user-email"));
- validEmailAccount.click();
- validEmailAccount.sendKeys(validName);
- WebElement validPasswordAccount = driver.findElement(By.id("user-password"));
- validPasswordAccount.click();
- validPasswordAccount.clear();
- validPasswordAccount.sendKeys(validPassword);
- WebElement enterAccountPage = driver.findElement(By.id("loginButton"));
- enterAccountPage.click();
- WebElement createBandPageButton = driver.findElement(By.id("right-menu-create-band"));
- createBandPageButton.click();
- assertEquals("https://drooble.com/en/create-page", driver.getCurrentUrl());
- WebElement chooseButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[1]/div/fieldset[1]/div/nav/a"));
- chooseButton.click();
- Thread.sleep(10);
- WebElement bandButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[1]/div/fieldset[1]/div/nav/div"));
- bandButton.click();
- 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]"));
- 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"));
- getStartedButton.click();
- WebElement pageNameField = driver.findElement(By.id("page-name"));
- pageNameField.clear();
- pageNameField.click();
- pageNameField.sendKeys(pageName);
- WebElement clearField = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[2]"));
- clearField.click();
- WebElement nextButton = driver.findElement(By.cssSelector(".steps-controls input[type='submit']"));
- nextButton.click();
- WebElement aboutSection = driver.findElement(By.id("page-about"));
- aboutSection.click();
- aboutSection.sendKeys("Fan page of" + pageName);
- WebElement clearFieldAbout = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/form[2]"));
- clearFieldAbout.click();
- // continueButton.click();
- // Thread.sleep(2000);
- // continueButton.click();
- // WebElement finishButton = driver.findElement(By.xpath("/html/body/div[3]/div/div/div/div/div[2]/div/input"));
- // finishButton.click();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement