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

FindByScript #181

Closed
Xcaciv opened this issue Mar 20, 2018 · 0 comments
Closed

FindByScript #181

Xcaciv opened this issue Mar 20, 2018 · 0 comments

Comments

@Xcaciv
Copy link

Xcaciv commented Mar 20, 2018

Programmers appreciate being able to leverage their existing knowledge. Often there are libraries in the web application under test that the user is familiar with. Being able to use these to select nodes would reduce barrier to entry and build time on tests. Granted, this may not be the cleanest solution since it bypasses some of the value of Selenium webdriver, so I would understand if this functionality would need to be an external package.

I was trying to implement this, but decided I would ask to see what the best placement for it would be. I think can select a node with something like Jquery and cast it to IEnumerable by doing something like:

var aWebElement = (IEnumerable<IWebElement>)browser.ExecuteScript("$('#foo').parent('a')");

From there it would be nice to be able to do something like

scope.FindbyScript("$('#foo').parent('a')").Click();

If this makes sense, is there a way to unobtrusively add an extension? If so, where would be best? Because I would find great use for it, I would be happy to implement it myself.

@obstar obstar closed this as completed Apr 18, 2021
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

No branches or pull requests

2 participants