C# Selenium - Finding Element On Continuously Growing Page

后端 未结 3 1075
再見小時候
再見小時候 2020-12-20 02:07

I am trying to find a better way to do this than using:

js.ExecuteScript(\"scroll(0, 1300)\");

I have a page where the data can change maki

3条回答
  •  [愿得一人]
    2020-12-20 02:20

    I started using the below which seems to be working nicely. Thanks for the help all.

               IWebElement bio = SeleniumDriver.FindElement(By.XPath("path"));
                    Actions actions = new Actions(SeleniumDriver);
                    actions.MoveToElement(bio);
                    actions.Perform();
    

提交回复
热议问题