Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Leadfoot 2.3 is using invalid argument type for switchToFrame #1083

Closed
jason0x43 opened this issue Jan 28, 2020 · 4 comments
Closed

Leadfoot 2.3 is using invalid argument type for switchToFrame #1083

jason0x43 opened this issue Jan 28, 2020 · 4 comments
Assignees
Labels
bug Something that's not working as intended domain-webdriver Related to Intern's webdriver interface (formerly Leadfoot) effort-medium This may take a couple of days priority-medium This should get done, but it's not a high priority repo-leadfoot Resolution applies to @theintern/leadfoot

Comments

@jason0x43
Copy link
Member

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 jason0x43 added bug Something that's not working as intended effort-low Should be pretty quick domain-webdriver Related to Intern's webdriver interface (formerly Leadfoot) repo-leadfoot Resolution applies to @theintern/leadfoot priority-medium This should get done, but it's not a high priority labels Jan 28, 2020
@jason0x43 jason0x43 self-assigned this Jan 28, 2020
@jason0x43
Copy link
Member Author

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 jason0x43 added effort-medium This may take a couple of days and removed effort-low Should be pretty quick labels Jan 29, 2020
@jason0x43
Copy link
Member Author

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 jason0x43 removed their assignment Feb 14, 2020
@jason0x43
Copy link
Member Author

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 added a commit that referenced this issue Feb 17, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
@jason0x43 jason0x43 self-assigned this Feb 17, 2020
jason0x43 added a commit that referenced this issue Feb 17, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
jason0x43 added a commit that referenced this issue Feb 18, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
jason0x43 added a commit that referenced this issue Feb 20, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
jason0x43 added a commit that referenced this issue Feb 21, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
jason0x43 added a commit to theintern/leadfoot that referenced this issue Feb 25, 2020
Backport the fix for theintern/intern#1083, which fixes the handling of
frame IDs in W3C compliant webdriver sessions.
@jason0x43
Copy link
Member Author

This was added to leadfoot in theintern/leadfoot@0bb35b2

jason0x43 added a commit to jason0x43/intern that referenced this issue Jul 13, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references theintern#1083
jason0x43 added a commit that referenced this issue Jul 21, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
jason0x43 added a commit that referenced this issue Aug 10, 2020
The frame ID check in switchToFrame was based on an older version of the
W3C spec that said drivers should return a NoSuchFrame error for an
invalid ID. The current spec says to return InvalidArgument, which is
what current webdrivers tend to do.

references #1083
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something that's not working as intended domain-webdriver Related to Intern's webdriver interface (formerly Leadfoot) effort-medium This may take a couple of days priority-medium This should get done, but it's not a high priority repo-leadfoot Resolution applies to @theintern/leadfoot
Projects
None yet
Development

No branches or pull requests

1 participant