???????????????
???????????? ???????[ 2013/1/15 10:30:09 ] ????????
??????????????????????????????????????????????????????????Ч??????????????????????????????????????????á?????????????????£????????????????????
?????????????/????????????????к?????磬????????????QTP??Selenium????????????LoadRunner??JMeter????乤??????????????“??????”??“????????”?????“???????”???????“??????”???????γ?“???????”??
?????????????Щ??????????????????ж?????????????????Selenium??????з??????????????????????????????????????????????????????
????Selenium?????Web????????????????????????д????????????????????????????Web??y??к?в????????????????????????????????? ????????????????????????????????????????????????????????????????????磬RobotFramework??????????????Selenium??IDE??Remote Control?????RC????WebDriver??Grid???????????
?????? Selenium IDE
????????????????/??????????Firefox??????????????????????????Selenium RC????????Java??Ruby??C#??????????????????????????????????????????
?????? Selenium RC
????RC??Server??Client?????????????Server???????/??????????????HTTP??????????Web????Clinet???????????????????TestNG??JUnit??NUnit?????
?????? Selenium WebDriver
????WebDriver???Selenium2?????????????RC??????????API???????????RC?????????????????????????????????????????????????Server??
?????? Selenium Grid
??????Selenium??????????????????????????????????????????в??????ж??RC??WebDriver??????
????Selenium RC?????????????????“???”JS?????????????????????????Selenium WebDriver?????????????????????????????????????????WebDriver????????W3C?淶?????????Google??Mozilla????????????????
????WebDriver?淶????????????????????????????????????????????????????????????????????????Web??????????????WebDriver??????????findElement????????DOM????WebElement???????WebElement?????DOM??????в?????????????????????????????findElement?????????????λ????Locator?????ID??XPath??CSS????????????????????
????“WebDriver”?????????“Web?????????”?????????????????????????????????????????????????????????????????????????С???й???????δ????????????????ζ??????α??棬??????????????????????????????磬TestNG????????WebDriver??б??????????????
????????????“???????”?????????????WebDriver????“????”??“???”??????????????????????
????1????????б??????“????”???????????????????棺
????webDriver.findElement(By.xpath("//a[contains(@id??'addUserBtn')]//button")).click();
????????????
?????? By.xpath()??????XPath????λ???????
?????? click()???????????????????е????????
????2?????????????棬????“???”??“????”??“????”?????“???”??“????”??“????”???????“????”????????????б???棬???ж????????????
1) String account="autotest2";
2) webDriver.findElement(By.xpath("//div[contains(@id??'account_userForm')]//input")).sendKeys(account);
3) webDriver.findElement(By.xpath("//div[contains(@id??'password_userForm')]//input")).sendKeys("1");
4) webDriver.findElement(By.xpath("//div[contains(@id??'name_userForm')]//input")).sendKeys(account);
5) webDriver.findElement(By.xpath("//div[contains(@id??'sex_userForm')]//input")).click();
6) webDriver.findElement(By.xpath("//span[text()='?']")).click();
7) webDriver.findElement(By.xpath("//div[contains(@id??'birthdate_userForm')]//input")).click();
8) webDriver.findElement(By.xpath("//div[contains(@id??'nationality_userForm')]//input")).click();
9) webDriver.findElement(By.xpath("//span[text()='?й?']")).click();
10) webDriver.findElement(By.xpath("//a[contains(@id??'userSaveBtn')]//button")).click();
11) WebElement ele = webDriver.findElement(By.xpath("//div[text()='"+account+"']"));
12) Assert.assertNotNull(ele);
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11