-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
automated UI tests: Find.Element issue #246
Comments
What is running the tests on the build server? TeamCity? VSTS? ...? Does it always fail on the build server or is it intermittent? Have you added code to take screenshots? What do the screenshots show?
|
Hi Robdmoore Thanks, |
Hi, I test the devexpress GridView loading: How can i add Wait.Until the loading of the callback is completed. I used WaitFor.AjaxCallsToComplete(); but i get this error: $ is undefined (UnexpectedJavaScriptError) |
That'll be because you don't have jQuery loaded on the page. Some of the things in Seleno like the waitfor.ajaxcallstocomplete depend on jQuery being there. The fact it's intermittent probably means it's a timing issue. It may happen on the build server rather than local because the build server is a bit slower so things take longer to load. If you want to put in a wait until a particular element is there then look into the WebDriverWait class (it's part of Selenoium.WebDriver, which Seleno wraps. |
Thanks for your reply, In fact, i get the issue of JavaScriptError in local not in the build server. In the server build, i had another issue of find element: i replaced it by So, i used the way to execute javascript code to click into the element: And this time it works correctly in the server build :) Now, i have the same error of WaitFor.AjaxCallsToComplete(); just in local I tried to use another way to verify that the document is ready and the ajax call are completed by this code: It can be related to the navigator FireFox or the speed of the connexion? Thanks. |
Hello,
I have a problem in my UI Tests: i used Find.Element(By.LinkText()) and Find.Element(By.CssSelector()) and The tests run fine in local (VS2012 ASP.Net project) but when i deploy my tests in the server i reseive the errors of buid in some tests:
Information: [Error] 'TestStack.Seleno.PageObjects.Actions.ElementFinder' Error invoking ElementFinder.Element
Information: [Error] 'TestStack.Seleno.PageObjects.Actions.ElementFinder' OpenQA.Selenium.NoSuchElementException: Unable to locate element: {"method":"css selector","selector":""} at TestStack.Seleno.Extensions.WebDriverExtensions.ElementWithWait(IWebDriver driver, Func`2 elementIsFound, TimeSpan maxWait)
Information: [Error] 'TestStack.Seleno.PageObjects.Actions.ElementFinder' OpenQA.Selenium.NoSuchElementException: Unable to locate element: {"method":"LinkText"} at TestStack.Seleno.Extensions.WebDriverExtensions.ElementWithWait(IWebDriver driver, Func`2 elementIsFound, TimeSpan maxWait)
I tried to run the tests in different versions of Visual Studio 2012,2013, and 2015 and i find the same error of build but in different tests.
I don't know why find.element doesn't work sometimes?
Thanks.
The text was updated successfully, but these errors were encountered: