You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python 3 support: NameError: 'unicode' is not defined when 'Wait Until Page Contains' text #809
I tried to get the latest master to work with python 3.6.1, but when running the following test I get a stack trace about unicode support (something that changed between python 2 and 3):
*** Settings ***
Documentation This is basic info about the whole suite
Library Selenium2Library
*** Variables ***
*** Test Cases ***
User must sign in to check out
[Documentation] This is some basic info about the test
[Tags] Smoke
Open Browser http://www.amazon.com chrome
Wait Until Page Contains Your Amazon.com
Input Text id=twotabsearchtextbox Ferrari 458
Click Button xpath=//*[@id='nav-search']/form/div[2]/div/input
Wait Until Page Contains results for "Ferrari 458"
Click Link css=#result_0 a.s-access-detail-page
Wait Until Page Contains Back to search results
Click Button xpath=//*[@id='add-to-cart-button']
Wait Until Page Contains Added to Cart
Click Link Proceed to checkout
Page Should Contain Element xpath=//*[@id='hlb-ptc-btn-native']
Sleep 3s
Close Browser
*** Keywords ***
KEYWORD Selenium2Library . Wait Until Page Contains Your Amazon.com
Documentation:
Waits until text appears on current page.
Start / End / Elapsed: 20170522 19:18:18.463 / 20170522 19:18:24.097 / 00:00:05.634
19:18:24.097 FAIL NameError: name 'unicode' is not defined
The unit and acceptance test did pass in my local environment and the code contains bunch of TODO comments which needs to be removed but it should work. If you want, you could give it a try and I would gladly take feedback.
changed the title [-]NameError: 'unicode' is not defined when 'Wait Until Page Contains' text[/-][+]Python 3 support: NameError: 'unicode' is not defined when 'Wait Until Page Contains' text[/+]on May 23, 2017
I actually thought so but could not find an open issue. Perhaps the original issue was closed... But code is merged to master and therefore closing this one too
Activity
aaltat commentedon May 23, 2017
This is actually the last thing to be fixed for the Python 3 support. The good news is that that there is a fix in my Selenium2Library fork: https://github.com/aaltat/robotframework-selenium2library/tree/python_3_support?files=1
The unit and acceptance test did pass in my local environment and the code contains bunch of TODO comments which needs to be removed but it should work. If you want, you could give it a try and I would gladly take feedback.
[-]NameError: 'unicode' is not defined when 'Wait Until Page Contains' text[/-][+]Python 3 support: NameError: 'unicode' is not defined when 'Wait Until Page Contains' text[/+]aaltat commentedon May 23, 2017
Made a PR: #810 so that it easier to find and contains some code cleanup too.
pekkaklarck commentedon May 23, 2017
Isn't there already an open issue about Py3? This should be closed as its dupe. And soon the original can be closed too!
Python 3 support (#810)
aaltat commentedon May 23, 2017
I actually thought so but could not find an open issue. Perhaps the original issue was closed... But code is merged to master and therefore closing this one too
pekkaklarck commentedon Sep 26, 2017
#479 covers Python 3 support.