Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

AutomationElement Enter functionality and XPath support implemented.. #391

Open
nijakanthan wants to merge 7 commits intoTestStack:master from
nijakanthan:master
Open

AutomationElement Enter functionality and XPath support implemented.. #391
nijakanthan wants to merge 7 commits intoTestStack:master from
nijakanthan:master

Conversation

@nijakanthan
Copy link

@nijakanthan nijakanthan commented Mar 1, 2016

  • 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])

jcfain reacted with thumbs up emoji
Copy link
Contributor

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

Copy link

jcfain commented Feb 14, 2017
edited
Loading

I would love to see xpath support released.

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?

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.

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /