SHARE
TWEET

Untitled

a guest Aug 25th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.openqa.selenium.*;
  2. import org.openqa.selenium.chrome.ChromeDriver;
  3. import org.openqa.selenium.support.ui.Select;
  4. import org.testng.Assert;
  5. import org.testng.annotations.AfterClass;
  6. import org.testng.annotations.BeforeClass;
  7. import org.testng.annotations.Test;
  8. import org.openqa.selenium.Keys;
  9.  
  10.  
  11. public class FirstSeleniumTest extends BaseSeleniumTest {
  12.  
  13.     @Test
  14.     public void googleOpen() {
  15.         String url = "https://www.seleniumhq.org/";
  16.         driver.get(url);
  17.         String webPageTitle = "Selenium - Web Browser Automation";
  18.         Assert.assertEquals(webPageTitle,driver.getTitle());
  19.         WebElement projectsButton = driver.findElement(By.xpath("/html/body/div[3]/div[1]/ul/li[5]/a"));
  20.         projectsButton.click();
  21.     }
  22.  
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top