Sanad Liaquat
Sanad Liaquat

Reputation: 182

Why does this not work on IE9 but works on Firefox?

I am trying to run webdriver tests on IE. My script works on Firefox but not on IE9. I am using selenium-webdriver version 2.5.0 with ruby 1.8.7 patch level 352

Here is my ruby script:

require 'rubygems'
require 'selenium-webdriver'


driver = Selenium::WebDriver.for :ie
driver.navigate.to "http://www.gapinc.com/"

element = driver.find_element(:name, 'search')
element.send_keys 'Employees'
element.submit

puts driver.title

driver.quit

On IE9, I get Unable to find element with name == search (Selenium::WebDriver::Error::NoSuchElementError) and it passes on Firefox

Upvotes: 0

Views: 291

Answers (1)

nilesh
nilesh

Reputation: 14279

It may be sync issue. Did you try using ImplicitlyWait or WebDriverWait?

Upvotes: 1

Related Questions