Watir-Webdriver& Internet Explorer 11问题

时间:2015-01-16 12:47:16

标签: watir

我正面临一个奇怪的问题。我正试图在Internet Explorer 11上运行以下watir-webdriver代码并得到奇怪的错误。我在保护模式下运行IE,IEDriverServer也放在正确的路径上。此外,我已在regedit中创建了一个条目,以便在IE 11上运行Watir-webdriver ...在FF上运行以下代码时没有问题。

代码:

require 'watir-webdriver'
browser = Watir::Browser.new :ie
browser.goto 'http://bit.ly/watir-example'
sleep 5
browser.text_field(:name => 'entry.1000000').set 'Watir'
browser.text_field(:name => 'entry.1000001').set "I come here from Australia. \n The weather is great here."
browser.radio(:value => 'Watir').set

错误

    C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.44.0/lib/selenium/we
bdriver/remote/response.rb:52:in `assert_ok': The xpath expression './/input[(no
t(@type) or (translate(@type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstu
vwxyz')!="file" and translate(@type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmn
opqrstuvwxyz')!="radio" and translate(@type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdef
ghijklmnopqrstuvwxyz')!="checkbox" and translate(@type,'ABCDEFGHIJKLMNOPQRSTUVWX
YZ','abcdefghijklmnopqrstuvwxyz')!="submit" and translate(@type,'ABCDEFGHIJKLMNO
PQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')!="reset" and translate(@type,'ABCDEFG
HIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')!="image" and translate(@type,
'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')!="button"
     

和翻译       TE(@类型, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')!= “隐藏”   一个       d翻译(@ type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')!=“d       atetime“和翻译(@ type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstu       vwxyz')!=“date”并翻译(@ type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmn       opqrstuvwxyz')!=“月”和翻译(@ type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdef       ghijklmnopqrstuvwxyz')!=“周”和翻译(@ type,'ABCDEFGHIJKLMNOPQRSTUVWXYZ',       'abcdefghijklmnopqrstuvwxyz')!=“时间”和翻译(@ type,'ABCDEFGHIJKLMNOPQRSTU       VWXYZ','abcdefghijklmnopqrstuvwxyz')!=“datetime-local”并翻译(@ type,'ABCD       EFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')!=“范围”并翻译(@ty       PE, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')!= “COLOR”))   和 @na       me ='entry.1000000'] | .//textarea [@ name ='entry.1000000']'无法评估或        不在WebElement中(Selenium :: WebDriver :: Error :: InvalidSelectorErro

0 个答案:

没有答案