question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Entity.SelectForm() throwing StaleElement exception

See original GitHub issue

EasyRepro Version

  • Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online

UCI or Classic Web

  • UCI (XrmApp)

Online or On Premise

  • Online

Browser

  • Chrome

Describe the bug
Using Entity.SelectForm() is throwing StaleElement exception.

Code to reproduce
XrmApp.Entity.SelectForm(formName);

 XrmApp.Entity.SelectForm(formName);

–>

Expected behavior
Select the correct form and wait until page is loaded

Screenshots

Additional context

Stack Trace: OpenQA.Selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document (Session info: chrome=81.0.4044.138) RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse) RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) RemoteWebElement.Execute(String commandToExecute, Dictionary2 parameters) RemoteWebElement.get_Location() InteractiveBrowser.EventDriver_ElementClicked(Object sender, WebElementEventArgs e) EventFiringWebDriver.OnElementClicked(WebElementEventArgs e) EventFiringWebElement.Click() <>c.<ClickWhenAvailable>b__2_0(IWebElement e) SeleniumExtensions.WaitUntil(ISearchContext driver, Func2 searchFunc, Nullable1 timeout, Action1 successCallback, Action failureCallback) SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Nullable1 timeout, Action1 successCallback, Action failureCallback) SeleniumExtensions.WaitUntilClickable(ISearchContext driver, By by, Nullable1 timeout, Action1 successCallback, String exceptionMessage) SeleniumExtensions.ClickWhenAvailable(ISearchContext driver, By by, Nullable1 timeout, String errorMessage) <>c__DisplayClass158_0.<SelectForm>b__0(IWebDriver driver) DelegateBrowserCommand1.ExecuteCommand(IWebDriver driver, Object[] params) BrowserCommand1.Execute[T1,T2,T3,T4,T5,T6,T7,T8,T9](IWebDriver driver, T1 p1, T2 p2, T3 p3, T4 p4, T5 p5, T6 p6, T7 p7, T8 p8, T9 p9) BrowserPage.Execute[TResult](BrowserCommandOptions options, Func`2 delegate) WebClient.SelectForm(String formName) Entity.SelectForm(String formName)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
TYLEROLcommented, May 20, 2020

@imartinflores - That’s correct. This change is only in develop, though I plan to release an updated NuGet package either today or tomorrow, depending on when #864 is merged to develop.

-Tyler

0reactions
TYLEROLcommented, May 20, 2020

This has been merged into releases/v9.1 and the latest 9.1.0.17138 NuGet package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium WebDriver How to Resolve Stale Element ...
A StaleElementException is thrown when the element you were interacting is destroyed and then recreated. Most complex web pages these days will ...
Read more >
Stale Element Reference Exception in Selenium Webdriver ...
A stale element reference exception is thrown in one of two cases. To fix this, we use Page Factory, Waits, Loop, or Page...
Read more >
How To Handle Stale Element Reference Exceptions In ...
This tutorial guides you through handling the stale element reference exception in Selenium using Java.
Read more >
How to deal with StaleElementReferenceException in Selenium
Selenium throws a StaleElementReferenceException when the reference to the element you are interacting with is now stale. This means that the ...
Read more >
Stale element reference - WebDriver - MDN Web Docs
The stale element reference error is a WebDriver error that occurs because the referenced web element is no longer attached to the DOM....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found