[wtr-general] Re: click_no_wait problem with IE8 but fine with IE9

2014-01-10 Thread Jarmo Pertman
Hi!

I have written about debugging #click_no_wait long time ago:
http://itreallymatters.net/post/378669758/debugging-watirs-click-no-wait-method-problems

This might still apply nowadays.

Jarmo

On Thursday, January 9, 2014 9:48:34 AM UTC+2, Stefano wrote:

 Hi, no one has had the same problem? Is there a solution?
  
 Thanks,
 Stefano

 Il giorno giovedì 19 dicembre 2013 09:13:48 UTC+1, Stefano ha scritto:

 Hi,

 we are facing a problem with click_no_wait command when we try to open 
 a modal_dialog popup with ruby 2.0.0, watir-classic-4.0.1 and IE8. However, 
 the same Ruby code works fine with IE9. With IE8, the commad 
 click_no_wait don't open the modal dialog popup, but only highlight in 
 yellow the button.

 We would like to have a unique version of our Ruby code allowing to test 
 both IE8 and IE9. 

 Please, can anyone help me? I did not find a solution in the previous 
 discussions.

 Thanks,
 Stefano



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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: How do i read a .txt file using watir script

2014-01-10 Thread Priti Fhuse
1In which dir i suppose to save txt file
2getting error for 

require 'watir' 

file=File.new(e:\result.txt,r) 

file.puts Now, write #{i} 

file.close 


=error


esult.txt (Errno::EINVAL)Invalid argument - e:
from 11.rb:3:in `new'
from 11.rb:3:in `main'




On Monday, September 14, 2009 3:36:50 AM UTC-7, msazeez28july wrote:

 Hi, 
   We have watir scripts which requires url, username, password and 
 path (location of the datatables). 
   These parameters are changing depends upon the server where 
 application is deployed. 
   I would like to put these information inside a .txt file like 
 belo 
   url = http://198.44.23.11/DemoApplication.WebUI 
   username = admin 
   password = admin!@# 
   path = D:\Watir\WatirScripts 

Now i need to access the above .txt file using watir scripts 
 like open file, read line by line and store each word in a array then 
use array elements to get exact values for each parameters and 
 store it on respective variables to use inside scripts. 

   Could you please let me know, whether we can able to open a file 
 and read line by line using watir scripts. Does watir has class 
 or 
   library to support file open in read/write/append modes. 

   Please let me know. Thanks in advance. 

 Regards 
 Syed

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [wtr-general] Passing in a host header?

2014-01-10 Thread Željko Filipin
On Thu, Jan 9, 2014 at 11:20 AM, Stephen Nelson-Smith sanel...@gmail.com
wrote:
 1)   The browser goto method just takes a string.  I can't see how to do
anything as clever as pass HTTP headers.


This is how to do it with PhantomJS:

http://stackoverflow.com/a/20568647/17469

I am not sure if it is possible with other browsers.

Željko
--
https://leanpub.com/watirbook

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: problem with using watir and win32ole together

2014-01-10 Thread Jarmo Pertman
Why are you requiring win32ole in the first place?

If you end up loading watir-classic, then it will be loaded for you. Or 
doesn't it?

Jarmo

On Thursday, January 9, 2014 1:33:55 PM UTC+2, marcwest...@gmail.com wrote:

 the order of the requires are ...
 require 'rubygems'
 require 'watir'
 require 'win32ole'


 versions are ...

 bigdecimal (1.2.0)
 childprocess (0.3.9)
 commonwatir (4.0.0)
 ffi (1.9.3 x86-mingw32)
 io-console (0.4.2)
 json (1.7.7)
 mini_magick (3.5.0)
 mini_portile (0.5.2)
 minitest (4.3.2)
 multi_json (1.8.2)
 nokogiri (1.6.1 x86-mingw32)
 psych (2.0.0)
 rake (0.9.6)
 rautomation (0.13.0)
 rdoc (4.0.0)
 rubyzip (1.1.0)
 selenium-webdriver (2.39.0)
 subexec (0.2.3)
 test-unit (2.0.0.0)
 watir (5.0.0 x86-mingw32)
 watir-classic (4.0.1)
 watir-webdriver (0.6.4)
 websocket (1.0.7)
 win32-api (1.5.0 universal-mingw32)
 win32-process (0.7.4)
 win32screenshot (1.0.10)
 windows-api (0.4.2)
 windows-pr (1.2.2)


 No I do not believe I am using blunder.



 On Wednesday, 8 January 2014 17:24:20 UTC, Chuck van der Linden wrote:

 On Monday, January 6, 2014 2:26:22 AM UTC-8, marcwest...@gmail.com wrote:

 I am using watir to automate a browser application which has modal 
 dialogs, but i also use excel to drive what automated tests are run.
  
 The problem I have is when I add the statement require 'win32ole' into 
 my script this then causes errors when I try and deal with a modal dialog. 
 When I take the require 'win32ole statement out it works fine.
  
 The error I get when require 'win32ole' is present and try and deal with 
 a modal dialog is this
  
 C:/Ruby2_0_0/lib/ruby/gems/2.0.0/gems/watir-classic-4.0.1/lib/watir-classic/modal_dialog.rb:59:in
  
 `locate': undefined method `connect_unknown' for WIN32OLE:Class 
 (NoMethodError)from 
 C:/Ruby2_0_0/lib/ruby/gems/2.0.0/gems/watir-classic-4.0.1/lib/watir-classic/modal_dialog.rb:15:in
  
 `title'
  
  
 When I remove the require 'win32ole' the above error does not happen.
  
  
 Has anyone come across this problem and if so how do I over come it ?


 What order are your require statements in?

 Can you do 'gem list' from the command line and give us the versions of 
 applicable gems?

 Are you using bundler? 



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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [wtr-general] Re: How do i read a .txt file using watir script

2014-01-10 Thread John Fitisoff
[1] pry(main) f = File.new('foo.txt', 'w+') #Change the r in the second 
argument because you need to write to the file.
= #File:foo.txt
[2] pry(main) f.puts 'dsfdsfs' 
= nil
[3] pry(main) f.close
= nil
[4] pry(main) File.read 'foo.txt'
= dsfdsfs\n
[6] pry(main) puts e:\result.txt #You have to be careful with backslashes in 
text
esult.txt
= nil
[7] pry(main) puts e:\\result.txt #A second backslash escapes the first.
e:\result.txt


One some approach when you just want to read: File.read e:\\result.txt



On Friday, January 10, 2014 3:14 AM, Priti Fhuse pore.pr...@gmail.com wrote:
 
1In which dir i suppose to save txt file
2getting error for 

require 'watir' 

file=File.new(e:\result.txt,r) 

file.puts Now, write #{i} 

file.close 


=error


esult.txt (Errno::EINVAL)Invalid argument - e:
        from 11.rb:3:in `new'
        from 11.rb:3:in `main'




On Monday, September 14, 2009 3:36:50 AM UTC-7, msazeez28july wrote:
Hi, 
      We have watir scripts which requires url, username, password and 
path (location of the datatables). 
      These parameters are changing depends upon the server where 
application is deployed. 
      I would like to put these information inside a .txt file like 
belo 
      url = http://198.44.23.11/ DemoApplication.WebUI 
      username = admin 
      password = admin!@# 
      path = D:\Watir\WatirScripts 

       Now i need to access the above .txt file using watir scripts 
like open file, read line by line and store each word in a array then 
       use array elements to get exact values for each parameters and 
store it on respective variables to use inside scripts. 

      Could you please let me know, whether we can able to open a file 
and read line by line using watir scripts. Does watir has class 
or 
      library to support file open in read/write/append modes. 

      Please let me know. Thanks in advance. 

Regards 
Syed
-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.
 
watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com
 
--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] watir-webdriver appium

2014-01-10 Thread Dan
Hey everyone.  Anyone know if there are plans to build in support for 
appium tests into watir-webdriver?  Alister has a great post on getting 
started with selenium-webdriver, but support in watir-webdriver is missing 
currently.

http://watirmelon.com/2013/11/05/using-appium-in-ruby-for-ios-automated-functional-testing/

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: watir-webdriver appium

2014-01-10 Thread Dan
Actually, I've gotten it to work with watir-webdriver.  It seems that in 
the element locator that :name is not a valid finder, but this is used 
pretty heavily in iOS.  I was able to patch and add it back in.  Let's see 
how much farther I can get.

require 'rubygems'

require 'watir-webdriver'

module Watir

  class ElementLocator

include Watir::Exception


WD_FINDERS =  [

  :class,

  :class_name,

  :css,

  :id,

  :link,

  :link_text,

  :name, # deliberately excluded to be watirspec compliant

  :partial_link_text,

  :tag_name,

  :xpath

]

  end

end

On Friday, January 10, 2014 12:47:27 PM UTC-5, Dan wrote:

 Hey everyone.  Anyone know if there are plans to build in support for 
 appium tests into watir-webdriver?  Alister has a great post on getting 
 started with selenium-webdriver, but support in watir-webdriver is missing 
 currently.


 http://watirmelon.com/2013/11/05/using-appium-in-ruby-for-ios-automated-functional-testing/


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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [wtr-general] Re: watir-webdriver appium

2014-01-10 Thread Oscar Rieken
I just make sure everything I need to interact with has an id and it works
just fine.


On Fri, Jan 10, 2014 at 4:22 PM, Dan dfra...@gmail.com wrote:

 Actually, I've gotten it to work with watir-webdriver.  It seems that in
 the element locator that :name is not a valid finder, but this is used
 pretty heavily in iOS.  I was able to patch and add it back in.  Let's see
 how much farther I can get.

 require 'rubygems'

 require 'watir-webdriver'

 module Watir

   class ElementLocator

 include Watir::Exception


 WD_FINDERS =  [

   :class,

   :class_name,

   :css,

   :id,

   :link,

   :link_text,

   :name, # deliberately excluded to be watirspec compliant

   :partial_link_text,

   :tag_name,

   :xpath

 ]

   end

 end

 On Friday, January 10, 2014 12:47:27 PM UTC-5, Dan wrote:

 Hey everyone.  Anyone know if there are plans to build in support for
 appium tests into watir-webdriver?  Alister has a great post on getting
 started with selenium-webdriver, but support in watir-webdriver is missing
 currently.

 http://watirmelon.com/2013/11/05/using-appium-in-ruby-for-
 ios-automated-functional-testing/

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

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to watir-general+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: How do i read a .txt file using watir script

2014-01-10 Thread Super Kevy
hint Google Ruby Class file 

http://www.ruby-doc.org/core-2.0.0/File.html



On Monday, September 14, 2009 5:36:50 AM UTC-5, msazeez28july wrote:

 Hi, 
   We have watir scripts which requires url, username, password and 
 path (location of the datatables). 
   These parameters are changing depends upon the server where 
 application is deployed. 
   I would like to put these information inside a .txt file like 
 belo 
   url = http://198.44.23.11/DemoApplication.WebUI 
   username = admin 
   password = admin!@# 
   path = D:\Watir\WatirScripts 

Now i need to access the above .txt file using watir scripts 
 like open file, read line by line and store each word in a array then 
use array elements to get exact values for each parameters and 
 store it on respective variables to use inside scripts. 

   Could you please let me know, whether we can able to open a file 
 and read line by line using watir scripts. Does watir has class 
 or 
   library to support file open in read/write/append modes. 

   Please let me know. Thanks in advance. 

 Regards 
 Syed

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [wtr-general] Re: watir-webdriver appium

2014-01-10 Thread Dan
I'm not 100% clear on what the requirements are in terms of ids and that 
sort of thing is with iOS apps, but I don't see an id attribute in the 
appium inspector.  Even the appium documents don't say anything about using 
ids?

https://github.com/appium/appium/blob/master/docs/finding-elements.md

https://lh4.googleusercontent.com/-UPXmqImJGq4/UtBoU7qQCII/AWo/0EQA_CJeSsI/s1600/Screen%2BShot%2B2014-01-10%2Bat%2B4.38.11%2BPM.png




On Friday, January 10, 2014 4:25:35 PM UTC-5, Oscar.Rieken wrote:

 I just make sure everything I need to interact with has an id and it works 
 just fine.


 On Fri, Jan 10, 2014 at 4:22 PM, Dan dfr...@gmail.com javascript:wrote:

 Actually, I've gotten it to work with watir-webdriver.  It seems that in 
 the element locator that :name is not a valid finder, but this is used 
 pretty heavily in iOS.  I was able to patch and add it back in.  Let's see 
 how much farther I can get.

 require 'rubygems'

 require 'watir-webdriver'

 module Watir

   class ElementLocator

 include Watir::Exception


 WD_FINDERS =  [

   :class,

   :class_name,

   :css,

   :id,

   :link,

   :link_text,

   :name, # deliberately excluded to be watirspec compliant

   :partial_link_text,

   :tag_name,

   :xpath

 ]

   end

 end

 On Friday, January 10, 2014 12:47:27 PM UTC-5, Dan wrote:

 Hey everyone.  Anyone know if there are plans to build in support for 
 appium tests into watir-webdriver?  Alister has a great post on getting 
 started with selenium-webdriver, but support in watir-webdriver is missing 
 currently.

 http://watirmelon.com/2013/11/05/using-appium-in-ruby-for-
 ios-automated-functional-testing/

  -- 
 -- 
 Before posting, please read http://watir.com/support. In short: search 
 before you ask, be nice.
  
 watir-...@googlegroups.com javascript:
 http://groups.google.com/group/watir-general
 watir-genera...@googlegroups.com javascript:
  
 --- 
 You received this message because you are subscribed to the Google Groups 
 Watir General group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to watir-genera...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[wtr-general] Re: How do i read a .txt file using watir script

2014-01-10 Thread Super Kevy
Seems like a lot of overhead reading and parsing a file that way.   
Look at http://roo.rubyforge.org/   the Roo gem.  I believe you'll find 
useage and hints in this list somewhere. 

You may want to rethink into using Ruby Class Hash for this as well.  

myParams = { 'url' = 'http://198.44.23.11/DemoApplication.WebUI' ,   
'username' = 'admin' , 'password' = 'admin!@#' }

Then when  you need the param  
  puts myParams.fetch('url')#print it
  browser.text_field(:id,'ID3893').set( myParams.fetch('username')



  



On Monday, September 14, 2009 5:36:50 AM UTC-5, msazeez28july wrote:

 Hi, 
   We have watir scripts which requires url, username, password and 
 path (location of the datatables). 
   These parameters are changing depends upon the server where 
 application is deployed. 
   I would like to put these information inside a .txt file like 
 belo 
   url = http://198.44.23.11/DemoApplication.WebUI 
   username = admin 
   password = admin!@# 
   path = D:\Watir\WatirScripts 

Now i need to access the above .txt file using watir scripts 
 like open file, read line by line and store each word in a array then 
use array elements to get exact values for each parameters and 
 store it on respective variables to use inside scripts. 

   Could you please let me know, whether we can able to open a file 
 and read line by line using watir scripts. Does watir has class 
 or 
   library to support file open in read/write/append modes. 

   Please let me know. Thanks in advance. 

 Regards 
 Syed

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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [wtr-general] Re: watir-webdriver appium

2014-01-10 Thread Oscar Rieken
I was taking about using mobile safari not for native apps



On Fri, Jan 10, 2014 at 4:46 PM, Dan dfra...@gmail.com wrote:

 I'm not 100% clear on what the requirements are in terms of ids and that
 sort of thing is with iOS apps, but I don't see an id attribute in the
 appium inspector.  Even the appium documents don't say anything about using
 ids?

 https://github.com/appium/appium/blob/master/docs/finding-elements.md


 https://lh4.googleusercontent.com/-UPXmqImJGq4/UtBoU7qQCII/AWo/0EQA_CJeSsI/s1600/Screen%2BShot%2B2014-01-10%2Bat%2B4.38.11%2BPM.png




 On Friday, January 10, 2014 4:25:35 PM UTC-5, Oscar.Rieken wrote:

 I just make sure everything I need to interact with has an id and it
 works just fine.


 On Fri, Jan 10, 2014 at 4:22 PM, Dan dfr...@gmail.com wrote:

 Actually, I've gotten it to work with watir-webdriver.  It seems that in
 the element locator that :name is not a valid finder, but this is used
 pretty heavily in iOS.  I was able to patch and add it back in.  Let's see
 how much farther I can get.

 require 'rubygems'

 require 'watir-webdriver'

 module Watir

   class ElementLocator

 include Watir::Exception


 WD_FINDERS =  [

   :class,

   :class_name,

   :css,

   :id,

   :link,

   :link_text,

   :name, # deliberately excluded to be watirspec compliant

   :partial_link_text,

   :tag_name,

   :xpath

 ]

   end

 end

 On Friday, January 10, 2014 12:47:27 PM UTC-5, Dan wrote:

 Hey everyone.  Anyone know if there are plans to build in support for
 appium tests into watir-webdriver?  Alister has a great post on getting
 started with selenium-webdriver, but support in watir-webdriver is missing
 currently.

 http://watirmelon.com/2013/11/05/using-appium-in-ruby-for-io
 s-automated-functional-testing/

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

 watir-...@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-genera...@googlegroups.com


 ---
 You received this message because you are subscribed to the Google
 Groups Watir General group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to watir-genera...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.


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

 watir-general@googlegroups.com
 http://groups.google.com/group/watir-general
 watir-general+unsubscr...@googlegroups.com

 ---
 You received this message because you are subscribed to the Google Groups
 Watir General group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to watir-general+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


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

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to watir-general+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.