ncbi / robotframework-pageobjects

Implementation of the Page Object pattern with Robot Framework and selenium. Also facilitates page object pattern independent of Robot Framework
http://ncbi.github.io/robotframework-pageobjects
Other
84 stars 75 forks source link

not able to set robot_alias with unicode string(e.g. “测试”) #67

Closed PpAaLlMmEeRr closed 7 years ago

PpAaLlMmEeRr commented 7 years ago

from pageobjects py script, try to set robot_alias with Chinese string, but not be parse normal in the RIDE, will see somthing like "Adding keyword '测试_LoginPage' to library 'com.test.po.loginpage.LoginPage' failed: Calling dynamic method 'get_keyword_documentation' failed: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)"

@robot_alias(u"测试")   
def assert_float_win_content(self, *args):
    self.floatwin._assert_float_win_content(*args)
    return self
PpAaLlMmEeRr commented 7 years ago

resolve by inherit the page object, and send kwname with utf8 format