得到如下错误:
C:\Ruby\Scripts>W9_File_delete_v1.rb
C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdr
iver/common/timeouts.rb:33:in `page_load=': undefined method `setTimeout' for #<
Selenium::WebDriver::Driver:0xa3263e4 browser=:firefox> (NoMethodError)
from C:/Documents and Settings/rakshiar/My Documents/userdata/Ruby/Scrip
ts/W9_File_delete_v1.rb:19:in `<main>'
使用以下代码:
#--------------------------------------------------------------
#Creating here Firefox Browser agent to get into the
#file deletion process
#--------------------------------------------------------------
driver = Selenium::WebDriver.for :firefox
driver.get "https://demo.com/"
#driver.manage.timeouts.implicit_wait = 200 # seconds
pgload = Selenium::WebDriver::Timeouts.new(driver)
pgload.page_load=(300)
我可以帮忙吗?