Comments (9)
The latest update should address this change. Let me know if you have the latest changes and the login api doesn't get past this issue.
from easyrepro.
Is it fixed in 8.2 version? I just downloaded the 8.2 version and this issue is still there.
from easyrepro.
That branch has the update. If you check the LoginPage.cs there should be code that looks like below.
if (driver.IsVisible(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn])))
{
driver.ClickWhenAvailable(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn]));
driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn])).Submit();
}
You may be running into another issue. Does it just stop on that page?
from easyrepro.
The LoginPage.cs does have the code you mentioned. The following exception was thrown when executing the following line in the Login method. driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.LoginPassword])).SendKeys(password.ToUnsecureString());
Error Message: {"no such element: Unable to locate element: {"method":"xpath","selector":"//input[@type='password']"}\n (Session info: chrome=61.0.3163.91)\n (Driver info: chromedriver=2.31.488763 (092de99f48a300323ecf8c2a4e2e7cab51de5ba8),platform=Windows NT 10.0.14393 x86_64)"}
I'm using Office 365 authentication, so a password is not needed when logging in from the browser. I have confirmed that the correct online user name and password are stored in App.config.
from easyrepro.
Ok, the login process is expecting the password input to be there. If your authentication is bypassing that step then the API will not work. You will need to either 1) modify the Login API to skip that step or 2) Look at the ADFSLogin.cs sample and use that to build you're own login logic that bypass the password input. Make sense?
from easyrepro.
Interesting, I was able to get it working by putting the thread to sleep for 1 second and commenting out a few lines of code in the Login method as shown below. Is this a valid workaround?
//Wait for a second
Thread.Sleep(1000);
//driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.LoginPassword])).SendKeys(password.ToUnsecureString()); //driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.LoginPassword])).SendKeys(Keys.Tab);
//driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.LoginPassword])).Submit();
if (driver.IsVisible(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn])))
{
driver.ClickWhenAvailable(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn]));
driver.FindElement(By.XPath(Elements.Xpath[Reference.Login.StaySignedIn])).Submit();
}
from easyrepro.
That is a valid workaround that will work for your environment. Just keep in mind that if the authentication changes and requires a password then it will stop working. It's either that or look at the ADFSLogin.cs as an alternative. That sample basically enters the email address, waits for the redirect and then calls your custom method that handles your login page. In your case it won't require a password.
Let me know if you need anything else.
from easyrepro.
Got it, thanks very much Daren for your help!
from easyrepro.
You're welcome!
from easyrepro.
Related Issues (20)
- Compatibility with selenium 4.11 version and CFT
- [BUG] Command Bar not found when header is expanded
- [FEATURE] Get/Retrieve/Search records from timeline
- [BUG] Setting value on Subject field on Case entity (tree-view type)
- [FEATURE] Read the Values from the SLA Timer Section
- [HOW-TO] Run tests on Jenkins
- [HOW-TO] Use with Customer Service Workspace app
- [HOW-TO] <implement read data from excel in easyrepro> HOT 2
- Command xrmApp.Navigation.OpenSubArea("Area", "Sub-Area"); running in Local but failing in pipeline
- How to Close Alert dialogue box of Dynamics crm Opened via Xrm.Navigation.openAlertDialog.
- .NET 6 not .NET Core 6
- Timeout Issue with System.Net.HttpWebRequest.GetResponse()
- [BUG] <Getting webdriver exception "unknown error: unable to discover open pages" when running the test on server through ADO test plan. Code works locally>
- [BUG]GetFormNotifications() does not get notifications text. Get error
- Moving to .NET Core HOT 1
- MFA secret key issue HOT 8
- How to click on the phone (subgrid record header) phone number HOT 5
- Url is not working even after adding & in the url in app.config file HOT 1
- How can I effectively load and execute the EasyRepro framework within Visual Studio Code? HOT 1
- Not able to find xpath from inspect element for any change area options.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyrepro.