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

NullReferenceException from Canopy #404

Closed
haf opened this issue Feb 28, 2018 · 3 comments
Closed

NullReferenceException from Canopy #404

haf opened this issue Feb 28, 2018 · 3 comments

Comments

@haf
Copy link

haf commented Feb 28, 2018

https://github.com/lefthandedgoat/canopy/blob/master/src/canopy/canopy.fs#L192

System.NullReferenceException: Object reference not set to an instance of an object.
   at canopy.core.suggestOtherSelectors$cont@192(String cssSelector, Unit unitVar) in C:\projects\canopy\src\canopy\canopy.fs:line 192
   at canopy.core.findByFunction[a,b,c](String cssSelector, a timeout, FSharpFunc`2 waitFunc, b searchContext, Boolean reliable) in C:\projects\canopy\src\canopy\canopy.fs:line 273
   at canopy.core.unreliableElements(String cssSelector) in C:\projects\canopy\src\canopy\canopy.fs:line 307
   at canopy.core.someElement(String cssSelector) in C:\projects\canopy\src\canopy\canopy.fs:line 333
   at [email protected](Unit unitVar0) in C:\dev\tradera\EndToEndTests\Program.fs:line 26
   at [email protected](Unit unitVar)
   at [email protected](AsyncParams`1 args)

Repro:

        ftestCase "create a new draft" <| fun () ->
            start firefox
            url "https://tradera.com"
            someElement "button[aria-label='Meny']" |> Option.iter click
            click "a[aria-label='Skapa annons']"
@lefthandedgoat
Copy link
Owner

Thanks! I will get this fixed for you on Friday.

@haf
Copy link
Author

haf commented Mar 1, 2018

No rush =). Thanks for the awesome library.

@lefthandedgoat
Copy link
Owner

I wasn't able to reproduce this, but given then stacktrace I put fixes in for the two places that may have a null ref. You can download the latest package here:

https://www.nuget.org/packages/canopy/1.6.3

Thanks haf!

@haf haf closed this as completed Mar 3, 2018
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