@Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://bibliotecautn.sytes.net";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
   Utilidades.seleniumLogin(driver, baseUrl);
 }
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://in.reuters.com/";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
   driver.manage().window().maximize();
 }
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   recorder = new Recorder();
   baseUrl = "http://10.0.0.107:8080/";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
   driver.manage().window().maximize();
   recorder.startRecording(this.getClass().getName());
 }
 @Before
 public void setUp() throws Exception {
   System.setProperty(
       "webdriver.chrome.driver",
       "C:\\Users\\om\\Downloads\\Programs\\Selenium\\chromedriver.exe");
   driver = new ChromeDriver();
   baseUrl = "http://collegeontrackdev.prod.acquia-sites.com/";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }
Ejemplo n.º 5
0
  @Before
  public void setUp() throws Exception {
    driver = new FirefoxDriver();
    func = new COTFunctions(driver);
    driver.manage().timeouts().implicitlyWait(func.timeoutOFAllElement, TimeUnit.SECONDS);

    driver.get(func.baseUrl + "/");
    func.CheckLogin();
    func.LoginRole("SchoolAdmin");
    driver.get(func.baseUrl + "/college-search");
  }
Ejemplo n.º 6
0
  @Before
  public void setUp() throws Exception {
    driver = new FirefoxDriver();
    func = new COTFunctions(driver);
    wait = new WebDriverWait(driver, func.timeoutOfOneElement);
    driver.manage().timeouts().implicitlyWait(func.timeoutOFAllElement, TimeUnit.SECONDS);

    driver.get(func.baseUrl + "/");
    func.CheckLogin();
    func.LoginRole("Student");
    driver.get(func.baseUrl + "/document-locker");
  }
  @Test
  public void testAbcd() throws Exception {
    driver.get(baseUrl + "/");
    driver.findElement(By.linkText("Sign In")).click();

    driver.findElement(By.linkText("Sign In")).getText();
    driver.findElement(By.xpath("//input[@name='loginName']")).clear();
    driver.findElement(By.xpath("//input[@name='loginName']")).sendKeys("*****@*****.**");
    driver.findElement(By.xpath("//input[@name='password']")).clear();
    driver.findElement(By.xpath("//input[@name='password']")).sendKeys("demo123");
    driver.findElement(By.xpath("//input[@type='image']")).click();
    driver.findElement(By.linkText("Money")).click();

    driver.findElement(By.linkText("Portfolio")).click();
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

    WebElement table = driver.findElement(By.id("table-holding-data"));

    if (table.isDisplayed()) {

      List<WebElement> rows = table.findElements(By.tagName("tr"));

      System.out.println("Row Count - " + rows.size());

      Iterator<WebElement> i = rows.iterator();

      System.out.println("Table has following content");

      while (i.hasNext()) {

        WebElement row = i.next();

        List<WebElement> columns = row.findElements(By.tagName("td"));

        Iterator<WebElement> j = columns.iterator();

        while (j.hasNext()) {

          WebElement column = j.next();

          System.out.print(column.getText());

          System.out.print("    |  ");
        }
        System.out.println("--------------------");
      }
      System.out.println("Table content is printed");
    } else {
      System.out.println("Table not found");
    }
  }
Ejemplo n.º 8
0
  @Before
  public void setUp() throws Exception {
    prop = new Properties();

    try {
      prop.load(new FileInputStream(new java.io.File("").getAbsolutePath() + "/era.properties"));
      gridHost = prop.getProperty("grid.host");
      gridPort = prop.getProperty("grid.port");

    } catch (Exception e) {
      gridHost = "http://localhost";
      gridPort = "4444";
    }

    DesiredCapabilities capability = DesiredCapabilities.firefox();
    driver = new RemoteWebDriver(new URL(gridHost + ":" + gridPort + "//wd/hub"), capability);
    baseUrl = "http://weather.gc.ca/";
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  }
Ejemplo n.º 9
0
  // Test Case 1: Postal Code Missing - Error
  private void newProfilePostalCodeEmpty() throws InterruptedException {

    driver.manage().window().maximize();
    driver.findElement(By.cssSelector("li")).click();
    new Select(driver.findElement(By.id("profileGender"))).selectByVisibleText("Woman");
    driver.findElement(By.cssSelector("option[value=\"3\"]")).click();
    new Select(driver.findElement(By.id("profileLookingGender"))).selectByVisibleText("Man");
    driver.findElement(By.cssSelector("#profileLookingGender > option[value=\"2\"]")).click();
    driver.findElement(By.id("profileLookingMinAge")).click();
    new Select(driver.findElement(By.id("profileLookingMinAge"))).selectByVisibleText("20");
    driver.findElement(By.cssSelector("option[value=\"20\"]")).click();
    new Select(driver.findElement(By.id("profileLookingMaxAge"))).selectByVisibleText("36");
    driver.findElement(By.cssSelector("#profileLookingMaxAge > option[value=\"36\"]")).click();
    driver.findElement(By.cssSelector("#country > option[value=\"39\"]")).click();
    driver.findElement(By.id("submit")).click();

    System.out.println("ERROR: Postal Code is Empty");
    Thread.sleep(5000);
  }
Ejemplo n.º 10
0
  // Profile creation - step 1
  private void profilePage1() throws InterruptedException {

    driver.manage().window().maximize();
    driver.findElement(By.cssSelector("li")).click();
    new Select(driver.findElement(By.id("profileGender"))).selectByVisibleText("Woman");
    driver.findElement(By.cssSelector("option[value=\"3\"]")).click();
    new Select(driver.findElement(By.id("profileLookingGender"))).selectByVisibleText("Man");
    driver.findElement(By.cssSelector("#profileLookingGender > option[value=\"2\"]")).click();
    driver.findElement(By.id("profileLookingMinAge")).click();
    new Select(driver.findElement(By.id("profileLookingMinAge"))).selectByVisibleText("20");
    driver.findElement(By.cssSelector("option[value=\"20\"]")).click();
    new Select(driver.findElement(By.id("profileLookingMaxAge"))).selectByVisibleText("36");
    driver.findElement(By.cssSelector("#profileLookingMaxAge > option[value=\"36\"]")).click();
    driver.findElement(By.cssSelector("#country > option[value=\"39\"]")).click();
    driver.findElement(By.id(("postalCode"))).click();
    driver.findElement(By.id(("postalCode"))).clear();
    driver.findElement(By.id(("postalCode"))).sendKeys("H3S1H4");
    driver.findElement(By.id("submit")).click();
    Thread.sleep(5000);
  }
Ejemplo n.º 11
0
Archivo: LFT.java Proyecto: qarocks/SPW
  @Before
  public void setUp() throws Exception {

    // System.setProperty("webdriver.chrome.driver","C:\\Users\\Sneha\\AppData\\Local\\Google\\Chrome\\Application\\chrome.exe");
    System.setProperty("webdriver.firefox.bin", "C:\\Mozilla Firefox\\firefox.exe");

    /*File profileDir = new File("C:\\Users\\Sneha\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\hl4nsrj3.no silveright");
        FirefoxProfile profile = new FirefoxProfile(profileDir);
        profile.setPreference("general.useragent.override", "same user agent string as above");


    driver = new FirefoxDriver(profile);
    */
    driver = new FirefoxDriver();
    // driver=new ChromeDriver();

    // WebDriver driver = new InternetExplorerDriver();

    driver.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
    selenium = new WebDriverBackedSelenium(driver, baseUrl);

    webDriver = new HtmlUnitDriver(true);
  }
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "https://qa.modsolar.net/";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }
Ejemplo n.º 13
0
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://127.0.0.1:8080/";
   driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
 }
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://localhost:3000";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }
Ejemplo n.º 15
0
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://www.myth-weavers.com/";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }
Ejemplo n.º 16
0
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }
Ejemplo n.º 17
0
 public static void waitBetween(int time) {
   driver.manage().timeouts().implicitlyWait(time, TimeUnit.SECONDS);
 }
Ejemplo n.º 18
0
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://cse.unl.edu/";
   driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
 }
Ejemplo n.º 19
0
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "https://stackoverflow.com/";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }
Ejemplo n.º 20
0
 @Before
 public void setUp() throws Exception {
   driver = new FirefoxDriver();
   baseUrl = "http://evalimised13.appspot.com";
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
 }