Go to Python Selenium FAQ list

Source: Internet
Author: User
Tags xpath

How do you use Chromedriver?

Download the latest driver version from here and unzip the  # OK, this command is for Linux or OSX users to prepare the # Windows users direct hand point by ethanol unzip Chromedriver_linux32_x.x.x.x.zip    you will get a chromedriver executable file. Now you can use the following code:  driver = Webdriver. Chrome (executable_path= "/path/to/chromedriver") # windows, if not yet, throw chrome driver under the Python installation directory by ethanol    Does the 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. So what the browser supports, what selenium supports. If those wonderful browsers do not have an XPath engine (ie6,7,8), then in these big Uncle Selenium only support xpath1.0.   How can I scroll 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 native JavaScript API so you can roll wherever you want.   The following code demonstrates how to scroll to the bottom of the page:  driver.execute_script ("Window.scrollto (0, document.body.scrollHeight);") Window

Go to Python Selenium FAQ list

Related Article

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.