ClassCastException - IE edge and javascript? #339

Closed
ken-p opened this Issue May 17, 2016 · 4 comments

Projects

None yet

2 participants

@ken-p
ken-p commented May 17, 2016 edited

Hello - I'm getting our test suite working with IE Edge, and while a simple test completes (it does the actions in the UI), it fails at the end with:

java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to java.util.List

at com.codeborne.selenide.Selenide.getJavascriptErrors(Selenide.java:573)
at com.codeborne.selenide.ex.UIAssertionError.wrapThrowable(UIAssertionError.java:66)
at com.codeborne.selenide.ex.UIAssertionError.wrap(UIAssertionError.java:59)
at com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:67)

I did find one person on stackoverflow complaining about executing javascript on edge, but otherwise I couldn't find anything. Any ideas?

EDIT: This is on windows 10 build 10240. I'll try it on the latest preview release.

@asolntsev
Member

Ups. It seems that in Edge, this variable is Map, not List:

window._selenide_jsErrors = [];

Hmm... We need to fix it somehow.
I will try to download Edge browser and fix the issue.

@asolntsev asolntsev self-assigned this Aug 3, 2016
@asolntsev asolntsev added this to the 3.8 milestone Aug 3, 2016
@asolntsev asolntsev added the lets do it label Aug 3, 2016
@asolntsev asolntsev added a commit that closed this issue Aug 3, 2016
@asolntsev asolntsev Fixes #339 try to read JS errors even if it's Map, not List
... still not properly tested with Edge browser :( ...
0e11789
@asolntsev asolntsev closed this in 0e11789 Aug 3, 2016
@asolntsev
Member

@ken-p I hope I have fixed it. Thought, I didn't have a change to test it with real Edge browser. Can you try it with latest Selenide 3.8-SNAPSHOT?

@ken-p
ken-p commented Aug 24, 2016

Finally got a chance to look into this. Yep, looks great. Thanks!!

@asolntsev
Member

@ken-p Good, thank you!

@BorisOsipov BorisOsipov added a commit to BorisOsipov/selenide that referenced this issue Nov 23, 2016
@asolntsev @BorisOsipov asolntsev + BorisOsipov Fixes #339 try to read JS errors even if it's Map, not List
... still not properly tested with Edge browser :( ...
e9f88bc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment