Package org.openqa.selenium.chrome

Examples of org.openqa.selenium.chrome.ChromeDriver.findElement()


   
//     ����Ի����е�����
//     ���ڶԻ����е�Ԫ�ر��ɰ����ڵ���ֱ�ӵ���ᱨ Element is not clickable�Ĵ���
//     ����ʹ��js��ģ��click
//     ��watir-webdriver��ֻ��Ҫfire_event(:click)�Ϳ�����
    WebElement link = dr.findElement(By.id("myModal")).findElement(By.id("click"));
    ((JavascriptExecutor)dr).executeScript("$(arguments[0]).click()", link);
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
View Full Code Here


//    ��ҳ����ֱ��ִ��js
    ((JavascriptExecutor)dr).executeScript("$('#tooltip').fadeOut();");
    Thread.sleep(1000);
   
//    ���Ѿ���λ��Ԫ����ִ��js
    WebElement button = dr.findElement(By.className("btn"));
    ((JavascriptExecutor)dr).executeScript("$(arguments[0]).fadeOut();", button);
     
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
View Full Code Here

   
    dr.get(filePath);
    Thread.sleep(1000);
   
//    ����1���㼶��λ���ȶ�λul�ٶ�λli
    dr.findElement(By.className("nav")).findElement(By.linkText("About")).click();
    Thread.sleep(1000);
   
//    ����2: ֱ�Ӷ�λlink
    dr.findElement(By.linkText("Home")).click();
   
View Full Code Here

   
//     �ȵ�f1�ٵ�f2
    dr.switchTo().frame("f1");
    dr.switchTo().frame("f2");
//    ��f2�еİٶȹؼ����ı�������������
    dr.findElement(By.id("kw")).sendKeys("watir-webdriver");
    Thread.sleep(1000);
   
//    ֱ����������frame
    dr.switchTo().defaultContent();
View Full Code Here

//    ֱ����������frame
    dr.switchTo().defaultContent();

//    �ٵ�f1
    dr.switchTo().frame("f1");
    dr.findElement(By.linkText("click")).click();
   
    Thread.sleep(1000);
    System.out.println("browser will be close");
    dr.quit()
  }
View Full Code Here

       
        //for (TraderInfo ti : traderList) {
                 
          //driver.get(ti.getUrl());
               
                driver.findElement(By.linkText("������")).click();

                Thread.sleep(5000);
               
          String s =  driver.findElement(By.id("table-body-positions")).getText();
         
View Full Code Here

               
                driver.findElement(By.linkText("������")).click();

                Thread.sleep(5000);
               
          String s =  driver.findElement(By.id("table-body-positions")).getText();
         
                System.out.println(s);
               
          t = new TableParser(s);
         
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.