Reputation: 11
require 'selenium-webdriver'
caps = Selenium::WebDriver::Remote::Capabilities.firefox
caps['acceptInsecureCerts'] = true
@driver = Selenium::WebDriver.for(:firefox, desired_capabilities: caps)
@driver.navigate.to "https://s1.demo.opensourcecms.com/s/44"
[email protected]_element(:xpath,"//span[contains(text(),'Remove Frame')]").click
p el
Output with following Setup
2.6.0 :006 > @driver.find_element(:xpath,"//span[contains(text(),'Remove Frame')]").click => nil
Environment
selenium-webdriver-3.141.0
Output with the following Setup
2.1.2 :006 > @driver.find_element(:xpath,"//span[contains(text(),'Remove Frame')]").click => "ok"
Environment
Upvotes: 0
Views: 67
Reputation: 50864
click method doesn't return an explicit value, so it returns nil
by Ruby default.
Upvotes: 0