watir

OLE error code 80020101 caused by execute_script of waitr

北城余情 提交于 2020-01-24 23:05:15
问题 I just tried this: $browser.execute_script("alert(\"aaa\")") and then I get the error below: h:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.2.0/lib/watir-classic/page-container.rb:46:in `method_missing': (in OLE method `execScript': ) (WIN32OLERuntimeError) OLE error code:80020101 in <Unknown> Could not complete the operation due to error 80020101.HRESULT error code:0x80020009 Exception occurred. from h:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.2.0/lib/watir-classic/page

OLE error code 80020101 caused by execute_script of waitr

∥☆過路亽.° 提交于 2020-01-24 23:04:30
问题 I just tried this: $browser.execute_script("alert(\"aaa\")") and then I get the error below: h:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.2.0/lib/watir-classic/page-container.rb:46:in `method_missing': (in OLE method `execScript': ) (WIN32OLERuntimeError) OLE error code:80020101 in <Unknown> Could not complete the operation due to error 80020101.HRESULT error code:0x80020009 Exception occurred. from h:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-classic-3.2.0/lib/watir-classic/page

how to combine a table headers and rows in to a map using ruby?

核能气质少年 提交于 2020-01-23 13:18:31
问题 While using the pageobject gem am able to get the a headers and rows of a table but am unable to convert it into a hash using the below code am able to get only first row mapped to headers but I need complete table rows mapped to the header. Here is the link for the table data: https://www.w3schools.com/html/html_tables.asp I have tried the below code: class WbPage include PageObject page_url 'https://www.w3schools.com/html/html_tables.asp' table(:customers, id: 'customers') def get_table

Native Events error trying to double-click element using watir-webdriver

a 夏天 提交于 2020-01-16 19:08:07
问题 I am writting automatic test for GWT application. And I try to double click on table element. I am using this code fo click: browser.element(:xpath, '/html/body/div[5]/div[2]/div/div/div/div[2]/div/div/div/div/div/div/div/div[2]/div/div[2]/div/div/table/tbody[2]/tr[1]/td[1]/div').double_click When this command is executed I get error like: test_search(TC_article_example):Selenium::WebDriver::Error::InvalidElementStateError: Cannot perform native interaction: Could not load native events

mootools, watir webdriver onmouseover take no effect

淺唱寂寞╮ 提交于 2020-01-15 10:57:06
问题 My test shows that webdriver fire_event("onmouseover") takes no effect when page has mootools lib. when remove mootools lib, fire_event("onmouseover") takes effect. how can I get a workaround? html page is following: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <script type='text/javascript' src='http://demos111.mootools.net/demos/mootools.svn.js'></script></head> <body> <div onmouseover="document.getElementById('id6').style.display=

Watir: get sometimes a Net::ReadTimeout error by launching chrome browser

大兔子大兔子 提交于 2020-01-14 19:05:13
问题 I just use a watir script to download sequential status infos from a server. In most cases it works fine, but sometimes I get an Net::ReadTimeout error. I don't know why? Code: require "rubygems" require "watir" Watir.default_timeout = 180 # seconds – default is 60 prefs = { :download => { :prompt_for_download => false, :default_directory => path } } browser = Watir::Browser.new :chrome, :switches => %w[--no-sandbox], :prefs => prefs browser.goto 'https://www...' ... Error Message: /usr/lib

Watir: get sometimes a Net::ReadTimeout error by launching chrome browser

自闭症网瘾萝莉.ら 提交于 2020-01-14 19:04:43
问题 I just use a watir script to download sequential status infos from a server. In most cases it works fine, but sometimes I get an Net::ReadTimeout error. I don't know why? Code: require "rubygems" require "watir" Watir.default_timeout = 180 # seconds – default is 60 prefs = { :download => { :prompt_for_download => false, :default_directory => path } } browser = Watir::Browser.new :chrome, :switches => %w[--no-sandbox], :prefs => prefs browser.goto 'https://www...' ... Error Message: /usr/lib

Watir: get sometimes a Net::ReadTimeout error by launching chrome browser

瘦欲@ 提交于 2020-01-14 19:04:06
问题 I just use a watir script to download sequential status infos from a server. In most cases it works fine, but sometimes I get an Net::ReadTimeout error. I don't know why? Code: require "rubygems" require "watir" Watir.default_timeout = 180 # seconds – default is 60 prefs = { :download => { :prompt_for_download => false, :default_directory => path } } browser = Watir::Browser.new :chrome, :switches => %w[--no-sandbox], :prefs => prefs browser.goto 'https://www...' ... Error Message: /usr/lib

Turning a select_list options into a string array in watir-webdriver?

折月煮酒 提交于 2020-01-12 10:47:58
问题 I need to check the contents of a select list drop down which varies depending on a value in another field. I am reading the valid options into an array of strings from a CVS field and comparing by doing the following; selectContent = [] $browser.select_list(:id,"srch-status-select").options.each {|option| selectContent << option.text} assert_equal(validContent,selectContent,"Status drop down has wrong values") Is this correct or is there an existing select_list method which does a similar

Turning a select_list options into a string array in watir-webdriver?

冷暖自知 提交于 2020-01-12 10:45:31
问题 I need to check the contents of a select list drop down which varies depending on a value in another field. I am reading the valid options into an array of strings from a CVS field and comparing by doing the following; selectContent = [] $browser.select_list(:id,"srch-status-select").options.each {|option| selectContent << option.text} assert_equal(validContent,selectContent,"Status drop down has wrong values") Is this correct or is there an existing select_list method which does a similar