Arun
Arun

Reputation: 67

undefined method `execute_script' for Selenium::WebDriver::Driver:Class (NoMethodError)

I'm trying to remove attribute 'readonly' from field. When i tried to do this via Ruby i'm getting the following error:

element = Selenium::WebDriver::Driver.execute_script("arguments[0].removeAttribute('readonly','readonly')",date_field)

Error:

undefined method `execute_script' for Selenium::WebDriver::Driver:Class (NoMethodError)

How to resolve this error and remove attribute with ruby selenium?

Upvotes: 0

Views: 713

Answers (1)

supputuri
supputuri

Reputation: 14145

Try the below to check if js is working and then try your js.

$browser.execute_script('window.open();')

Upvotes: 1

Related Questions