-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix
mechRepr
on controls to always return a native str.
The error scenario is the following: * A page contains a submit control whose value contains a non-ASCII character. * There is also a select with options or a text input field. * browser.getControl() is used to select a _not_ existing control. * TestBrowser tries to render the list of possible controls using the mechRepr of the controls. * The previous step fails with a UnicodeDecodeError when joining the mechRepr values of the controls because the ones of select option (aka item) and text field are unicode while the one of the submit control is str but contains a non-ASCII char. As the scenario described above requires the mechRepr to be of the same type I decided to adapt the two remaining control classes which returned unicode to the str approach used by of the majority of the controls.
- Loading branch information
Showing
3 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters