Google Groups Home
Help | Sign in
Selenium not generating event on click of anchor
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Bill Burcham  
View profile
 More options 3 Apr, 21:58
From: Bill Burcham <bill.burc...@gmail.com>
Date: Thu, 3 Apr 2008 13:58:40 -0700 (PDT)
Local: Thurs 3 Apr 2008 21:58
Subject: Selenium not generating event on click of anchor
I've got a behavior bound to an anchor onclick. Works fine. I click
it, the onclick runs.

However when I "click" that anchor via my Selenium RC test (via the
"click" method), the behavior does not seem to run.

Makes me wonder if Selenium is really generating the click event or
whether instead, it's looking at the href and just setting
location.href under the covers (thereby circumventing the behavior).

Are others using Selenium with lowpro? Any ideas?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Haruki Zaemon  
View profile
 More options 3 Apr, 22:31
From: Haruki Zaemon <haruki_zae...@mac.com>
Date: Thu, 3 Apr 2008 14:31:19 -0700 (PDT)
Local: Thurs 3 Apr 2008 22:31
Subject: Re: Selenium not generating event on click of anchor
Not sure about Selenium but I've noticed similar behaviour when
calling a form's submit() method. No onsubmit event seems to be fired.

On 4 Apr, 07:58, Bill Burcham <bill.burc...@gmail.com> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bill Burcham  
View profile
 More options 4 Apr, 00:03
From: Bill Burcham <bill.burc...@gmail.com>
Date: Thu, 3 Apr 2008 16:03:45 -0700 (PDT)
Local: Fri 4 Apr 2008 00:03
Subject: Re: Selenium not generating event on click of anchor
I just tried Selenium RC's fire_event method to see if it did a better
job that click did. To wit:

      fire_event( 'css=a.queryButton', 'click')

And again no joy.

Dig it. I turned on ruby-debug and put a breakpoint in my selenium
test. Then I put a breakpoint right before that fire_event call.  So
when the breakpoint is hit, the Selenium-controlled browser (Safari in
this case) is just sitting there ready to accept input.

At this point I manually click the hyperlink and voilá, the lowpro
behavior is invoked as expected. This tells me that lowpro (and
prototype) are operating in the Selenium-driven Safari instance
(good).  But whether I use selenium's click or fire_event method the
result is the same. It is as if the hyperlink's default behavior is
being invoked (skipping the lowpro-applied behavior). Turns out my
anchor's got an empty href so the default behavior just reloads the
current page--which of course is not what is wanted.

Is there no reliable way to automate end-to-end, in-the-browser,
testing of DHTML apps? I'd try Watir, but it's IE-only-ness is a
problem.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google