-
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
Expose handy selenium wrappers to C# #327
Comments
I will make a new class that exposes everything properly to C#. I can work on that some today. It should not be too hard fortunately. |
Before I go further, can you look at the C# version https://github.com/lefthandedgoat/canopy/blob/cswrapper/csharptests/Program.cs compared to the F# version https://github.com/lefthandedgoat/canopy/blob/cswrapper/tests/basictests/Program.fs And see that the API is acceptable to you? |
I actually think I am done. Give the commits a review and let me know what you think. |
Thank you! I like it. I'll have some time next week to put together a POC. We have a whole lot of tests that might be a lot more reliable on top of something like Canopy. |
Ok cool. I will do a build tonight/tomorrow for you and publish to nuget. |
https://www.nuget.org/packages/canopy/1.1.0 Please let me know if you have any problems, find gaps, or need help! Enjoy! |
Worth mentioning here. /cc @KevM Consider using indexers: _.test["Value 1 listed in #value_list"] = () =>
{
_.url(testpage);
_.startEq("", "");
} public Action this[string key]
{
set { /* */ }
} |
We're a C#-Dev team, too. All testing in nunit so far. I started with canopy in f# as a poc for web testing and the team was excited. Now I discovered the new C# wrapper, which fits completely our needs. Currently I'm getting the following exception when using _.displayed(".alert-danger"):
A short look at csharp.fs shows:
It should be selector instead value, shouldn't it? Sorry when I posted it in the wrong section. I'm still very new to the github workflow :-) Thanks in advance! |
Yep you found a bug. Let me fix it and review all the other methods for copy/paste errors and I will create a new build for you. |
Good find. Sorry the whole thing was done rather quickly with limited testing. You can find a fixed build here: https://www.nuget.org/packages/canopy/1.1.2 Thanks again! |
I have to thank for the quick response and the new nuget package. |
Sure no problem! |
@lefthandedgoat this has been done right? Link? |
I am working on a team with zero F# experience and intent to adopt F# πββοΈ I'm working on that but in the meanwhile we are starting to do a lot of end to end testing with Selenium. I am running into issues where their polling FindElement(s) wrappers are not as battle tested as Canopy's.
What if we could export the excellent mechanisms to be something consumable in C#. Maybe a string extension or some such. No idea where this could go but not re-inventing the Selenium wrapper wheel in C# would be really nice.
The text was updated successfully, but these errors were encountered: