Clicking Anchor Link in Application: --------------------------------------------
Code for Design: --------------- <div id="dvBanner" class="banners_admin"> <div style="background-color:#e8e6e3;height:26px; float:right; padding-right:10px;padding-left:10px;"> <span id="lblUser">Kumaran</span> | <a title="logout" href="admin/logout.aspx">Logout</a> | <a id="hylAdmin" href="admin/admin.aspx">Your Account Settings</a> </div> Code for Watir-webdriver -------------------------------------------- require 'watir-webdriver' b = Watir::Browser.new b.link(:text,"Logout" ).click and also tried b.link(:href,"admin/logout.aspx").click and b.link(:href,"/logout/").click and b.a(:text => "Logout").click and b.link(:href, /logout/).click Error What i got in Command Prompt: -------------------------------------------- C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/el ements/element.rb:490:in `assert_exists': unable to locate element, using {:text =>"Logout", :tag_name=>"a"} (Watir::Exception::UnknownObjectException) from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir -webdriver/elements/element.rb:118:in `click' from C:/Ruby193/script.rb:16:in `<main>' Kindly Anyone provide Suggestion: Thanks in Advance Ragu -- -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to watir-general+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Clicking Anchor Link in Application: -------------------------------------------- Code for Design: --------------- <div id="dvBanner" class="banners_admin"> <div style="background-color:#e8e6e3;height:26px; float:right; padding-right:10px;padding-left:10px;"> <span id="lblUser">Kumaran</span> | <a title="logout" href="admin/logout.aspx">Logout</a> | <a id="hylAdmin" href="admin/admin.aspx">Your Account Settings</a> </div> Code for Watir-webdriver -------------------------------------------- require 'watir-webdriver' b = Watir::Browser.new b.link(:text,"Logout" ).click and also tried b.link(:href,"admin/logout.aspx").click and b.link(:href,"/logout/").click and b.a(:text => "Logout").click and b.link(:href, /logout/).click Error What i got in Command Prompt: -------------------------------------------- C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/el ements/element.rb:490:in `assert_exists': unable to locate element, using {:text =>"Logout", :tag_name=>"a"} (Watir::Exception::UnknownObjectException) from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir -webdriver/elements/element.rb:118:in `click' from C:/Ruby193/script.rb:16:in `<main>' Kindly Anyone provide Suggestion: Thanks in Advance Ragu