-
Notifications
You must be signed in to change notification settings - Fork 115
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
more functions accepting IWebElement #93
Comments
Ok I can do this tonight probably. |
I made this change for read, clear, selected, and deselected. It will go into a new build shortly. Which assertions do you think should have this behavior? |
Now available in canopy 0.8.0 |
Thanks a lot!!! |
Something like also would work as ? If so, I can do that, it will take a bit of time because some of the assertions are complicated. Its definitely doable though. |
Yes, I meant something like that.
|
I agree that most functions should work with both IWebElement and a cssselector directly. In my use of canopy I've missed having displayed and notDisplayed as well as check and uncheck that works on IWebElement since I've used elements in order to extract a number of elements. The following shows a practical usecase of both checked and displayed for IWebElement where a graph and checkboxes to toggle graph visibility is used together. In my own code I had to create my own version of check and displayed that worked on IWebElement. let seriesCheckBoxes = elements "div.site-show-on-non-mobile checklist input[type=checkbox]" |> Array.ofList
let seriesGraphs = elements "g.highcharts-series-group g.highcharts-series" |> Seq.take seriesCheckBoxes.Length |> Array.ofSeq
let zipped = Array.zip seriesCheckBoxes seriesGraphs
zipped |> Array.iter (fun (cb, g) ->
check cb
displayed g
) |
I can add this. Thanks for the feedback! |
@ssboisen this change is now available in nuget 0.8.6. If you need anymore changed please let me know! |
Awesome, thank you! |
Closing this. If you would like to see any other features added to canopy open a ticket and I will do my best! |
It would be nice to make more functions to accept IWebElement, not only css selector.
For example,
read
function would be useful in case when you find an element throughelement |> elementsWithin |> List.find
pipeline and want to read its value, or assert its value.I see there is a function
textOf
but it is currently private...Similar for assertions.
The text was updated successfully, but these errors were encountered: