Skip to content
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

AutomationElement Enter functionality and XPath support implemented.. #391

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

nijakanthan
Copy link

  • Bug fixed in AutomationElement Enter functionality.
  • Xpath support implemented for the elements without unique property.

var username = loginWindow.Get(SearchCriteria.ByXPath("//window[@AutomationId='Login']/edit[1]", loginWindow));

Properties can be used in XPath
AutomationId - @AutomationId
ClassName - @ClassName
FrameworkId - @FrameworkId
Name - @Name

If AutomationElement LocalizedControlType contains space it should me replaced with -
Example : title bar - title-bar (//title-bar[1])

@maxinfet
Copy link
Contributor

Could you please split this into three pull request. One for each of the issues / improvements you made.

@jcfain
Copy link

jcfain commented Feb 14, 2017

I would love to see xpath support released.

@Roemer
Copy link
Collaborator

Roemer commented Feb 16, 2017

What I don't like about this xpath solution is that it creates the full graph and then uses xpath to select the appropriate node(s). Wouldn't it be better to implement a custom XPathNavigator which directly navigates the AutomationElements?

@Roemer
Copy link
Collaborator

Roemer commented Feb 17, 2017

You can have a look at https://github.com/Roemer/FlaUI/blob/master/src/FlaUI.Core/AutomationElementXPathNavigator.cs to see an example implementation of a custom XPathNavigator.

@tusarranajan
Copy link

Hi Nijakanthan ,
I implemented this #391 changes separately into my classes and getting it as a List.I cannot get it as a return type of SearchCriteria because of Internal constructor.
So now how can i convert it to a Search Criteria.

Thanks,
Tusar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants