Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/349.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python selenium send_键生成错误字符_Python_Selenium - Fatal编程技术网

python selenium send_键生成错误字符

python selenium send_键生成错误字符,python,selenium,Python,Selenium,我在一台远程ubuntu机器上运行了一些测试,发现了一个奇怪的bug: 如果我尝试使用send_键将这些键中的任何一个发送到输入,则它们无法到达输入 5 creates a backspace 6 creates a Shift+Tab ^ creates a Tab % creates a backspace ? creates a Enter 这只发生在Chrome+Selenium+Python 2.7上 Selenium is 2.46.0 Chrome is 43.0.2357.81

我在一台远程ubuntu机器上运行了一些测试,发现了一个奇怪的bug:

如果我尝试使用send_键将这些键中的任何一个发送到输入,则它们无法到达输入

5 creates a backspace
6 creates a Shift+Tab
^ creates a Tab
% creates a backspace
? creates a Enter
这只发生在Chrome+Selenium+Python 2.7上

Selenium is 2.46.0
Chrome is 43.0.2357.81 Ubuntu 14.04 (64-bit)
ChromeDriver is 2.15.322488sud
有什么线索可以让我开始调查这件事吗

编辑:一些我用来调试的代码

from selenium.webdriver.common.keys import Keys
import time
import string
allchars = string.letters + string.punctuation + string.digits
from selenium.webdriver import Firefox
from selenium.webdriver import Chrome
b1 = Firefox()
b2 = Chrome()
b1.get("http://google.ro")
b2.get("http://google.ro")
i1 = b1.find_element_by_id('lst-ib')
i2 = b2.find_element_by_id('lst-ib')
for l in allchars:
    i1.send_keys(l)
    i2.send_keys(l)
    time.sleep(1)
    if i1.get_attribute('value') != l:
        print "mismatch",b1,l
    if i2.get_attribute('value') != l:
        print "mismatch",b2,l
    i1.send_keys(Keys.BACKSPACE)
    i2.send_keys(Keys.BACKSPACE)

EDIT2:将包升级到ubuntu-x64可用的最新版本后,问题仍然存在,但仅限于这些字符
%/-5
。我将把它发布到bugtracker上。

请显示相关代码。另外,Firefox是否可以复制?谢谢。我甚至在谷歌搜索上也遇到了这个问题。Firefox工作正常。目前正在尝试寻找更新的软件包。如果这是一个可靠的可复制错误,为什么不这样对待它呢?在我的电脑里一切顺利:win7+py2.7+chrome'43.0.2357.124',顺便说一句,我输入的url:
https://www.google.ro/?gws_rd=ssl
请显示相关代码。另外,Firefox是否可以复制?谢谢。我甚至在谷歌搜索上也遇到了这个问题。Firefox工作正常。目前正在尝试寻找更新的软件包。如果这是一个可靠的可复制错误,为什么不这样对待它呢?在我的电脑里一切顺利:win7+py2.7+chrome'43.0.2357.124',顺便说一句,我输入的url:
https://www.google.ro/?gws_rd=ssl