level 7
Traceback (most recent call last):
File "E:\workspace\test\src\management\test.py", line 16, in <module>
driver.find_element_by_name("login_name").send_keys("王国梁")
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 303, in send_keys
self._execute(Command.SEND_KEYS_TO_ELEMENT, {'value': typing})
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webelement.py", line 385, in _execute
return self._parent.execute(command, params)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 171, in execute
response = self.command_executor.execute(driver_command, params)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 346, in execute
data = utils.dump_json(params)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\utils.py", line 30, in dump_json
return json.dumps(json_struct)
File "C:\Python27\lib\json\__init__.py", line 243, in dumps
return _default_encoder.encode(obj)
File "C:\Python27\lib\json\encoder.py", line 207, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Python27\lib\json\encoder.py", line 270, in iterencode
return _iterencode(o, 0)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe7 in position 0: unexpected end of data
2015年01月07日 09点01分
4
那位大拿可以帮忙解决下啊!
2015年01月07日 09点01分
level 11
百度:eclipse+pydev 解决中文输入和注释问题
2015年01月08日 08点01分
7
额·按照上面设置了·还是不行
![[泪]](/static/emoticons/u6cea.png)
!我这怎么办啊·
2015年01月08日 10点01分
回复 忙客liang :加的那个语句一定要放到首行。
2015年01月08日 11点01分
同样的问题,我感觉不是中文编码的问题,Selenium的问题,其他代码都是好的
2015年01月09日 07点01分
我找到办法了!是需要加个u的
2015年01月10日 04点01分