Closed lukeis closed 8 years ago
These appear to be warnings and don't actually stop the execution of a test script.
Reported by qablogmbox
on 2010-11-24 20:34:54
So does the browser close, or does your test run?
Please post the full code needed to reproduce the problem.
I'm 99% sure the warning isn't coming from our code. The fact that it can't find a
"selenium_driver" method on a Spec::Example class indicates that you're referring to
a selenium_driver variable inside an rspec example somewhere - i.e. it's your own code
that's throwing this error.
Reported by jari.bakken
on 2010-11-25 22:16:58
Yes browser closes. Here is the full code:
describe "test" do
before(:all) do
driver_browser
setup_testing
get_student_email
create_trial_user_through_api("gmat_v2", @student_email)
login_to_site
end
after(:all) do
@browser.quit
end
def login_to_site
email_address = @browser.find_element(:name, 'email')
email_address.send_keys(@student_email)
password = @browser.find_element(:name, 'password')
password.send_keys("test")
@browser.find_element(:class_name, 'primary-button').click()
end
it "Should validate that the element exists" do
#@browser.wait_for_element "css=#video_knewton_experience", :timeout_in_seconds
=> 20 #this is Se RC code. Need the SE2 equivalent
sleep 10
end
end
Associated Functions:
def setup_testing
ensure_user_logged_out
end
def ensure_user_logged_out
@browser.navigate.to SECURE_HOST + "/logout"
end
def driver_browser
if WHICH_BROWSER == "firefox"
@browser = Selenium::WebDriver.for(:firefox)
elsif WHICH_BROWSER == "ie"
@browser = Selenium::WebDriver.for(:ie)
elsif WHICH_BROWSER == "chrome"
@browser = Selenium::WebDriver.for(:chrome)
elsif WHICH_BROWSER == ""
@browser = Selenium::WebDriver.for()
else
@browser = Selenium::WebDriver.for()
end
end
The other 2 functions: get_student_email and create_trial_user_through_api don't
have any selenium driver code in them.
Reported by qablogmbox
on 2010-11-29 21:57:39
Issues resolved. Was combining webdriver and selenium rc requires in my spec helper.
Removed the rc ones and the warnings are gone.
Reported by qablogmbox
on 2010-12-21 20:51:33
Reported by antlong
on 2011-01-20 16:47:08
Invalid
Reported by luke.semerau
on 2015-09-17 18:11:37
Originally reported on Google Code with ID 1036
Reported by
qablogmbox
on 2010-11-24 19:36:10