class YoptaSwitcher::SeleniumDriverAdapter
Attributes
driver[R]
wait_instance[R]
Public Class Methods
new(driver:, wait_instance:)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 5 def initialize(driver:, wait_instance:) @driver = driver @wait_instance = wait_instance end
Public Instance Methods
clear(element)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 34 def clear(element) element.clear end
click(element)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 26 def click(element) element.click end
fill_in(element, input_string)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 18 def fill_in(element, input_string) element.send_keys(input_string) end
find_element(finder_args)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 22 def find_element(finder_args) driver.find_element(finder_args) end
quit()
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 38 def quit driver.quit end
submit(element)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 30 def submit(element) element.submit end
visit(url)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 10 def visit(url) driver.navigate.to(url) end
wait(&block)
click to toggle source
# File lib/yopta_switcher/selenium_driver_adapter.rb, line 14 def wait(&block) wait_instance.until(&block) end