0

New to this platform I'm a beginner learning selenium webdriver with c# but I have a problem clicking on a flipping image, I identify the id but it won't click on it. I was told to use wait which really didn't work.
I've used this wait and other ones as listed below:

WebDriverWait waits = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
waits.Until(ExpectedConditions.ElementIsVisible(By.Id("LinkToHomepage"))).Click();

driver.FindElement(By.ClassName("homepageLink")).Click();
var waits = new WebDriverWait(driver, TimeSpan.FromSeconds(10));


IWebElement input = driver.FindElement(By.ClassName("homeLink"));
new Actions(driver).MoveToElement(input).Build().Perform();
1
  • 1
    Please edit your question and add the html code of the element you are trying to click as well as the error you're getting. That will help us to help you solve your problem.
    – Kate Paulk
    Commented Sep 6, 2018 at 11:37

1 Answer 1

0

Use an offset from the element and a static click. If it finds the element then moving down and to the right should put the pointer in the middle of the element then just send a click command. Or the click offset with the element passed in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.