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

Find Element where attribute value contains #26

Closed
adeel41 opened this issue Nov 17, 2014 · 0 comments
Closed

Find Element where attribute value contains #26

adeel41 opened this issue Nov 17, 2014 · 0 comments
Milestone

Comments

@adeel41
Copy link
Contributor

adeel41 commented Nov 17, 2014

we should make XenonElementsFinder extensible so that you can search elements by different ways but it should not pollute the XelementElementsFinder API? so rather than having different methods for searching elements differently we can ask for a spec argument and do accordingly.

For example, I want to search elements by 'attribute value contains', so solution 1 is to add following method

AttributeValueContains(string attributeName, string attributeValue)

or change AttributeIs method to accept a spec. e.g.

AttributeIs(FindSpec spec)

and then use it like this

Click(where => where.Attribute( AttributeSpec.Name("data-modal").Value.Contains("test") ) );
/// or you can use .Exact , .BeginsWith, .EndsWith, DoesNotContain, etc.

this is just an example, we can discuss about api.

@jrote1 jrote1 added this to the 0.1.1 milestone Nov 18, 2014
@jrote1 jrote1 closed this as completed in 2f965af Jan 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants