Does this work for you?

Html

<html><head><title>COnmtect Menu CLicker</title></head>
<body>
<script>
function fillMessage(){
    document.getElementById('message').innerText="You Did It";
}
</script>

<div onContextMenu='javascript:fillMessage();' id=clicker>Right click on 
me</div
<br>
<div id=message></div>

</body>
</html>



ruby

irb(main):008:0> ie.contains_text("You Did It")
=> nil
irb(main):009:0> ie.div(:id , /clicker/).fire_event("onContextMenu")
=> ""
irb(main):010:0> ie.contains_text("You Did It")
=> 19


What you are trying to do with the right click means this may or may not 
work for you


Paul




----- Original Message ----- 
From: "Paul Rogers" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, February 23, 2007 1:35 PM
Subject: Re: [Wtr-general] How to simulate right click on particular element 
?


> You are more likely to get a fix if you send some html and a failing unit
> test. Make it as simple as possible though.
>
> Paul
>
>
>
> ----- Original Message ----- 
> From: "Vamsee Krishna" <[EMAIL PROTECTED]>
> To: <[email protected]>
> Sent: Friday, February 23, 2007 8:06 AM
> Subject: [Wtr-general] How to simulate right click on particular element ?
>
>
>> If you take look at fire_event method in ruby there is no way to simulate
>> mouse right click.  Sending APPSKEY though send_keys is not an option
>> since because upon right click dhtml based div menu is shown.
>>
>> When there will be a fix available for this problem ?
>> ---------------------------------------------------------------------
>> Posted via Jive Forums
>> http://forums.openqa.org/thread.jspa?threadID=6673&messageID=19141#19141
>> _______________________________________________
>> Wtr-general mailing list
>> [email protected]
>> http://rubyforge.org/mailman/listinfo/wtr-general
>>
>
>
> _______________________________________________
> Wtr-general mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-general
> 


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to