I add a number to a set of numbers on a table I have figured out how to scroll to the number
IWebElement element = wb.wd.FindElement(By.XPath("//span[contains(text(),'1111111111')]"));
((IJavaScriptExecutor)wb.wd).ExecuteScript("arguments[0].scrollIntoView(true);", element);
System.Threading.Thread.Sleep(500);
Now at the top of the current in view screen to the right of my number is an Edit button I would like to click on I do this
wb.wd.FindElement(By.XPath("//input[@type='submit'][@value='Edit']")).Click();
But it scrolls up to the top of the page and clicks the Edit button for the number at the top of the page. How can I click the Edit button I want. Id, names are dynamic as well as CSS xpath and Indexes.
htmlyou are dealing with.