语句没错,跑起来结果就是failed...健壮性健壮性

上一篇 / 下一篇  2012-04-24 22:18:38 / 个人分类:Selenium

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
//import static org.junit.Assert.*;

public class login extends SeleneseTestCase {
 public void setUp() throws Exception {
  setUp("http://www.headin.cn/", "*chrome");
 }
 public void testTest123() throws Exception {
  selenium.open("/");
  selenium.type("id=email", "9580868**@qq.com");
  selenium.type("id=passwd", "a1111**");
  selenium.click("id=sub");
  Thread.sleep(10000);
  //assertTrue(selenium.isTextPresent("退出"));
  if(selenium.isTextPresent("退出")){
   System.out.println(".........");
   String getselotionl = selenium.getLocation();
   System.out.println(getselotionl);
  }
  //System.out.println("after");
  String getselotionl = selenium.getLocation();
  System.out.println(getselotionl);
 }
}


TAG:

MillionRoses 引用 删除 dian106106   /   2012-05-09 10:08:59
WebDriverWait wait = new WebDriverWait(driver,10);                                               
             wait.until(new ExpectedCondition <WebElement>(){
                        @Override
                        public WebElement apply(WebDriver dr) {
                                return dr.findElement(By.linkText("Make xinmsn my homepage"));
                        }}).click();
MillionRoses 引用 删除 dian106106   /   2012-04-27 13:48:46
package ENSG;

import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
//import static org.junit.Assert.*;

public class lianxi2 extends SeleneseTestCase {
public void setUp() throws Exception {
  setUp("http://www.glassesshop.com", "*chrome");
}
public void testTest123() throws Exception {
  selenium.open("/");
  if(selenium.isTextPresent("Sign In")){
   System.out.println(".........");
   String getselotionl = selenium.getLocation();
   System.out.println(getselotionl);
  }
}
}
 

评分:0

我来说两句

日历

« 2024-05-10  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 74582
  • 日志数: 80
  • 建立时间: 2012-04-12
  • 更新时间: 2013-05-21

RSS订阅

Open Toolbar