follow me icons

Wednesday, June 20, 2012

IE undefined method map for nil class

I get the following error when running webdriver in IE 7 and 8. I am using ruby, Capybara with selenium webdriver version 2.2.24
Undefined method `map` for nil:NilClass (NoMethodError)
or
NoMethodError Exception: undefined method `map` for nil:NilClass
It seems that IE stand alone webdriver could not switch between http to https then to http again correctly and therefore it could not find any of the DOM element. This also cause the error of unable to delete cookie in IE
Selenium::WebDriver::Error:JavascriptError Exception: Unable to delete cookie with name 'cookiename'
The workaround that I have for this Internet explorer webdriver issue is to start the session with https instead of http. This seem to have solve the issue. Alternatively, during the session you can make the test to visit a https page and then visit the current page again.

No comments:

Post a Comment