WebDriverWait times out, but I see element load

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

WebDriverWait times out, but I see element load

slipeternally
I am working with Selenium in Visual Studio with C#. When I run the code in debug mode, everything works fine. But, when I compile it and try to run it, I get timeout errors:

private IWebElement txtEmail => new WebDriverWait(driver, TimeSpan.FromSeconds(30)).Until(d => d.FindElement(By.Id("uemail")));

I am trying to use Selenium for something it was not actually built for. I am trying to have me code navigate a third party website and download a daily report rather than having a user do it, so I do not want it to have to run in Visual Studio. Is this something that anyone else has encountered? Is there a workaround? I understand that Selenium is typically used in Visual Studio for testing, so perhaps Selenium is not the correct development tool for what I am trying to do. It is just what I am most familiar with.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a0afee18-1ade-4eec-b8b4-64d5e6ad4ca4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: WebDriverWait times out, but I see element load

slipeternally
I found the solution here: https://groups.google.com/forum/#!msg/selenium-users/TdY_rRNF-gw/fEO4FL16IJMJ

On Tuesday, June 5, 2018 at 8:43:24 AM UTC-4, [hidden email] wrote:
I am working with Selenium in Visual Studio with C#. When I run the code in debug mode, everything works fine. But, when I compile it and try to run it, I get timeout errors:

private IWebElement txtEmail => new WebDriverWait(driver, TimeSpan.FromSeconds(30)).Until(d => d.FindElement(By.Id("uemail")));

I am trying to use Selenium for something it was not actually built for. I am trying to have me code navigate a third party website and download a daily report rather than having a user do it, so I do not want it to have to run in Visual Studio. Is this something that anyone else has encountered? Is there a workaround? I understand that Selenium is typically used in Visual Studio for testing, so perhaps Selenium is not the correct development tool for what I am trying to do. It is just what I am most familiar with.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/d2d6f028-e7fa-4f72-850e-d5cb9c921470%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.