theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 311 forks source link

Leadfoot 2.3 is using invalid argument type for switchToFrame #1083

Closed jason0x43 closed 4 years ago

jason0x43 commented 4 years ago

The leadfoot 'Session - frame switching' self test fails for at least Chrome 79+ and Leadfoot 2.3.0 because Session is using string IDs for frames, which isn't valid for W3C mode.

jason0x43 commented 4 years ago

In the frame switching test of the 2.3 self tests, session.capabilities.usesWebDriverFrameId is false (along with other webdriver-related flags). It shouldn't be for Chrome 79.

jason0x43 commented 4 years ago

The problem appears to be that the tests in Server are calling some session commands that are self-correcting (if a feature flag hasn't been set yet, the command will set the flag to and try fallback logic). This can cause the tests to pass when they shouldn't, and the corresponding flags to be set to the wrong values. The next time one of the related session commands is called, it will be using the incorrect flag value.

jason0x43 commented 4 years ago

Another aspect this problem, and possibly the root of it, is that the frame ID check is looking for a NoSuchFrame error rather than InvalidArgument.

jason0x43 commented 4 years ago

This was added to leadfoot in https://github.com/theintern/leadfoot/commit/0bb35b2d1e58ace235a36b3c67810b71f7678126