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
Fix #756 GetValue From Lookup don't work properly #764
Fix #756 GetValue From Lookup don't work properly #764
Conversation
… Demo Tests when Login intentional fail
…er do not get closed (Fix previous Issue that was solved with driver.Throw <= remove this)
# Conflicts: # Microsoft.Dynamics365.UIAutomation.Api.UCI/WebClient.cs # Microsoft.Dynamics365.UIAutomation.Sample/UCI/Login/Login.cs
…Result Data Independent
Microsoft.Dynamics365.UIAutomation.Browser/Extensions/SeleniumExtensions.cs
Show resolved
Hide resolved
Microsoft.Dynamics365.UIAutomation.Browser/Extensions/StringExtensions.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to Fix Alls samples Tests: Fix Some Bugs, take advantage of the new Logic in Selenium Extensions methods. Refactor some methods & remove some duplicated code. Fix some Navigation Issues.
Convert tolower is it intentional in private string[] TryGetValue(IWebElement fieldContainer, LookupItem[] controls) method? |
Type of change
Description
Fix #756 GetValue From Lookup don't work properly
At least in the cases that I check for 5 different lookup controls.
Account -> Owner (on header)
Account -> Primary Contact
Account -> Currency
Contact -> Account
Contact -> Company
The new XPath to the text value in UCI look like:
//div[data-id="[NAME].fieldControl-LookupResultsDropdown_[NAME]_selected_tag_text"]
I found that the implementation of GetValue(LookupItem[]) from PR #515 use a similar XPath.
{ "Entity_LookupFieldExistingValue", "//*[@data-id='[NAME].fieldControl-LookupResultsDropdown_[NAME]_selected_tag']" }
The implementation of #515 was refactored in previos PRs, but still having the same logic, described as follow:
There is two different implementations for GetValue From Lookups:
It's look like 2 works fine for also 1. But the current implementation of 1. is no longer working (Issue on GetValue From Lookup #756)
Fixed on the on the top of the previous PR #754 one commit, 2 files.
This PR Unify the Logic of GetValue with LookupItem & LookupItem[]
The new Implementation, use in both cases the same logic but:
GetValue(LookupItem)
returns for a Single Value Lookup an String Value or an Empty String (as before)
but also returns a "; " separated values for a Multi-Values-Lookup
GetValue(LookupItem[])
returns for a Single Value Lookup an String[] with just one Value or an Empty String[]
returns for a Multi-Values-Lookup an String[] (as before)
Optional: this logic can also be adapted to return "null" instead empties string & string[].
Issues addressed
Fix #754
All submissions:
Which browsers was this tested on?