Do you know why it doesn't work on Firefox? It might be worth rescuing the Firefox errors and then capturing the HTML when it sometimes doesn't work. If the HTML looks OK then maybe it's a timing issue and maybe you just need to wait a bit longer when clicking. If it's different for some reason then you can add some conditional logic to handle the Firefox case.
________________________________ From: "[email protected]" <[email protected]> To: [email protected] Sent: Friday, December 21, 2012 8:22 AM Subject: [wtr-general] Using xpath vs span to get elements (one works on IE and Firefox but the other one only in IE) I am new to Watir framework and we have a code like $browser.link(:xpath, "//a[@href='/servlets/ProcessAction?identifier=createMemberAccountTypes&click1=Accounts_Open']").click . But this works well on IE but not on Firefox always. So we use something like $browser.span(:text => "Logout").parent.click However we dont want to write one for IE and one for Firefox. What should we use? Thank you for your time. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
