Re: [wtr-general] in `gem_original_require': no such file to load -- win32screenshot (MissingSourceFile)

2010-08-25 Thread Arihan

Have you installed gem install win32ole

If yes use require 'win32ole'

Regards
Arihan
Sent from my iPhone

On 25 Aug 2010, at 12:05, Rajiv Nanduani  
rajivkumarnandv...@gmail.com wrote:



Hi All,

I am facing the problem while running my script
It gives me an error like this

C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in  
`gem_original_require': no such file to load -- win32screenshot  
(MissingSourceFile)
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/ 
custom_require.rb:31:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/ 
active_support/dependencies.rb:156:in `require'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/ 
active_support/dependencies.rb:521:in `new_constants_in'
from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/ 
active_support/dependencies.rb:156:in `require'


--




RAJIV KUMAR

http://rajivkumarnandvani.wordpress.com/
http://learnqtphelp.blogspot.com/


--
Before posting, please read http://watir.com/support. In short:  
search before you ask, be nice.


You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


--
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] which version of ruby to be installed

2010-08-19 Thread arihan sinha
Dear All,

Which version of ruby I need to be installed if I am using window 7 OS..
please refer the exact one

http://www.ruby-lang.org/en/downloads/

http://rubyforge.org/frs/?group_id=167

Cheers
A

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] `assert_exists': Unable to locate element

2010-08-13 Thread arihan sinha
you have to attach that new windows, do the activities and then close that
and come back to your original browser.

in my ruby+watir framework I use the below if any new window opens where i
need to do anything

if attach_url(/url in reg exp/) then

enter_text_into_text_field_text(Enter the value in text field, entry,
abc)

# do what ever you want to do in this new window
# then close this new window
end

the attach_url and enter_text_into_text_field are called from testbase.rb

def enter_text_into_text_field_text(title, name, value)
  startAction title, type ' + value + ' in ' + name + ' text field

  if no_fatal_error then
   begin
  $ie.text_field(:name, name).set(value)
  logPass
  rescue = e
   handleFail e
  end
  end
 end

def attach_url(urlName)
  startAction opening new IE instance, urlName.to_s
  if no_fatal_error then
  begin
  new_ie = Watir::IE.attach(:url, urlName)
  new_ie.set_fast_speed
  @stored_ie = $ie
  $ie = new_ie
  logPass
  return true
  rescue = e
  @fatal_error=true
   handleFail e
  end
  end

  return false
end

On Fri, Aug 13, 2010 at 12:21 PM, cyril.gonsal...@mastek.com 
cyril.gonsal...@mastek.com wrote:

 Hi,

 I am writing script for a testcase below.

 1. Open Link abc.htm
 2. Click link chat me on abc.htm
 3. Enter text in the testfield on the newly opened page
 4. Click submit button

 While written script for above like this


 # Reuired libraries

  require 'watir'

  site_text = http://localhost:8080/XXX/a.htm;
  ie = Watir::IE.new
  ie.goto(site_text)
  ie.link(:text,Chat me).click

 ie.text_field(:name,entry).set abc # text field on the opened link


 I get below error messge :

 `assert_exists': Unable to locate element, using :name,
 entry (Watir::Exception::UnknownObjectException)
from
 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
 288:in `enabled?'
from
 C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
 60:in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/
 input_elements.rb:327:in `set'
from D:/Ruby/rbC1.tmp:15
 Complete(1)


 The problem could be because of the new browser window.

 if yes then how to access objects e.g textfield in the browser i.e.
 opened by clicking the link in another browser

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Unable to locate checkbox element ?

2010-08-12 Thread arihan sinha
Have you given the correct id name?

it seems from html code the id is *cblModules_2* but you have used i*
cblModules_0*

On Thu, Aug 12, 2010 at 10:15 PM, Chan Nguyen atbl1...@gmail.com wrote:

 Hi everyone,
 I followed a very simple example in Watir tutorial website
 http://wiki.openqa.org/display/WTR/Checkboxes.
 Here is the element HTML code:
 input type=checkbox checked=checked name=cblModules:2
 id=cblModules_2
 Then I tried
 browser.checkbox( :id, 'icblModules_0' ).clear
 but the compiler keeps complaining :

 C:/Ruby187/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb:
 56:in `assert_exists': Unable to locate element, using :id,
 icblModules_0 (Watir::Exception::UnknownObjectException)

 Any idea?

 Thanks,

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Way to clear the browser cache?

2010-08-09 Thread arihan sinha
pls try this.. and I think it would work.. its working ok for me.

def clear_cache_folder()
Watir::CookieManager::WatirHelper.deleteSpecialFolderContents(Watir::CookieManager::WatirHelper::COOKIES)
Watir::CookieManager::WatirHelper.deleteSpecialFolderContents(Watir::CookieManager::WatirHelper::INTERNET_CACHE)
end

2010/8/9 Željko Filipin zeljko.fili...@wa-research.ch

 On Sat, Aug 7, 2010 at 8:52 PM, Jeff Fry jeff@gmail.com wrote:
  Hey y'all, does watir have a way to clear the browser cache?

 I do not think Watir can do it (somebody please correct me if I am wrong).
 If I needed to clear the cache, I would just delete all files from browser's
 cache directory (with ruby).

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them
 vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] How to select a item from the dropbox

2010-08-09 Thread arihan sinha
in my Ruby+Watir framework which I've designed , I've created a testbase.rb
where I've put the function like below and call this wherever I need it.

def select_from_select_list(title,name,value)
startAction title, Select from the select list with name' + name + ' and
value ' + value + '
 if no_fatal_error then
begin
$ie.select_list(:name,name).select(value)
logPass
rescue = e
handleFail e
end
end
end



On Mon, Aug 9, 2010 at 9:00 AM, Padma Reddy padmaj...@gmail.com wrote:

 Try this:

 browser.select_list(:id, '').select_value('')

 get Id and value from ur source code


 On Sun, Aug 8, 2010 at 8:45 PM, sudhir prem...@gmail.com wrote:

 Hi All,
 I am trying to select an item from dropbox but could not.
 Can you provide details regarding that

 Thanks

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com




 --
 Padma:)

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] Iterate through radio buttons

2010-07-04 Thread arihan sinha
count the no of radio buttons with certain ids first then use the for loop
for this

On Thu, Jul 1, 2010 at 12:08 PM, Shlomit Gazit shlomitpatr...@gmail.comwrote:

 I am trying to iterate through radio buttons in the page, but I dont
 want to iterate through all the radios in the page, only those with
 certain id.
 How can I do that?

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


Re: [wtr-general] AutoItX3 failing on virtual machine when remote desktop window minimized/closed

2010-06-04 Thread arihan sinha
I've faced this problem before and  I came to know that this is not possible
as replied by one of the group member.if window is minimised then that
window cant be focussed.


in my application , there is a link in a page and if you click that the
popwerpoint version of the same would be downloaded and the file download
window (open/save/cancel options)would appear. so if VMware is minimised
then the test get hang.

actually my testing scenario was like go to the page
click that link
open the downloaded powerpoint file (earlier i was saving the downloaded ppt
by clicking save in the file download prompt and opening the same file later
on)
test the powerpoint file
close the powerpoint

so due to this problem i changed the setting in the registry key so that if
the link is clicked the powerpoint version would be opened immediately
without the file window prompt ( open/save/cancel options) . then i test the
powerpoint and then close the same.

it worked ok in vmware , build server even if the system is minimised.

problem:- there is one drawback that whenever there is new msoffice patch
will be rolled out then it would come back to its default position ( i.e
clicking the link would trigger that file download window ( open/save/cancel
options) ) so on that case test would fail and you need to manually do the
registry key settings again.

I am not sure what type of file gets downloaded in your application but for
powerpoint kind of files you don't need autoit. it can be done through
win32ole.

Regards
Arihan

On Fri, May 21, 2010 at 10:38 PM, koicat pmn...@yahoo.com wrote:

 Am running ruby and watir 1.6.5 which uses AutoItX3.dll (v. 3.1.1) on
 a Windows Server 2003 virtual machine accessed from an XP Pro laptop
 through Remote Desktop.

 If I run the script and leave the desktop window open, the following
 code runs correctly.
 If I minimize the window the code hangs after the WinActivate command
 (the WinWait for Save As also never times out)

 Have substituted a newer version of AutoItX3.dll (v 3.3.3) to no
 avail.

@Wait = 60
data_path = [full path where file is to be saved]
...
ai = WIN32OLE.new(AutoItX3.Control)
ai.WinWait(File Download, , @Wait)
ai.WinActivate(File Download, )
ai.ControlFocus(File Download, , Save)
sleep 1
ai.ControlClick(File Download, , Save, primary)
sleep 1
ai.WinWait(Save As, , @Wait)
sleep 0.5
ai.ControlSend(Save As, , Edit1, data_path)
ai.ControlClick(Save As, , Save, left)
ai.WinWait(Download complete, , @Wait)
ai.ControlClick(Download complete, , Close)
...

 This is an urgent problem as the application running this is a
 critical path project.
 Greatly appreciate any help anyone can give!

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: how ruby interacts with already opened powerpoint

2010-04-16 Thread arihan sinha
Thanks everyone. Its done . I found the solution in the microsoft site. No
need to spend time on this.

Regards
Arihan

On Thu, Apr 15, 2010 at 2:59 PM, arihan sinha
arihan.si...@googlemail.comwrote:

 Hi,

 In my application I've changed the setting so that the powerpoint would be
 opened without file download prompt.

 Now I need to focus on that already opened powerpoint and do some testing
 through ruby.( say  count the no of slides)

 earlier i was saving the powerpoint ( clicking the save button from that
 file download prompt) and opening the same ppt as

  ppt = WIN32OLE.new('PowerPoint.Application')

 ppt.Visible = true

* **doc = ppt.Presentations.Open('C:\Documents and
 Settings\sinhaa\My Documents\JHEPAT_2010_VOL51_PG845.ppt')*

 slidecount = doc.Slides.Count
 puts slidecount

 but the problem happend that when the remote system ( build server) is
 locked or minimised then it stuck in the file download prompt because it was
 not sending the key stroke.

 So after setting changed the ppt already opened so  i should be able to
 directly count the slides on that ppt by focusing or activating the same
 ppt.
 i tried with below code but it seems not working. any thoughts???

 $ie.goto(
 http://www.thelancet.com/journals/lancet/article/PIIS0140-6736%2810%2960523-5/fulltext
 )
  $ie.link(:text, Download to PowerPoint).click

 ###The ppt gets opened automatically as a separate ppt file without file
 download prompt because settings changed.
 ppt = WIN32OLE.new('PowerPoint.Application')

  ppt.Visible = true

  slidecount = * ppt.Presentations*.Slides.Count

 puts slidecount

 Regards

 Arihan


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


Re: [wtr-general] Re: file download

2010-04-15 Thread arihan sinha
now I've changed the setting so that the powerpoint would be opened without
file download prompt.

now I need to focus on that already opened powerpoint and do some testing
through ruby.

earlier i was saving the powerpoint ( clicking the save button from that
file download prompt) and opening the same ppt as

 ppt = WIN32OLE.new('PowerPoint.Application')

ppt.Visible = true

   * **doc = ppt.Presentations.Open('C:\Documents and Settings\sinhaa\My
Documents\JHEPAT_2010_VOL51_PG845.ppt')*

slidecount = doc.Slides.Count
puts slidecount

but now as ppt already opened so rather than opening the ppt i should be
able to directly count the slides on that ppt.
i tried with below code but it seems not working. any thoughts???
ppt = WIN32OLE.new('PowerPoint.Application')

ppt.Visible = true

  slidecount = doc.Slides.Count

puts slidecount

Regards
Arihan

On Wed, Apr 14, 2010 at 2:11 PM, Jarmo Pertman jarm...@gmail.com wrote:

 Only workaround i've used so far is that i've used virtual machine so
 you can lock your main machine. No other solutions so far
 unfortunately.

 Jarmo

 On Apr 13, 5:50 pm, arihan sinha arihan.si...@googlemail.com wrote:
  Any solution to this problem. any work around etc.
 
  Regards
  Arihan
 
 
 
  On Fri, Apr 9, 2010 at 4:03 PM, Ethan notet...@gmail.com wrote:
   When the system is locked, windows doesn't send things like keypresses
 and
   button presses, as far as I've been able to determine. I know of no
   workaround for this, and would also be quite interested if anybody else
   knows one.
 
   On Fri, Apr 9, 2010 at 07:33, arihan sinha 
 arihan.si...@googlemail.comwrote:
 
   Hello All,
 
   To handle the download prompt I am using the below code as
 
   save_dialog = WIN32OLE.new(AutoItX3.Control)
   //
   ///
$ie.link(:text, Download images).click_no_wait
 
   click_link_text_no_wait(click Link Download images,
 Download
   images)
 
   save_dialog.WinWait(File Download,,20)
 
   save_dialog.WinActivate(File Download)
 
   #save_dialog.Send({TAB})
 
   save_dialog.Send({Enter})
 
   sleep 10.0
 
   This piece of code is working fine but when the system is locked then
 its
   not working.. any idea how to handle this.?
 
also in our remote build server when this piece of code is running
 and we
   just minimise that remote window then it stuck there and not moving
 further.
 
   Thanks
 
   Arihan
 
   --
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   You received this message because you are subscribed to
  http://groups.google.com/group/watir-general
   To post: watir-general@googlegroups.com
 
--
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   You received this message because you are subscribed to
  http://groups.google.com/group/watir-general
   To post: watir-general@googlegroups.com

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com

 To unsubscribe, reply using remove me as the subject.


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


[wtr-general] how ruby interacts with already opened powerpoint

2010-04-15 Thread arihan sinha
Hi,

In my application I've changed the setting so that the powerpoint would be
opened without file download prompt.

Now I need to focus on that already opened powerpoint and do some testing
through ruby.( say  count the no of slides)

earlier i was saving the powerpoint ( clicking the save button from that
file download prompt) and opening the same ppt as

 ppt = WIN32OLE.new('PowerPoint.Application')

ppt.Visible = true

   * **doc = ppt.Presentations.Open('C:\Documents and Settings\sinhaa\My
Documents\JHEPAT_2010_VOL51_PG845.ppt')*

slidecount = doc.Slides.Count
puts slidecount

but the problem happend that when the remote system ( build server) is
locked or minimised then it stuck in the file download prompt because it was
not sending the key stroke.

So after setting changed the ppt already opened so  i should be able to
directly count the slides on that ppt by focusing or activating the same
ppt.
i tried with below code but it seems not working. any thoughts???

$ie.goto(
http://www.thelancet.com/journals/lancet/article/PIIS0140-6736%2810%2960523-5/fulltext
)
 $ie.link(:text, Download to PowerPoint).click

###The ppt gets opened automatically as a separate ppt file without file
download prompt because settings changed.
ppt = WIN32OLE.new('PowerPoint.Application')

 ppt.Visible = true

 slidecount = * ppt.Presentations*.Slides.Count

puts slidecount

Regards

Arihan

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] synchronisation in ruby

2010-04-14 Thread arihan sinha
Hi, I've gone through the below link
http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir but it says that

sleep 1 until ie.text.include? new results are loaded

This code will keep sleeping until the text new results are loaded appears
on the page. However, you may not want to wait forever. Using the following
code will wait; for the text new results are loaded to appear on the page
*OR* 60 seconds, whichever comes first.

wait_until {ie.text.include? new results are loaded}

just need to know where in the watir library this 60 seconds has been
mentioned so that I can change it to the 120 secs and it would be applicable
to globally for wait_until  method whereever it is called


Thanks

Arihan







On Fri, Apr 9, 2010 at 12:24 PM, arihan sinha
arihan.si...@googlemail.comwrote:

 I am using wait_until and its working fine and it seems the default value
 is 60 secs. I mean it waits for 60 secs . If it doesnt find then status is
 fail.

 but if I want to change that to say 120 secs (  because in our apps few
 cases it takes more than 60 secs) then where i need to change. there must be
 something in the library file where we can change. anyone can suggest pls

 Thanks
 Arihan


 On Mon, Mar 29, 2010 at 3:24 PM, Željko Filipin 
 zeljko.fili...@wa-research.ch wrote:

 On Mon, Mar 29, 2010 at 4:22 PM, arihan sinha 
 arihan.si...@googlemail.com wrote:
  can I use the synchronisation statement in the ruby test rather than
 sleep statement.

 Did you read this?

 http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir

 Željko
 --
 watir.com - community manager
 pledgie.com/campaigns/2982 - donate to Watir
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them


  --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com

 To unsubscribe from this group, send email to watir-general+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.




-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] Re: file download

2010-04-14 Thread arihan sinha
actually in our localhost we have VMware so its fine but when codes  go to
the build server there is no VMware.. So problem happens there

On Wed, Apr 14, 2010 at 2:11 PM, Jarmo Pertman jarm...@gmail.com wrote:

 Only workaround i've used so far is that i've used virtual machine so
 you can lock your main machine. No other solutions so far
 unfortunately.

 Jarmo

 On Apr 13, 5:50 pm, arihan sinha arihan.si...@googlemail.com wrote:
  Any solution to this problem. any work around etc.
 
  Regards
  Arihan
 
 
 
  On Fri, Apr 9, 2010 at 4:03 PM, Ethan notet...@gmail.com wrote:
   When the system is locked, windows doesn't send things like keypresses
 and
   button presses, as far as I've been able to determine. I know of no
   workaround for this, and would also be quite interested if anybody else
   knows one.
 
   On Fri, Apr 9, 2010 at 07:33, arihan sinha 
 arihan.si...@googlemail.comwrote:
 
   Hello All,
 
   To handle the download prompt I am using the below code as
 
   save_dialog = WIN32OLE.new(AutoItX3.Control)
   //
   ///
$ie.link(:text, Download images).click_no_wait
 
   click_link_text_no_wait(click Link Download images,
 Download
   images)
 
   save_dialog.WinWait(File Download,,20)
 
   save_dialog.WinActivate(File Download)
 
   #save_dialog.Send({TAB})
 
   save_dialog.Send({Enter})
 
   sleep 10.0
 
   This piece of code is working fine but when the system is locked then
 its
   not working.. any idea how to handle this.?
 
also in our remote build server when this piece of code is running
 and we
   just minimise that remote window then it stuck there and not moving
 further.
 
   Thanks
 
   Arihan
 
   --
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   You received this message because you are subscribed to
  http://groups.google.com/group/watir-general
   To post: watir-general@googlegroups.com
 
--
   Before posting, please readhttp://watir.com/support. In short: search
   before you ask, be nice.
 
   You received this message because you are subscribed to
  http://groups.google.com/group/watir-general
   To post: watir-general@googlegroups.com

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com

 To unsubscribe, reply using remove me as the subject.


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com


Re: [wtr-general] file download

2010-04-13 Thread arihan sinha
Any solution to this problem. any work around etc.

Regards
Arihan

On Fri, Apr 9, 2010 at 4:03 PM, Ethan notet...@gmail.com wrote:

 When the system is locked, windows doesn't send things like keypresses and
 button presses, as far as I've been able to determine. I know of no
 workaround for this, and would also be quite interested if anybody else
 knows one.

 On Fri, Apr 9, 2010 at 07:33, arihan sinha arihan.si...@googlemail.comwrote:

 Hello All,

 To handle the download prompt I am using the below code as

 save_dialog = WIN32OLE.new(AutoItX3.Control)
 //
 ///
  $ie.link(:text, Download images).click_no_wait

 click_link_text_no_wait(click Link Download images, Download
 images)

 save_dialog.WinWait(File Download,,20)

 save_dialog.WinActivate(File Download)

 #save_dialog.Send({TAB})

 save_dialog.Send({Enter})

 sleep 10.0

 This piece of code is working fine but when the system is locked then its
 not working.. any idea how to handle this.?

  also in our remote build server when this piece of code is running and we
 just minimise that remote window then it stuck there and not moving further.


 Thanks

 Arihan

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com


  --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] synchronisation in ruby

2010-04-09 Thread arihan sinha
I am using wait_until and its working fine and it seems the default value is
60 secs. I mean it waits for 60 secs . If it doesnt find then status is
fail.

but if I want to change that to say 120 secs (  because in our apps few
cases it takes more than 60 secs) then where i need to change. there must be
something in the library file where we can change. anyone can suggest pls

Thanks
Arihan

On Mon, Mar 29, 2010 at 3:24 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:

 On Mon, Mar 29, 2010 at 4:22 PM, arihan sinha arihan.si...@googlemail.com
 wrote:
  can I use the synchronisation statement in the ruby test rather than
 sleep statement.

 Did you read this?

 http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir

 Željko
 --
 watir.com - community manager
 pledgie.com/campaigns/2982 - donate to Watir
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them


  --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com

 To unsubscribe from this group, send email to watir-general+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


[wtr-general] file download

2010-04-09 Thread arihan sinha
Hello All,

To handle the download prompt I am using the below code as

save_dialog = WIN32OLE.new(AutoItX3.Control)
//
///
 $ie.link(:text, Download images).click_no_wait

click_link_text_no_wait(click Link Download images, Download
images)

save_dialog.WinWait(File Download,,20)

save_dialog.WinActivate(File Download)

#save_dialog.Send({TAB})

save_dialog.Send({Enter})

sleep 10.0

This piece of code is working fine but when the system is locked then its
not working.. any idea how to handle this.?

 also in our remote build server when this piece of code is running and we
just minimise that remote window then it stuck there and not moving further.


Thanks

Arihan

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


[wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread arihan sinha
Hi,

Could you please let me know how to test the pdf through ruby/watir.

at present when we click any pdf link in our apps it gets opened in the
browser in a separate window and we only verify the url. but can we verify
the content as well  or something else.

Thanks
Arihan

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] Test the PDF through Ruby/Watiir

2010-04-09 Thread arihan sinha
Is there any way can take the title of the browser

I tried with $ie.title but its not working

Arihan

On Fri, Apr 9, 2010 at 12:40 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:

 On Fri, Apr 9, 2010 at 1:36 PM, arihan sinha arihan.si...@googlemail.com
 wrote:
  Could you please let me know how to test the pdf through ruby/watir.

 As far as I know, you can not test contents of pdf with Watir. There is
 probably another Ruby library that can do it.

 Željko
 --
 watir.com - community manager
 pledgie.com/campaigns/2982 - donate to Watir
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them

  --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com

To unsubscribe, reply using remove me as the subject.


Re: [wtr-general] HP acquires the Watir project, announces Wativ

2010-04-01 Thread arihan sinha
Can any one please confirm that this is the correct news.

On Thu, Apr 1, 2010 at 11:19 AM, Melkon, Raffi rmel...@gmail.com wrote:

  Good luck!!!



 *From:* watir-general@googlegroups.com [mailto:
 watir-gene...@googlegroups.com] *On Behalf Of *Željko Filipin
 *Sent:* Thursday, April 01, 2010 6:05 AM
 *To:* watir-general@googlegroups.com; watir
 *Subject:* Re: [wtr-general] HP acquires the Watir project, announces
 Wativ



 Alister and I are flying to HP headquarters (Palo Alto, Calif.) as I write
 this (from the plane). We have heard that Watir users are gathering in front
 of the headquarters. There are some rumors about them having signs and
 shouting stuff. I hope we will manage to record a podcast with a few of the
 Watir users and hear what they think.

 Željko

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com

 No virus found in this incoming message.
 Checked by AVG - www.avg.com
 Version: 8.5.437 / Virus Database: 271.1.1/2782 - Release Date: 03/31/10
 18:32:00

 --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

To unsubscribe, reply using remove me as the subject.


[wtr-general] synchronisation in ruby

2010-03-29 Thread arihan sinha
Hi ,


can I use the synchronisation statement in the ruby test rather than sleep
statement.

 I am using some similar kind of code as below where the for loop runs with
0.5 secs gap unless the assert gets passed. once passed then it would come
out of the for loop. Any other approach?

Any where in the inbuild watir library can I change the default sync time of
ruby ?


   for counter in 0..20
begin
 assert($ie.link(:text,name).exists?)
 logPass
 break
rescue = e
 if counter  19 then
  handleFail e
  break
 end

 sleep 0.5
end
   end
  end






  --
 Before posting, please read http://watir.com/support. In short: search
 before you ask, be nice.

 You received this message because you are subscribed to
 http://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: 
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com

 To unsubscribe from this group, send email to watir-general+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

To unsubscribe from this group, send email to 
watir-general+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Re: [wtr-general] How to save or read a PDF file using PDF toolkit when PDF is embeded in a browser

2010-02-25 Thread arihan sinha
have u tried with reigstry keys because i ve faced this problem while the
link triggers the ppt. so by changing the registry key , it would prompt a
save/open window or directly open in the new browser etc.

On Thu, Feb 25, 2010 at 6:51 PM, bk bkhambadk...@gmail.com wrote:

 Hello,
 I'm trying to read a PDF file. I know how to get ruby to read a PDF
 but my problem is when I click on a link it does not pop up a modal
 window asking to open or save file but It directly opens up the PDF in
 another browser. The browser windows does not have any file menu to
 save the file but it has the whole PDF embedded into the HTML which
 has a save button.

 heres the code that opens up the pop up window
 b.link(:href, javascript:NextPage('pdf', false)).click

 Then I attach it to another object b2
 b2 = Watir::IE.attach(:title, /blahblah/)

 Is there a way I can read the b2 object as a PDF file or is there a
 way to save the file to the hard drive?

 I tried something like this but it fails

 my_pdf = PDF::Toolkit.open(b2)
 text = my_pdf.to_text.read
 puts text



 Thanks
 BK

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general


-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Delete the bulk files with specific extension or specific format.

2010-02-02 Thread arihan sinha
Hi All,

I am trying to delete few files with specific extension ( say x.ppt, y.ppt,
z.ppt) or in the format of say J_x.ppt, J_y.ppt, J_z.ppt etc...

for a single file deletion , I can use File.delete(C:\Documents and
Settings\sinhaa\My Documents\x.ppt) which works fine but if i need to
delete all those three files in a single go , then what i need to do. any
thoughts? any reg expression kind of things I can use?

Thanks
Arihan

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Delete the bulk files with specific extension or specific format.

2010-02-02 Thread arihan sinha
Thanks.

Though bit struggled initially but finally able to :)

Arihan

On Tue, Feb 2, 2010 at 3:47 PM, Charley Baker charley.ba...@gmail.comwrote:

 Check out the documentation for FileUtils#rm:
 http://ruby-doc.org/core/classes/FileUtils.html#M004332

 You can glob files and pass them to rm.

 -c

 On Tue, Feb 2, 2010 at 8:32 AM, arihan sinha 
 arihan.si...@googlemail.comwrote:



 Hi All,

 I am trying to delete few files with specific extension ( say x.ppt,
 y.ppt, z.ppt) or in the format of say J_x.ppt, J_y.ppt, J_z.ppt etc...

 for a single file deletion , I can use File.delete(C:\Documents and
 Settings\sinhaa\My Documents\x.ppt) which works fine but if i need to
 delete all those three files in a single go , then what i need to do. any
 thoughts? any reg expression kind of things I can use?

 Thanks
 Arihan

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general


  --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general


-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Re: File Download - Security Warning popup

2010-01-26 Thread Arihan
You can use the command for TAB  ENTER to focus in run or save button  
of  u r warning window and get it clicked


Sent from my iPhone

On 26 Jan 2010, at 20:57, orde ohil...@gmail.com wrote:


I have previously used solution 2 on 
http://wiki.openqa.org/display/WTR/File+Downloads
for downloading files.

You'd have to tweak it (e.g. for starters, change File Download to
File Download - Security Warning; change Save to Run), but it
should get you going in the right direction.

Hope it helps.

orde



On Jan 25, 4:30 pm, capri capricorn...@gmail.com wrote:
I replaced click with click_no_wait in my code..doesn't seem to  
work..

just stalls at this point and doesnt proceed further to click the
'Run' button of the file download - security warning window.  any
thoughts on this?

many thanks..

On Jan 23, 6:19 am, Arihan arihan.si...@googlemail.com wrote:




Pls use clicknowait method .. It would work ..



Sent from my iPhone



On 22 Jan 2010, at 22:53, capri capricorn...@gmail.com wrote:



Hi,


I tried the below code to identify file download -security  
warning
message using autoit in my watir script.  However it does not  
seem to

work.  I am trying to click the 'Run' button of this window. On
running the script, it gets struck and doesn't show any errors. Any
thoughts,inputs would be highly appreciated.



many thanks.



Code:
-
require 'watir'
require 'rubygems'
require 'win32ole' # to invoke Autoit controls



ie=Watir::IE.new
autoit=WIN32OLE.new('AutoItX3.Control')



ie.goto http://www.cooliris.com;



ie.link(:html,/return InstallHelper.clickedDownload()/).click



r=autoit.WinExists(File Download - Security Warning)
puts r



res=autoit.WinWait(File Download - Security Warning,'',3)
puts  res
res=autoit.WinActivate(File Download - Security Warning)
puts res
res=ie.autoit.ControlFocus(File Download - Security Warning,,
Run)
res=ie.autoit.ControlClick(File Download - Security
Warning,,Run)
puts res
puts \n


--  
You received this message because you are subscribed to the Google

Groups Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines:http:// 
wiki.openqa.org/display/WTR/Support

To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group athttp://groups.google.com/ 
group/watir-general


--
You received this message because you are subscribed to the Google  
Groups Watir General group.

To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


--
You received this message because you are subscribed to the Google Groups Watir 
General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


Re: [wtr-general] File Download - Security Warning popup

2010-01-23 Thread Arihan

Pls use clicknowait method .. It would work ..

Sent from my iPhone

On 22 Jan 2010, at 22:53, capri capricorn...@gmail.com wrote:


Hi,

I tried the below code to identify file download -security warning
message using autoit in my watir script.  However it does not seem to
work.  I am trying to click the 'Run' button of this window. On
running the script, it gets struck and doesn't show any errors. Any
thoughts,inputs would be highly appreciated.

many thanks.

Code:
-
require 'watir'
require 'rubygems'
require 'win32ole' # to invoke Autoit controls

ie=Watir::IE.new
autoit=WIN32OLE.new('AutoItX3.Control')

ie.goto http://www.cooliris.com;

ie.link(:html,/return InstallHelper.clickedDownload()/).click

r=autoit.WinExists(File Download - Security Warning)
puts r

res=autoit.WinWait(File Download - Security Warning,'',3)
puts  res
res=autoit.WinActivate(File Download - Security Warning)
puts res
res=ie.autoit.ControlFocus(File Download - Security Warning,,
Run)
res=ie.autoit.ControlClick(File Download - Security
Warning,,Run)
puts res
puts \n



--  
You received this message because you are subscribed to the Google  
Groups Watir General group.

To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


--
You received this message because you are subscribed to the Google Groups Watir 
General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


Re: [wtr-general] how to click the open button in a microsoft window

2009-12-08 Thread arihan sinha
Then I think I've to install AutoIt ...rt?

On Tue, Dec 8, 2009 at 3:26 PM, Željko Filipin 
zeljko.fili...@wa-research.ch wrote:

 Does this help?

 http://wiki.openqa.org/display/WTR/File+Downloads

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Re: [wtr-general] Re: how to click the open button in a microsoft window

2009-12-08 Thread arihan sinha
Can you please try this below and let me know how i will proceed further
after that .

I need to click the cancel button or open button of that window.


def test_powerpointslide
$ie = Watir::IE.new
$ie.set_fast_speed
$ie.goto(http://content.nejm.org/;)
 $ie.link(:text, Sign in).click
 $ie.text_field(:name, username).set(arihansinha)
$ie.text_field(:name, code).set(hello123)
$ie.button(:name, signin).click
$ie.link(:text, PAST ISSUES).click

$ie.link(:text, 2008).click
$ie.link(:text, Jan 3, Vol. 358, No. 1, 1 - 100).click

$ie.link(:text, Full Text).click
$ie.link(:text, PowerPoint Slide Set).click


end

if you need to run this again and again then manually click the *sign out *link
and then *yes sign me out of the nejm button*.

Thanks

Arihan

On Tue, Dec 8, 2009 at 5:05 PM, mohe j.mohanpra...@gmail.com wrote:

 Can you try this.?

 save_dialog.WinWait(File Download,,40)
 save_dialog.WinActivate(File Download)
 save_dialog.Send({TAB}) 'Use this if you need to tab.
 save_dialog.Send({Enter})

 On Dec 8, 10:37 am, arihan sinha arihan.si...@googlemail.com wrote:
  I've the watir version 1.6.2 and when i added the code snippet as
 
  prompt_message = Do you want to open or save this file?
  window_title = File Download
  save_dialog = WIN32OLE.new(AutoItX3.Control)
  sleep 1
  save_dialog_obtained =
  save_dialog.WinWaitActive(window_title,prompt_message, 25)
  save_dialog.ControlFocus(window_title, prompt_message, Save)
  sleep 1
  save_dialog.Send(S)
  save_dialog.ControlClick(window_title, prompt_message, Save)
 
  but its not working. it stuck on that file download window at the
 begining.
  not moving further.. Anything i am missing??
 
  thanks
 
  Arihan
 
  On Tue, Dec 8, 2009 at 4:16 PM, Željko Filipin 
 
 
 
  zeljko.fili...@wa-research.ch wrote:
   On Tue, Dec 8, 2009 at 5:14 PM, arihan sinha 
 arihan.si...@googlemail.com
   wrote:
Then I think I've to install AutoIt ...rt?
 
   Autoit is installed with Watir.
 
   Željko
 
--
   You received this message because you are subscribed to the Google
 Groups
   Watir General group.
   To post to this group, send email to watir-general@googlegroups.com
   Before posting, please read the following guidelines:
  http://wiki.openqa.org/display/WTR/Support
   To unsubscribe from this group, send email to
   watir-general-unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/watir-general- Hide quoted text -
 
  - Show quoted text -

 --
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To post to this group, send email to watir-general@googlegroups.com
 Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
 To unsubscribe from this group, send email to
 watir-general-unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/watir-general


-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] firewatir not able to recognise the text box

2009-10-22 Thread arihan sinha
Hi All,


When i am running the ruby test from eclipse , the text box in the firefox
is not getting recognised because of

id=advSearchFirstSearchTerm class=adv_searchTerm type=text value=
name=firstSearchTerm onfocus=select() style=background: yellow none
repeat scroll 0% 0%; -moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial; -moz-background-inline-policy:
-moz-initial

I've used all the possible methods like set/type in the text box by using
id/name but no result. ( The section in the red is coming automatically)


The same test is working ok if i dont run it from eclipse ( of course the
section in the red is not coming ). Always working ok in IE6.0/IE7.0


any solution to this



Thanks

arihan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: firewatir not able to recognise the text box

2009-10-22 Thread arihan sinha
Thanks Angrez for looking into it.


The html code

div class=adv_search_box

input type=text onfocus=select()  
class=adv_searchTerm
id= advSearchFirstSearchTerm name=firstSearchTerm value=/ in


select size=1 name=firstFieldName 
id=firstFieldName

option value=AllFields
All Fields
/option
option value=ArticleTitleAbstractKeywords
Article Title, Abstract, Keywords
/option
option value=Authors
Authors
/option
option value=ArticleTitle

Article Title
/option
option value=Abstract
Abstract
/option
/select


*The rubycode*

require 'watir'  # the controller
include Watir
require 'test/unit/ui/console/testrunner'
require 'test/unit/testsuite'
require 'firewatir'
include FireWatir



class Sampletest  Test::Unit::TestCase

def test_firefox

$ie = FireWatir::Firefox.new
$ie.goto('http://www.thelancet.com/advancedsearch')
$ie.text_field(:name, firstSearchTerm).set(blood)

sleep 5.0
$ie.close

end


end


*The errors*

  1) Error:
test_firefox(Sampletest):
SystemStackError: stack level too deep
c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/container.
rb:451:in `js_eval_method'
c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBas
eElement.rb:991:in `enabled?'
c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/MozillaBas
eElement.rb:977:in `assert_enabled'
c:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:266:in
`focus'
c:/apps/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:267:in
`focus'
c:/apps/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/htmlelemen
ts.rb:1339:in `set'
watir_Sample.rb:22:in `test_firefox'

1 tests, 0 assertions, 0 failures, 1 errors

Please let me know if you need anything else.

Thanks

Arihan

On Thu, Oct 22, 2009 at 1:58 PM, Angrez Singh ang...@gmail.com wrote:

 Can you post the HTML and your ruby code for the same?


 On Thu, Oct 22, 2009 at 5:14 PM, arihan sinha arihan.si...@googlemail.com
  wrote:

 Hi All,


 When i am running the ruby test from eclipse , the text box in the firefox
 is not getting recognised because of

 id=advSearchFirstSearchTerm class=adv_searchTerm type=text value=
 name=firstSearchTerm onfocus=select() style=background: yellow none
 repeat scroll 0% 0%; -moz-background-clip: -moz-initial;
 -moz-background-origin: -moz-initial; -moz-background-inline-policy:
 -moz-initial

 I've used all the possible methods like set/type in the text box by using
 id/name but no result. ( The section in the red is coming automatically)


 The same test is working ok if i dont run it from eclipse ( of course the
 section in the red is not coming ). Always working ok in IE6.0/IE7.0


 any solution to this



 Thanks

 arihan




 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Disable javascript through ruby/watir

2009-10-06 Thread arihan sinha
Hi All,

Is there any option to disable javascript of browser through ruby/watir?


Thanks

Arihan



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Disable javascript through ruby/watir

2009-10-05 Thread arihan

Hi ,

Can anyone please help me asap that how i would disbale the javascript
of the browser through ruby/watir

Thanks in advanced.

Arihan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---