Scrolling using Selenium WebDriver with Java

前端 未结 8 1933
长情又很酷
长情又很酷 2020-12-25 08:47

I am using Selenium WebDriver to automate my browser tests. My browser header is floating and is always present irrespective of the browser scroll.

<
8条回答
  •  有刺的猬
    2020-12-25 09:53

    Simple use the .sendKeys(Keys.PAGE_DOWN); when your element was visible, just click on it, by .click(element).perform(); for me work something like this:

    clicker = new Actions(driver);
        clicker.sendKeys(Keys.PAGE_DOWN);
        Thread.sleep(1000);
        clicker.click(button).perform();     
        Thread.sleep(1000);
    

提交回复
热议问题