JS's processing scroll bar

Source: Internet
Author: User

According to leisurely book to deal with. Finding my version won't work. Just walk the road. Turn away. Instead, it got through. Do not know for Mao. It's going to work.   Version: Chrome62,selenium 3.8.0 language: Python 2.7.6 js scroll bar processing: Learn the various ways online JS = "var q=document.body.scrolltop= 100000 "Scroll to the bottom js1 =" var q=document.body.scrolltop=0 "scroll to top   from Selenium import webdriverimport timeoptions = Webdriver. Chromeoptions () options.add_argument ("start-maximized") Driver = Webdriver. Chrome (chrome_options=options) driver.get (' https://www.cnblogs.com/yoyoketang/?_wv=1031 ') driver.implicitly_wait (+) Driver.execute_script (JS) time.sleep (2)   personally tested, found this way can not scroll to the bottom of the Department (online information, whether the use of the lower version of Chrome's browser caused the problem, It's still a matter of selenium. I will not delve into, can use on behalf of your use case can go down) js = "var q=document.documentelement.scrolltop=100000" scroll to the bottom js = "var q= Document.documentelement.scrolltop=0 "Scroll to top  from selenium import webdriverimport timeoptions = Webdriver. Chromeoptions () options.add_argument ("start-maximized") Driver = Webdriver. Chrome (chrome_options=options) driver.get (' https://www.cnblogs.com/yoyoketang/?_wv=1031 ') driver.implicitly_wait (+) Driver.execute_script (JS)Time.sleep (2)   Pro test can go to the top. (It is doubtful if the chrome version is 62) use the body in a way that cannot be used to the top and bottom while using documentelement.srolltop can be dragged to the tops and bottoms      

JS's processing scroll bar

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.