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] NoSuchElementException for email input field during login in system with single sign-on

See original GitHub issue

Bug Report

EasyRepro Version

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

UCI or Classic Web

  • UCI (XrmApp)
  • Classic Web (XrmBrowser)

Online or On Premise

  • Online
  • On Premise

Browser

  • Chrome (v73)
  • Firefox
  • IE
  • Edge

Describe the bug
Upon running the test identified by Microsoft.Dynamics365.UIAutomation.Sample.Web.CreateAccount.WEBTestCreateNewAccount following call xrmBrowser.LoginPage.Login(_xrmUri, _username, _password); (here) fails with the exception below as our system will auto-sign-in even in a Chrome incognito session.

OpenQA.Selenium.NoSuchElementException
  HResult=0x80131500
  Message=no such element: Unable to locate element: {"method":"xpath","selector":"//input[@type='email']"}
  (Session info: chrome=73.0.3683.86)
  (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.18363 x86_64)
  Source=WebDriver
  StackTrace:
   at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(String mechanism, String value)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElementByXPath(String xpath)
   at OpenQA.Selenium.By.<>c__DisplayClass19_0.<XPath>b__0(ISearchContext context)
   at OpenQA.Selenium.By.FindElement(ISearchContext context)
   at OpenQA.Selenium.Remote.RemoteWebDriver.FindElement(By by)
   at Microsoft.Dynamics365.UIAutomation.Browser.SeleniumExtensions.<>c__DisplayClass45_0.<WaitUntilAvailable>b__0(IWebDriver d) in [redacted]\EasyRepro-develop\EasyRepro-develop\Microsoft.Dynamics365.UIAutomation.Browser\Extensions\SeleniumExtensions.cs:line 591
   at OpenQA.Selenium.Support.UI.DefaultWait`1.Until[TResult](Func`2 condition)

Code to reproduce
See this.

Expected behavior
The code should not throw an exception and continue on line 26.

Additional context
The configuration files has been updated to fit our system.

When logging out in Dynamics 365, closing the browser, opening the browser and going to the Dynamics 365 page again. I am automatically logged in. This is also the case in Chrome incognito.

I am using Chrome 73 because we did not have newer available that was also older than 77, which is the latest Chrome.WebDriver package available in Nuget.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
TYLEROLcommented, Dec 20, 2019

@VivianVoss - We’ve merged a change into the develop branch via #694 . Could you try testing out this new Login method and see if it accommodates your scenario? Based on the description of events, I believe it should.

We’re in a holiday code freeze at the moment, but could get this change into the core releases/v9.1 branch by January 3rd, 2020 if you can confirm this works.

Edit: For the legacy webClient APIs, the code should look like:

xrmBrowser.LoginPage.Login(_xrmUri);

0reactions
VivianVosscommented, Apr 22, 2020

Hi all, I have just tried the tests again but with UCI and it seems to work fine. Thanks for the help 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to sendkeys/type email in google login popup ...
i was able to reach login with google popup window but not able to type in it useing sendkeys help.... i geeting these...
Read more >
Not able to find xpath for field validation error message
I want to identify the xpath for field validation error message "Please enter an email address." Following won't work. because this text appears ......
Read more >
org.openqa.selenium.NoSuchElementException: Unable to ...
to webdriver. Hello All: I am trying to enter text in a field but getting the error: org.openqa.selenium.NoSuchElementException: Unable to locate element.
Read more >
NoSuchElementException
Constructs a NoSuchElementException , saving a reference to the error message string s for later retrieval by the getMessage method.
Read more >
WebElement in Selenium: TextBox, Button, sendkeys(), click()
Let's see the code snippets to get a single element – Text Field in a web page as an object of WebElement using...
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