# Winclicker problem

**URL:** <https://www.ruby-forum.com/t/winclicker-problem/153199>\
**Category:** Ruby\
**Created:** [November 13, 2008, 11:15am UTC](https://www.ruby-forum.com/t/winclicker-problem/153199 "2008-11-13T11:15:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erika](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/47e85d/32.png) [@erika](https://www.ruby-forum.com/u/erika)\
**Post date:** [November 13, 2008, 11:15am UTC](https://www.ruby-forum.com/t/winclicker-problem/153199/1 "2008-11-13T11:15:17Z")

</div>

Hi,

I used the following code  
def myclick(button, waitTime = 3)  
w = WinClicker.new  
longName = $ie.dir.gsub("/" , “\” )  
shortName = w.getShortFileName(longName)  
c = "start ruby #{shortName}\watir\clickJSDialog.rb #{button}  
#{waitTime} "  
puts “Starting #{c}”  
w.winsystem©  
w=nil  
end

Then, before the button i want to click that generates the popup, added:  
myclick (“Ok”,3)

But after I updated the ruby it doesn’t have any effect. Another  
command page is opened but it disappears very quickly, maybe is an error  
there but can’t be seen. The IE wasn’t changed in the mean time.Did  
anyone else experienced the same problem?

I would be grateful for any idea.

Thank you,  
Erika
