Skip to content

Commit

Permalink
hacked in a click_jquery that will call $(element).trigger("click") s…
Browse files Browse the repository at this point in the history
…o that my unobtrusive jquery stuff can be called. Theres surely a better way, just dropping this in as a temp fix.

Signed-off-by: bendyworks <stephen@bendyworks.com>

Signed-off-by: Dave Hoover <dave.hoover@gmail.com>
  • Loading branch information
Brian Cooke authored and redsquirrel committed Aug 3, 2009
1 parent ccf5cb7 commit d1cc3fe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/safariwatir.rb
Expand Up @@ -235,6 +235,12 @@ def click
end
end

def click_jquery
@scripter.highlight(self) do
click_link_jquery
end
end

def tag; "A"; end
end

Expand Down
9 changes: 9 additions & 0 deletions lib/safariwatir/scripter.rb
Expand Up @@ -328,6 +328,15 @@ def click_link(element = @element)
end
end

def click_link_jquery(element = @element)
click = %/
$(element).trigger('click');
/
page_load do
execute(js.operate(find_link(element), click))
end
end

def operate_on_link(element)
js.operate(find_link(element), yield)
end
Expand Down

0 comments on commit d1cc3fe

Please sign in to comment.