Python selenium FAQ list

Source: Internet
Author: User

How to Use ChromeDriver? Download the latest driver version and decompress it # All right, this command is prepared for linux or osx users # For windows users, click it directly. by Ethanol unzip chromedriver_linux32_x.x.x.x.zip, you will get an executable file of chromedriver. now you can use the following code: driver = webdriver. chrome (executable_path = "/path/to/chromedriver") # If windows doesn't work, throw the chrome driver to the python installation directory. Does Selenium 2 support XPath 2.0? Reference: http://seleniumhq.org/docs/03_webdriver.html#how-xpath-works-in-webdriver Selenium delegates xpath processing to the browser's xpath parsing engine. Selenium supports any browser. If the wonderful browsers do not have the xpath engine (IE6, 7, 8), selenium will only support xpath1.0 on these masters. How can I roll to the bottom of the page? Reference: http://blog.varunin.com/2011/08/scrolling-on-pages-using-selenium.html you can use the execute_script method to handle this. Call the API of native javascript so that you can roll wherever you want. The following code demonstrates how to roll to the bottom of the page: driver.exe cute_script ("window. scrollTo (0, document. body. scrollHeight); ") window

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.