Advertisement
4tolexx

custom step definitions

Nov 21st, 2024
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.46 KB | None | 0 0
  1. step 'I click button :string on the page' do |locator|
  2.   page.driver.browser.mouse.move(x: 800, y: 600).down
  3.   click_button(locator)
  4.   # find_button(locator).trigger('click')
  5. end
  6.  
  7. step 'I click link :string on the page' do |locator|
  8.   page.driver.browser.mouse.move(x: 100, y: 100).click(x: 100, y: 100)
  9.   click_link(locator)
  10.   # find_link(locator).trigger('click')
  11. end
  12.  
  13.   begin
  14.     Timeout.timeout(10) { debug }
  15.   rescue Timeout::Error
  16.     debugger
  17.   end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement