Python Selenium???????????Chrome Webdriver?????
???????????? ???????[ 2014/6/19 10:51:54 ] ????????Selenium ????????????
????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
??????????selenium???firefox webdriver??IE webdriver?????ready to use?????????????????Chrome????в????????????Chrome webdriver??Chrome webdriver????Chromium?????????????????????????Firefox driver???IE driver???Щ???????????????????Firefox????????????е????????????chrome???????Щ???????????
????1. WebDriverWait??????
??????????????????????????????ajax???????????????????????????в????????????????????????????????????????????WebDriverWait???driver??????????????????????????????????????????????Chrome?У??????????????????????á?
????2.?Щ??????
?????????????????????Chrome?μ????????????????????????о???????Firefox?μ?????????????????????????????????????????????????Firefox????????????е??????Chrome????????????????????Щ????????
selenium.common.exceptions.WebDriverException: Message: u'unknown error: Element is not clickable at point
selenium.common.exceptions.InvalidElementStateException: Message: u'invalid element state
selenium.common.exceptions.ElementNotVisibleException: Message: u'element not visible
|
????????????????????????radio button????????????????????????????????????????element???????????????????????????????????????????????????????????????????????????????????????????????????????????????????radio button?????????????????????????
????????????????????Chrome????????????WebDriverWait???????????????????????????????“???”????webdriver????????????slow down??????????????????driver??????????????????????????ɡ?
????import time
????#some test code
????time.sleep(2)
????#continue test code
????time.sleep(2)???driver??????????????????к??????????
????3.???????????Χ??????????
?????????????Firefox webdriver????????????????????????????????????????????в???????????????????????????????????Χ???Firefox webdriver?????????????????????????????????????????????????в?????????driver????????????scroll down or up???????
??????????Chrome webdriver?У????????????????????????Χ?????????Element is not clickable at point?????????????????WebDriverWait??????????????????????Timeout????
?????????????Chrome wbedriver??????????????С?????????????????????????????е????????????????????????????????????Χ??????????????в????????????????????
????driver.execute_script("window.scrollBy(0??200)"??"") #???1???200px
????driver.execute_script("window.scrollBy(0??document.body.scrollHeight)"??"") #???1??????????
??????
???·???
??????????????????
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