[wtr-general] click_no_wait does not work the second time when autoIt is used to handle the file download box

2011-10-18 Thread chaitanya
Hi every1,

I am facing the problem where I call the method click_no_wait on a
control which displays a "File Download" box. It works fine for the
1st time. i use Auto It to handle the file download box and save the
file at a particular location. Now, when I try to use the
click_no_wait on the same control, it won't display the File Download
box, but If i refresh the browser before calling the click_no_wait, it
will display the File Download box. So, my question is that is it the
case that Auto It is not being released and thus click_no_wait cannot
find the control or is there something wrong with the implementation
of the click_no_wait method.

Environment:
OS: Microsoft XP SP2
Ruby : ruby 1.8.6 patchelevel 398
Watir : 1.8.1

Following is the way I am using the control

def click_export_button
control = browser.button(:id,'export-button')
$DEBUG = true
#browser.refresh #- If this line is not commented, the dialog
appears
control.click_no_wait  #-- I replace click_no_wait with click and/or
click! and the code freezes, so the control is found
download_file("C:\\test.csv")
$DEBUG = false
end

Here's the code for downloading the file
def download_file(filePath = nil)
  autoIt = WIN32OLE.new("AutoItX3.Control")
  timeout = 10
  fileDownloadWindowTitle = "File Download"
  handle = autoIt.WinWait(fileDownloadWindowTitle, "Do you want to
open or save this file?", timeout)
  retVal = nil
  unless (handle.eql? @autoItError)
 autoIt.WinActivate(fileDownloadWindowTitle)
 autoIt.ControlClick(fileDownloadWindowTitle, "", "&Save")
 saveWindowTitle = "Save As"
 windowHandle = autoIt.WinWaitActive(saveWindowTitle, "",
timeout)
 if (windowHandle == 1)
retVal = save_file(saveWindowTitle, autoIt, filePath) #--
function to save the file to the location
 end
  else
 puts "Unable to download the file"
  end
  autoIt.ole_free
  return retVal
   end

Here's the error which I am getting

ruby -e "$:.unshift('c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/
watir/win32ole').unshift('c:/ruby/lib/ruby/gems/1.8/gems/
commonwatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/
firewatir-1.8.1/lib').unshift('c:/ruby/lib/ruby/gems/1.8/gems/
watir-1.8.1/lib');require 'c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/
lib/watir/core';Watir::Button.new(Watir::IE.attach(:hwnd,
6751822), :unique_number, 3).click!();"
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/element.rb:58:in
`assert_exists': Unable to locate element, using :unique_number, 3
(Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.8.1/lib/watir/
element.rb:275:in `click!'
from -e:1

Any help would be appreciated.

Thanks in advance

-- 
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


Re: [wtr-general] Re: Strangeness with watir and IE or I may be missing something.

2011-10-18 Thread bis
@Jarmo your solution deals with the text box dropdown that appears
when you start typing in the box my problem is with the dropdown box
to the left of that where you can change the area of the site to
perform the search in.

On Tue, Oct 18, 2011 at 2:04 PM, bis  wrote:
> both the blog post has exactly what i did
> http://thechort.com/blog/2011/10/03/strange-issue-with-watir-and-ie/
>
> On Tue, Oct 18, 2011 at 12:17 PM, Chuck van der Linden  
> wrote:
>> Perhaps a timing issue?  did you try this only from a script, or
>> running those steps via IRB?
>>
>> On Oct 17, 4:39 pm, bis  wrote:
>>> its still there just a bit odd,
>>>
>>> watir clicks on the drop down ( the one with handmade, vintage, and
>>> supplies) but it does not open it one and select one of the items. if
>>> you look in my original example at the beginning of this thread it
>>> does click open and select another item with watir-webdriver.
>>>
>>> On Mon, Oct 17, 2011 at 3:23 PM, Chuck van der Linden  
>>> wrote:
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> > WOOT, hey Oscar that's great news!  (and confirms that the folks at
>>> > Etsy are cool folks.  I'd be sure to send them a note when it's
>>> > finished and encourage them to share it with their own QA folks (who
>>> > knows, could be more watir converts to be had there ;-) )
>>>
>>> > OK, so after that little tee-crossing side track, where do we stand
>>> > with your original problem?
>>>
>>> > On Oct 17, 10:37 am, bis  wrote:
>>> >> The email and response I got back from Etsy about using their site for
>>> >> Watir examples
>>>
>>> >> =
>>> >> Etsy Developer Support develo...@etsy.com to me               show
>>> >> details 10:30 AM (4 minutes ago)
>>>
>>> >> Hi Oscar,
>>>
>>> >> Thanks for writing!  Although our TOU do specify that you can't access
>>> >> the site by automated means, I don't think that your automated testing
>>> >> demo is something we'd be concerned about at this time.
>>>
>>> >> Thanks!
>>> >> Justin
>>> >> Etsy Developer Supporthttp://www.etsy.com/developers
>>> >> 
>>>
>>> >> This message is a private conversation between you and Etsy. Please
>>> >> respect this confidentiality and refrain from distributing this
>>> >> communication without permission from Etsy. If you feel this message
>>> >> was sent to you in error, please delete it and let us know. Thank you.
>>>
>>> >> On Mon, Oct 2011 at 12:50 PM, bis...@gmail.com wrote:
>>>
>>> >> Hello, My name is Oscar. I am a software tester In my spare time I
>>> >> have written up a tutorial that uses your website to show how to use
>>> >> automated testing tools. It was brought to my attention that it may
>>> >> violate your terms of service for use of API's if it does I will
>>> >> gladly take it down. The tutorial is to help show how open source
>>> >> tools can be used for automated testing of websites. the code
>>> >> repository for this tutorial is 
>>> >> herehttps://github.com/hammernight/etsy_cucumber_taza_tutorial/Thanks
>>> >> Oscar
>>>
>>> >> 
>>>
>>> >> On Oct 10, 2011 6:06 PM, "Cliff Cyphers"  wrote:
>>>
>>> >> > Chuck
>>>
>>> >> > Good point, more people need to respect said terms of use.  Although
>>> >> > one's intentions isn't to inter-fear, perform harm, or use their data
>>> >> > for other purposes, it doesn't speak good for the OOS community to not
>>> >> > abide.
>>>
>>> >> > For demo purposes, why not just create a simple site as a rack app or
>>> >> > with camping, sinatra, etc.  Also, if there are specific test element
>>> >> > that would be good to cover for demo purposes I'll put them in the
>>> >> > demo site of QA Robusta.  So far the demo site supports a JS/CSS drop
>>> >> > down menu, tabed pages and an accordion style registration.
>>>
>>> >> > On Mon, Oct 10, 2011 at 5:59 PM, Chuck van der Linden 
>>> >> >  wrote:
>>> >> > > Sorry for the initial hardline response.. I think I've run into one 
>>> >> > > to
>>> >> > > many 'content rippers' lately who are asking questions about how they
>>> >> > > can use watir to access sites with the pretty clear intent of content
>>> >> > > theft and I had a bit of a knee-jerk response.
>>>
>>> >> > > I think the tutorial stuff that Bis and Alister are doing is valuable
>>> >> > > stuff and for a noble purpose that would all in all benefit the watir
>>> >> > > community.  However I think it would be a good idea to get official
>>> >> > > permission since while it might be in the spirit of what Etsy is all
>>> >> > > about, it is (at least by my reading) against their terms of use, and
>>> >> > > their api terms of use.  Specifically I think this work would violate
>>> >> > > these portions of their agreements:
>>>
>>> >> > > 1)  From their main terms of use:
>>> >> > > You agree that you will not use any robot,
>>> >> > > spider, scraper or other automated means to access Etsy for any
>>> >> > > purpose whatsoever, except to the extent expressly permitted by and 
>>> >> > > in
>

Re: [wtr-general] Re: Strangeness with watir and IE or I may be missing something.

2011-10-18 Thread bis
both the blog post has exactly what i did
http://thechort.com/blog/2011/10/03/strange-issue-with-watir-and-ie/

On Tue, Oct 18, 2011 at 12:17 PM, Chuck van der Linden  wrote:
> Perhaps a timing issue?  did you try this only from a script, or
> running those steps via IRB?
>
> On Oct 17, 4:39 pm, bis  wrote:
>> its still there just a bit odd,
>>
>> watir clicks on the drop down ( the one with handmade, vintage, and
>> supplies) but it does not open it one and select one of the items. if
>> you look in my original example at the beginning of this thread it
>> does click open and select another item with watir-webdriver.
>>
>> On Mon, Oct 17, 2011 at 3:23 PM, Chuck van der Linden  
>> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > WOOT, hey Oscar that's great news!  (and confirms that the folks at
>> > Etsy are cool folks.  I'd be sure to send them a note when it's
>> > finished and encourage them to share it with their own QA folks (who
>> > knows, could be more watir converts to be had there ;-) )
>>
>> > OK, so after that little tee-crossing side track, where do we stand
>> > with your original problem?
>>
>> > On Oct 17, 10:37 am, bis  wrote:
>> >> The email and response I got back from Etsy about using their site for
>> >> Watir examples
>>
>> >> =
>> >> Etsy Developer Support develo...@etsy.com to me               show
>> >> details 10:30 AM (4 minutes ago)
>>
>> >> Hi Oscar,
>>
>> >> Thanks for writing!  Although our TOU do specify that you can't access
>> >> the site by automated means, I don't think that your automated testing
>> >> demo is something we'd be concerned about at this time.
>>
>> >> Thanks!
>> >> Justin
>> >> Etsy Developer Supporthttp://www.etsy.com/developers
>> >> 
>>
>> >> This message is a private conversation between you and Etsy. Please
>> >> respect this confidentiality and refrain from distributing this
>> >> communication without permission from Etsy. If you feel this message
>> >> was sent to you in error, please delete it and let us know. Thank you.
>>
>> >> On Mon, Oct 2011 at 12:50 PM, bis...@gmail.com wrote:
>>
>> >> Hello, My name is Oscar. I am a software tester In my spare time I
>> >> have written up a tutorial that uses your website to show how to use
>> >> automated testing tools. It was brought to my attention that it may
>> >> violate your terms of service for use of API's if it does I will
>> >> gladly take it down. The tutorial is to help show how open source
>> >> tools can be used for automated testing of websites. the code
>> >> repository for this tutorial is 
>> >> herehttps://github.com/hammernight/etsy_cucumber_taza_tutorial/Thanks
>> >> Oscar
>>
>> >> 
>>
>> >> On Oct 10, 2011 6:06 PM, "Cliff Cyphers"  wrote:
>>
>> >> > Chuck
>>
>> >> > Good point, more people need to respect said terms of use.  Although
>> >> > one's intentions isn't to inter-fear, perform harm, or use their data
>> >> > for other purposes, it doesn't speak good for the OOS community to not
>> >> > abide.
>>
>> >> > For demo purposes, why not just create a simple site as a rack app or
>> >> > with camping, sinatra, etc.  Also, if there are specific test element
>> >> > that would be good to cover for demo purposes I'll put them in the
>> >> > demo site of QA Robusta.  So far the demo site supports a JS/CSS drop
>> >> > down menu, tabed pages and an accordion style registration.
>>
>> >> > On Mon, Oct 10, 2011 at 5:59 PM, Chuck van der Linden 
>> >> >  wrote:
>> >> > > Sorry for the initial hardline response.. I think I've run into one to
>> >> > > many 'content rippers' lately who are asking questions about how they
>> >> > > can use watir to access sites with the pretty clear intent of content
>> >> > > theft and I had a bit of a knee-jerk response.
>>
>> >> > > I think the tutorial stuff that Bis and Alister are doing is valuable
>> >> > > stuff and for a noble purpose that would all in all benefit the watir
>> >> > > community.  However I think it would be a good idea to get official
>> >> > > permission since while it might be in the spirit of what Etsy is all
>> >> > > about, it is (at least by my reading) against their terms of use, and
>> >> > > their api terms of use.  Specifically I think this work would violate
>> >> > > these portions of their agreements:
>>
>> >> > > 1)  From their main terms of use:
>> >> > > You agree that you will not use any robot,
>> >> > > spider, scraper or other automated means to access Etsy for any
>> >> > > purpose whatsoever, except to the extent expressly permitted by and in
>> >> > > compliance with Etsy's API Terms of Use or otherwise without Etsy's
>> >> > > prior express written permission.
>>
>> >> > > any Watir scripts would qualify under 'other automated means'
>>
>> >> > > 2) When we get into their API terms (http://www.etsy.com/developers/
>> >> > > terms-of-use) it gets thornier because those terms basically restrict
>> >> > > developers to using the API, and Wat

[wtr-general] Re: watir-webdriver + protected mode in XP-IE8

2011-10-18 Thread Chuck van der Linden
It's still there in IE8.   whether it enables or not depends on
several things,  browsing local subnet sites vs internet, settings for
UAC if running of Vista or Win7, and if you started IE 'as
administrator' or not.

What I've found sometimes solves this kind of issue is to go into the
Internet Security Properties UI and set all the zones that may be
encountered when running a script to the same zone, most often
'trusted'  Then also make sure your homepage, and the page displayed
when any new tab is opened are also set the same way, that includes
'about:blank' and 'about:tabs.

Another thing that can sometimes make a difference is opening up your
command line session (that you run your scripts from) 'as
administrator' as this can affect the security settings in an IE
session launched via that CMD window.

What's happening is that as a type of protection against cross site
scripting attacks, whenever the browser changes security zones, it
basically destroys the instance that was running in the old context,
and creates a new one.  When that happens the underlaying
identification of the window changes, and watir looses connection to
the browser.  You need to either attach, or use the watir-webdriver
methods to change to the appropriate browser window just as you would
have to do if you had closed and re-opened IE.   That's probably not
accurate in a very technical sense, but it's close enough to
understand the nature of the problem.

For more info, see here  
http://blogs.msdn.com/b/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx
and/or do a bunch of googling for protected/protection mode and IE8

On Oct 18, 10:45 am, RJ  wrote:
> Getting following error msg:
> Selenium::WebDriver::Error::NoSuchDriverError: Unexpected error
> launching Internet Explorer. Protected Mode must be set to the same
> value (enabled or disabled) for all zones.
>
> but this feature is not available on XP-IE8.  What to do.
>
> Thanks,
> RJ

-- 
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


[wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Chuck van der Linden
In general, you don't.   because a normal user cannot either.

Hidden values are normally returned automatically by the browser when
a POST is performed when the other data is submitted, it's all under
the covers stuff that user's never see, and is one of the ways that
webservers keep track of which user is which, or try to prevent
spoofing of responses.  Since watir is driving the browser you have no
need to worry about those things as they will be taken care of just as
they would if a user were interacting with the browser.

(those would be a concern if we were automating at the HTTP level,
instead of the UI level.. like doing loadtesting..  but not for watir
work)

Disabled elements would not normally be interacted with by a user
unless some client side script changes the state.  That can happen
with a lot of fancy javascript controls that might for example set
something to be enabled when another object is clicked or mouseovered
etc.   In general for that kind of thing you kinda have to reverse
engineer the page, (this is where the 'what events have been fired'
info becomes very useful) and may have to write stuff into your
scripts that does things like clicks on specific elements, or fires
specific events such as 'onmouseover' against some specific
element.Whenever you see something that 'reacts' such as a visual
change to the image, to the mouse moving over it, you can pretty much
be sure that this sort of event driven client side code is behind it

On Oct 18, 8:17 am, Joe Fleck  wrote:
> Hi,
>
> One last issue.  How do i deal with file_fields that are hidden or disabled?
>
> Joe
>
>
>
>
>
>
>
> On Tue, Oct 18, 2011 at 10:51 AM, Joe Fleck  wrote:
> > Hello,
>
> > Got it! :-)
>
> > changed the id: and it works.
>
> > @browser.file_field(:id, "file_attachment_attachment")
>
> > Thank you all again for your help.
>
> > Joe
>
> > On Tue, Oct 18, 2011 at 10:19 AM, Joe Fleck  wrote:
>
> >> Hi,
>
> >> Thank you all for helping. I really appreciate it.
>
> >> I believe the file path is correct now because the error message I am now
> >> getting has changed.
>
> >> Code:
> >> #Attach file
> >>       @browser.file_field(:id,
> >> "the_file").set("/Users/josephfleck/Documents/DownloadDocs/DataFile.xls")
>
> >> It doesn't object name i am giving it.  Do I need to use something else
> >> like the actual object name of the text field?
>
> >> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/element.rb:248:in
> >> `assert_exists': unable to locate element, using {:type=>"file",
> >> :tag_name=>"input", :id=>"the_file"}
> >> (Watir::Exception::UnknownObjectException)
> >>         from
> >> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:23:in
> >> `value='
> >>         from
> >> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:14:in
> >> `set'
> >>          from ./common/helper_methods.rb:182:in `share_documents'
> >>         from
> >> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159
> >>         from
> >> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
> >> `each'
> >>         from
> >> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
> >> `each'
> >>         from
> >> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38
>
> >> On Tue, Oct 18, 2011 at 9:28 AM, Joe DiMauro  wrote:
>
> >>> Another thing I noticed. Due to the path ending with
> >>> \criptDataFile.xls
>
> >>> It appers that the backslash followed by the two characters "cr"
> >>> is being interpeted as a Carridge Return.  You can see this
> >>> in the error message:
>
> >>> No such file or directory - Users/josephfleck/Documents/Download
> >>> Docs/ iptDataFile.xls (Errno::ENOENT)
> >>>          ^
> >>>         Notice the space instead of the characters"cr" indicating
> >>>         that \cr was interpreted as a Carriage Return, not the first
> >>>         two characters in the file name "criptDataFile.xls"
>
> >>> So try all these:
> >>> 1. Use a full pathname, not a relative path (as previously mentioned)
> >>>     Unless Ruby is running with the Root level of your Mac as it
> >>> working
> >>>    directory, (which I'm pretty sure its not), then the Users
> >>> directory will not be a valid relative path.)
>
> >>> 2. Remove the backslashes. They are not necessary on Mac/Linus OS,
> >>>    (as previously mentioned), and may cause issues (e.g. \cr)
>
> >>> 3. Always a good idea (as previously mentioned), to upgrade to the
> >>>    latest version of the gems, (and Ruby if possible)
>
> >>>    If you are also running safariWatir you may not be able to upgrade
> >>>    to Ruby 1.9.x.  I don't recall if safar

[wtr-general] Re: Regarding selecting dropdown menu

2011-10-18 Thread Chuck van der Linden
What you have below is not a true HTML 'select list' but rather a
custom control that emulates a selection list via the use of an
unordered (UL) list and a bunch of event driven client side
javascript.

Because we are likely going to be dealing with a bunch of code and
HTML samples, and this venue while good for discussion, bites for that
kind of thing, I would implore you to move this question (along inset
examples of your HTML and the code you have tried so far) over to
StackOverflow.  Just be sure to tag the question with the 'Watir' and/
or 'Watir-Webdriver' (if you are using that) tag(s) and we'll see it
there (you can even post a link to it here if you want)

Since it allows editing of both questions and answers, properly
formatted 'code' samples within messages, embedded graphics (including
screenshots) etc, it makes a much better venue for support.

Very likely you are going to need to be clicking (or firing events) on
the elements which have 'on={somejavascript}' stuff attached to
them, perhaps pausing in between some of the script steps for a second
to allow the client side code to do it's thing (otherwise, watir is
often 'too fast').

On Oct 18, 3:14 am, Naveen  wrote:
> Hi,
>
>    Relevant HTML is as follows and when i try the click its not showing any
> errors but dropdown window is not opening
>
> 
> 
> 
> 
> * class="x-tab-strip-menuable x-tab-strip-active
> ">*
> **
> **
> **
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> Bold part in the HTML is the location of element
> --
> *Thanks & Regards,
> Naveen.Kandakur
>
> *

-- 
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


[wtr-general] Re: Strangeness with watir and IE or I may be missing something.

2011-10-18 Thread Jarmo Pertman
Did you try my provided solution instead? How did it work (or not
work) for you?

Jarmo Pertman
-
IT does really matter - http://itreallymatters.net

On Oct 18, 2:39 am, bis  wrote:
> its still there just a bit odd,
>
> watir clicks on the drop down ( the one with handmade, vintage, and
> supplies) but it does not open it one and select one of the items. if
> you look in my original example at the beginning of this thread it
> does click open and select another item with watir-webdriver.
>
> On Mon, Oct 17, 2011 at 3:23 PM, Chuck van der Linden  
> wrote:
>
>
>
>
>
>
>
> > WOOT, hey Oscar that's great news!  (and confirms that the folks at
> > Etsy are cool folks.  I'd be sure to send them a note when it's
> > finished and encourage them to share it with their own QA folks (who
> > knows, could be more watir converts to be had there ;-) )
>
> > OK, so after that little tee-crossing side track, where do we stand
> > with your original problem?
>
> > On Oct 17, 10:37 am, bis  wrote:
> >> The email and response I got back from Etsy about using their site for
> >> Watir examples
>
> >> =
> >> Etsy Developer Support develo...@etsy.com to me               show
> >> details 10:30 AM (4 minutes ago)
>
> >> Hi Oscar,
>
> >> Thanks for writing!  Although our TOU do specify that you can't access
> >> the site by automated means, I don't think that your automated testing
> >> demo is something we'd be concerned about at this time.
>
> >> Thanks!
> >> Justin
> >> Etsy Developer Supporthttp://www.etsy.com/developers
> >> 
>
> >> This message is a private conversation between you and Etsy. Please
> >> respect this confidentiality and refrain from distributing this
> >> communication without permission from Etsy. If you feel this message
> >> was sent to you in error, please delete it and let us know. Thank you.
>
> >> On Mon, Oct 2011 at 12:50 PM, bis...@gmail.com wrote:
>
> >> Hello, My name is Oscar. I am a software tester In my spare time I
> >> have written up a tutorial that uses your website to show how to use
> >> automated testing tools. It was brought to my attention that it may
> >> violate your terms of service for use of API's if it does I will
> >> gladly take it down. The tutorial is to help show how open source
> >> tools can be used for automated testing of websites. the code
> >> repository for this tutorial is 
> >> herehttps://github.com/hammernight/etsy_cucumber_taza_tutorial/Thanks
> >> Oscar
>
> >> 
>
> >> On Oct 10, 2011 6:06 PM, "Cliff Cyphers"  wrote:
>
> >> > Chuck
>
> >> > Good point, more people need to respect said terms of use.  Although
> >> > one's intentions isn't to inter-fear, perform harm, or use their data
> >> > for other purposes, it doesn't speak good for the OOS community to not
> >> > abide.
>
> >> > For demo purposes, why not just create a simple site as a rack app or
> >> > with camping, sinatra, etc.  Also, if there are specific test element
> >> > that would be good to cover for demo purposes I'll put them in the
> >> > demo site of QA Robusta.  So far the demo site supports a JS/CSS drop
> >> > down menu, tabed pages and an accordion style registration.
>
> >> > On Mon, Oct 10, 2011 at 5:59 PM, Chuck van der Linden  
> >> > wrote:
> >> > > Sorry for the initial hardline response.. I think I've run into one to
> >> > > many 'content rippers' lately who are asking questions about how they
> >> > > can use watir to access sites with the pretty clear intent of content
> >> > > theft and I had a bit of a knee-jerk response.
>
> >> > > I think the tutorial stuff that Bis and Alister are doing is valuable
> >> > > stuff and for a noble purpose that would all in all benefit the watir
> >> > > community.  However I think it would be a good idea to get official
> >> > > permission since while it might be in the spirit of what Etsy is all
> >> > > about, it is (at least by my reading) against their terms of use, and
> >> > > their api terms of use.  Specifically I think this work would violate
> >> > > these portions of their agreements:
>
> >> > > 1)  From their main terms of use:
> >> > > You agree that you will not use any robot,
> >> > > spider, scraper or other automated means to access Etsy for any
> >> > > purpose whatsoever, except to the extent expressly permitted by and in
> >> > > compliance with Etsy's API Terms of Use or otherwise without Etsy's
> >> > > prior express written permission.
>
> >> > > any Watir scripts would qualify under 'other automated means'
>
> >> > > 2) When we get into their API terms (http://www.etsy.com/developers/
> >> > > terms-of-use) it gets thornier because those terms basically restrict
> >> > > developers to using the API, and Watir isn't doing that.
>
> >> > >  9. Website Human Use Restriction And Use of API
> >> > >  The API is the only supported method for users to access data
> >> > > programmatically from Etsy. The Etsy Website, including Content a

[wtr-general] Re: Strangeness with watir and IE or I may be missing something.

2011-10-18 Thread Chuck van der Linden
Perhaps a timing issue?  did you try this only from a script, or
running those steps via IRB?

On Oct 17, 4:39 pm, bis  wrote:
> its still there just a bit odd,
>
> watir clicks on the drop down ( the one with handmade, vintage, and
> supplies) but it does not open it one and select one of the items. if
> you look in my original example at the beginning of this thread it
> does click open and select another item with watir-webdriver.
>
> On Mon, Oct 17, 2011 at 3:23 PM, Chuck van der Linden  
> wrote:
>
>
>
>
>
>
>
> > WOOT, hey Oscar that's great news!  (and confirms that the folks at
> > Etsy are cool folks.  I'd be sure to send them a note when it's
> > finished and encourage them to share it with their own QA folks (who
> > knows, could be more watir converts to be had there ;-) )
>
> > OK, so after that little tee-crossing side track, where do we stand
> > with your original problem?
>
> > On Oct 17, 10:37 am, bis  wrote:
> >> The email and response I got back from Etsy about using their site for
> >> Watir examples
>
> >> =
> >> Etsy Developer Support develo...@etsy.com to me               show
> >> details 10:30 AM (4 minutes ago)
>
> >> Hi Oscar,
>
> >> Thanks for writing!  Although our TOU do specify that you can't access
> >> the site by automated means, I don't think that your automated testing
> >> demo is something we'd be concerned about at this time.
>
> >> Thanks!
> >> Justin
> >> Etsy Developer Supporthttp://www.etsy.com/developers
> >> 
>
> >> This message is a private conversation between you and Etsy. Please
> >> respect this confidentiality and refrain from distributing this
> >> communication without permission from Etsy. If you feel this message
> >> was sent to you in error, please delete it and let us know. Thank you.
>
> >> On Mon, Oct 2011 at 12:50 PM, bis...@gmail.com wrote:
>
> >> Hello, My name is Oscar. I am a software tester In my spare time I
> >> have written up a tutorial that uses your website to show how to use
> >> automated testing tools. It was brought to my attention that it may
> >> violate your terms of service for use of API's if it does I will
> >> gladly take it down. The tutorial is to help show how open source
> >> tools can be used for automated testing of websites. the code
> >> repository for this tutorial is 
> >> herehttps://github.com/hammernight/etsy_cucumber_taza_tutorial/Thanks
> >> Oscar
>
> >> 
>
> >> On Oct 10, 2011 6:06 PM, "Cliff Cyphers"  wrote:
>
> >> > Chuck
>
> >> > Good point, more people need to respect said terms of use.  Although
> >> > one's intentions isn't to inter-fear, perform harm, or use their data
> >> > for other purposes, it doesn't speak good for the OOS community to not
> >> > abide.
>
> >> > For demo purposes, why not just create a simple site as a rack app or
> >> > with camping, sinatra, etc.  Also, if there are specific test element
> >> > that would be good to cover for demo purposes I'll put them in the
> >> > demo site of QA Robusta.  So far the demo site supports a JS/CSS drop
> >> > down menu, tabed pages and an accordion style registration.
>
> >> > On Mon, Oct 10, 2011 at 5:59 PM, Chuck van der Linden  
> >> > wrote:
> >> > > Sorry for the initial hardline response.. I think I've run into one to
> >> > > many 'content rippers' lately who are asking questions about how they
> >> > > can use watir to access sites with the pretty clear intent of content
> >> > > theft and I had a bit of a knee-jerk response.
>
> >> > > I think the tutorial stuff that Bis and Alister are doing is valuable
> >> > > stuff and for a noble purpose that would all in all benefit the watir
> >> > > community.  However I think it would be a good idea to get official
> >> > > permission since while it might be in the spirit of what Etsy is all
> >> > > about, it is (at least by my reading) against their terms of use, and
> >> > > their api terms of use.  Specifically I think this work would violate
> >> > > these portions of their agreements:
>
> >> > > 1)  From their main terms of use:
> >> > > You agree that you will not use any robot,
> >> > > spider, scraper or other automated means to access Etsy for any
> >> > > purpose whatsoever, except to the extent expressly permitted by and in
> >> > > compliance with Etsy's API Terms of Use or otherwise without Etsy's
> >> > > prior express written permission.
>
> >> > > any Watir scripts would qualify under 'other automated means'
>
> >> > > 2) When we get into their API terms (http://www.etsy.com/developers/
> >> > > terms-of-use) it gets thornier because those terms basically restrict
> >> > > developers to using the API, and Watir isn't doing that.
>
> >> > >  9. Website Human Use Restriction And Use of API
> >> > >  The API is the only supported method for users to access data
> >> > > programmatically from Etsy. The Etsy Website, including Content and
> >> > > applications is published solely for direct acc

[wtr-general] watir-webdriver + protected mode in XP-IE8

2011-10-18 Thread RJ
Getting following error msg:
Selenium::WebDriver::Error::NoSuchDriverError: Unexpected error
launching Internet Explorer. Protected Mode must be set to the same
value (enabled or disabled) for all zones.

but this feature is not available on XP-IE8.  What to do.

Thanks,
RJ

-- 
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


Re: [wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Joe Fleck
Hi Jari,

Here is the HTML code.  Will this help?

Video Attachment Details




>
>> It doesn't object name i am giving it.  Do I need to use something else
>> like the actual object name of the text field?
>>
>>
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/element.rb:248:in
>> `assert_exists': unable to locate element, using {:type=>"file",
>> :tag_name=>"input", :id=>"the_file"}
>> (Watir::Exception::UnknownObjectException)
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:23:in
>> `value='
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:14:in
>> `set'
>>  from ./common/helper_methods.rb:182:in `share_documents'
>> from
>> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
>> `each'
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
>> `each'
>> from
>> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38
>>
>> On Tue, Oct 18, 2011 at 9:28 AM, Joe DiMauro  wrote:
>>
>>> Another thing I noticed. Due to the path ending with
>>> \criptDataFile.xls
>>>
>>> It appers that the backslash followed by the two characters "cr"
>>> is being interpeted as a Carridge Return.  You can see this
>>> in the error message:
>>>
>>> No such file or directory - Users/josephfleck/Documents/Download
>>> Docs/ iptDataFile.xls (Errno::ENOENT)
>>>  ^
>>> Notice the space instead of the characters"cr" indicating
>>> that \cr was interpreted as a Carriage Return, not the first
>>> two characters in the file name "criptDataFile.xls"
>>>
>>>
>>> So try all these:
>>> 1. Use a full pathname, not a relative path (as previously mentioned)
>>> Unless Ruby is running with the Root level of your Mac as it
>>> working
>>>directory, (which I'm pretty sure its not), then the Users
>>> directory will not be a valid relative path.)
>>>
>>> 2. Remove the backslashes. They are not necessary on Mac/Linus OS,
>>>(as previously mentioned), and may cause issues (e.g. \cr)
>>>
>>> 3. Always a good idea (as previously mentioned), to upgrade to the
>>>latest version of the gems, (and Ruby if possible)
>>>
>>>If you are also running safariWatir you may not be able to upgrade
>>>to Ruby 1.9.x.  I don't recall if safariWatir supports 1.9.x yet.
>>>
>>> 4. The space in the directory name should not be an issue, since the
>>>full path is quoted,  but whenever possible using directory
>>>   and file names without spaces is always safer.
>>>
>>>
>>> Joe DiMauro
>>>
>>>
>>> On Oct 17, 4:42 pm, Chuck van der Linden  wrote:
>>> > or escape the space with a backslash? same as you are doing for the
>>> > slashes?  (but Michael's solution of using double-quotes might be even
>>> > easier)
>>> >
>>> > On Oct 17, 1:50 pm, Željko Filipin 
>>> > wrote:
>>> >
>>> > > On Mon, Oct 17, 2011 at 10:01 PM, Joe Fleck 
>>> wrote:
>>> > > >  No such file or directory - Users/josephfleck/Documents/Download
>>> Docs/
>>> >
>>> > > iptDataFile.xls
>>> >
>>> > > Try putting the file in a folder that has no spaces, something
>>> > > like Users/josephfleck
>>> >
>>> > > Željko
>>>
>>> --
>>> 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
>>>
>>
>>  --
>> 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
>>
>
>  --
> 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
>

-- 
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


Re: [wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Joe Fleck
Hi,

One last issue.  How do i deal with file_fields that are hidden or disabled?

Joe

On Tue, Oct 18, 2011 at 10:51 AM, Joe Fleck  wrote:

> Hello,
>
> Got it! :-)
>
> changed the id: and it works.
>
> @browser.file_field(:id, "file_attachment_attachment")
>
> Thank you all again for your help.
>
> Joe
>
>
> On Tue, Oct 18, 2011 at 10:19 AM, Joe Fleck  wrote:
>
>> Hi,
>>
>> Thank you all for helping. I really appreciate it.
>>
>> I believe the file path is correct now because the error message I am now
>> getting has changed.
>>
>> Code:
>> #Attach file
>>   @browser.file_field(:id,
>> "the_file").set("/Users/josephfleck/Documents/DownloadDocs/DataFile.xls")
>>
>> It doesn't object name i am giving it.  Do I need to use something else
>> like the actual object name of the text field?
>>
>>
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/element.rb:248:in
>> `assert_exists': unable to locate element, using {:type=>"file",
>> :tag_name=>"input", :id=>"the_file"}
>> (Watir::Exception::UnknownObjectException)
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:23:in
>> `value='
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:14:in
>> `set'
>>  from ./common/helper_methods.rb:182:in `share_documents'
>> from
>> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
>> `each'
>> from
>> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
>> `each'
>> from
>> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38
>>
>> On Tue, Oct 18, 2011 at 9:28 AM, Joe DiMauro  wrote:
>>
>>> Another thing I noticed. Due to the path ending with
>>> \criptDataFile.xls
>>>
>>> It appers that the backslash followed by the two characters "cr"
>>> is being interpeted as a Carridge Return.  You can see this
>>> in the error message:
>>>
>>> No such file or directory - Users/josephfleck/Documents/Download
>>> Docs/ iptDataFile.xls (Errno::ENOENT)
>>>  ^
>>> Notice the space instead of the characters"cr" indicating
>>> that \cr was interpreted as a Carriage Return, not the first
>>> two characters in the file name "criptDataFile.xls"
>>>
>>>
>>> So try all these:
>>> 1. Use a full pathname, not a relative path (as previously mentioned)
>>> Unless Ruby is running with the Root level of your Mac as it
>>> working
>>>directory, (which I'm pretty sure its not), then the Users
>>> directory will not be a valid relative path.)
>>>
>>> 2. Remove the backslashes. They are not necessary on Mac/Linus OS,
>>>(as previously mentioned), and may cause issues (e.g. \cr)
>>>
>>> 3. Always a good idea (as previously mentioned), to upgrade to the
>>>latest version of the gems, (and Ruby if possible)
>>>
>>>If you are also running safariWatir you may not be able to upgrade
>>>to Ruby 1.9.x.  I don't recall if safariWatir supports 1.9.x yet.
>>>
>>> 4. The space in the directory name should not be an issue, since the
>>>full path is quoted,  but whenever possible using directory
>>>   and file names without spaces is always safer.
>>>
>>>
>>> Joe DiMauro
>>>
>>>
>>> On Oct 17, 4:42 pm, Chuck van der Linden  wrote:
>>> > or escape the space with a backslash? same as you are doing for the
>>> > slashes?  (but Michael's solution of using double-quotes might be even
>>> > easier)
>>> >
>>> > On Oct 17, 1:50 pm, Željko Filipin 
>>> > wrote:
>>> >
>>> > > On Mon, Oct 17, 2011 at 10:01 PM, Joe Fleck 
>>> wrote:
>>> > > >  No such file or directory - Users/josephfleck/Documents/Download
>>> Docs/
>>> >
>>> > > iptDataFile.xls
>>> >
>>> > > Try putting the file in a folder that has no spaces, something
>>> > > like Users/josephfleck
>>> >
>>> > > Željko
>>>
>>> --
>>> 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
>>>
>>
>>
>

-- 
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


Re: [wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Joe Fleck
Hello,

Got it! :-)

changed the id: and it works.

@browser.file_field(:id, "file_attachment_attachment")

Thank you all again for your help.

Joe

On Tue, Oct 18, 2011 at 10:19 AM, Joe Fleck  wrote:

> Hi,
>
> Thank you all for helping. I really appreciate it.
>
> I believe the file path is correct now because the error message I am now
> getting has changed.
>
> Code:
> #Attach file
>   @browser.file_field(:id,
> "the_file").set("/Users/josephfleck/Documents/DownloadDocs/DataFile.xls")
>
> It doesn't object name i am giving it.  Do I need to use something else
> like the actual object name of the text field?
>
>
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/element.rb:248:in
> `assert_exists': unable to locate element, using {:type=>"file",
> :tag_name=>"input", :id=>"the_file"}
> (Watir::Exception::UnknownObjectException)
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:23:in
> `value='
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:14:in
> `set'
> from ./common/helper_methods.rb:182:in `share_documents'
> from
> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
> `each'
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
> `each'
> from
> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38
>
> On Tue, Oct 18, 2011 at 9:28 AM, Joe DiMauro  wrote:
>
>> Another thing I noticed. Due to the path ending with
>> \criptDataFile.xls
>>
>> It appers that the backslash followed by the two characters "cr"
>> is being interpeted as a Carridge Return.  You can see this
>> in the error message:
>>
>> No such file or directory - Users/josephfleck/Documents/Download
>> Docs/ iptDataFile.xls (Errno::ENOENT)
>>  ^
>> Notice the space instead of the characters"cr" indicating
>> that \cr was interpreted as a Carriage Return, not the first
>> two characters in the file name "criptDataFile.xls"
>>
>>
>> So try all these:
>> 1. Use a full pathname, not a relative path (as previously mentioned)
>> Unless Ruby is running with the Root level of your Mac as it
>> working
>>directory, (which I'm pretty sure its not), then the Users
>> directory will not be a valid relative path.)
>>
>> 2. Remove the backslashes. They are not necessary on Mac/Linus OS,
>>(as previously mentioned), and may cause issues (e.g. \cr)
>>
>> 3. Always a good idea (as previously mentioned), to upgrade to the
>>latest version of the gems, (and Ruby if possible)
>>
>>If you are also running safariWatir you may not be able to upgrade
>>to Ruby 1.9.x.  I don't recall if safariWatir supports 1.9.x yet.
>>
>> 4. The space in the directory name should not be an issue, since the
>>full path is quoted,  but whenever possible using directory
>>   and file names without spaces is always safer.
>>
>>
>> Joe DiMauro
>>
>>
>> On Oct 17, 4:42 pm, Chuck van der Linden  wrote:
>> > or escape the space with a backslash? same as you are doing for the
>> > slashes?  (but Michael's solution of using double-quotes might be even
>> > easier)
>> >
>> > On Oct 17, 1:50 pm, Željko Filipin 
>> > wrote:
>> >
>> > > On Mon, Oct 17, 2011 at 10:01 PM, Joe Fleck 
>> wrote:
>> > > >  No such file or directory - Users/josephfleck/Documents/Download
>> Docs/
>> >
>> > > iptDataFile.xls
>> >
>> > > Try putting the file in a folder that has no spaces, something
>> > > like Users/josephfleck
>> >
>> > > Željko
>>
>> --
>> 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
>>
>
>

-- 
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


Re: [wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Željko Filipin
On Tue, Oct 18, 2011 at 4:19 PM, Joe Fleck  wrote:
> @browser.file_field(:id,
"the_file").set("/Users/josephfleck/Documents/DownloadDocs/DataFile.xls")
webdriver/elements/element.rb:248:in `assert_exists': unable to locate
element, using {:type=>"file", :tag_name=>"input", :id=>"the_file"}

It says there is not file field with id "the_file". Use the attributes of
the file field from the real page.

Željko

-- 
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


Re: [wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Jari Bakken
Some file upload solutions lets the user click a link, which then creates a
hidden file field and opens the upload dialog. The only way to deal with
these types of uploads is to make the file field visible, usually by
modifying its style through Browser#execute_script. This may be what you're
seeing, though unless you show us a page that will reproduce the problem,
it's a wild guess.

Jari

On Tue, Oct 18, 2011 at 4:19 PM, Joe Fleck  wrote:

> Hi,
>
> Thank you all for helping. I really appreciate it.
>
> I believe the file path is correct now because the error message I am now
> getting has changed.
>
> Code:
> #Attach file
>   @browser.file_field(:id,
> "the_file").set("/Users/josephfleck/Documents/DownloadDocs/DataFile.xls")
>
> It doesn't object name i am giving it.  Do I need to use something else
> like the actual object name of the text field?
>
>
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/element.rb:248:in
> `assert_exists': unable to locate element, using {:type=>"file",
> :tag_name=>"input", :id=>"the_file"}
> (Watir::Exception::UnknownObjectException)
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:23:in
> `value='
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:14:in
> `set'
>  from ./common/helper_methods.rb:182:in `share_documents'
> from
> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
> `each'
> from
> /Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
> `each'
> from
> /Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38
>
> On Tue, Oct 18, 2011 at 9:28 AM, Joe DiMauro  wrote:
>
>> Another thing I noticed. Due to the path ending with
>> \criptDataFile.xls
>>
>> It appers that the backslash followed by the two characters "cr"
>> is being interpeted as a Carridge Return.  You can see this
>> in the error message:
>>
>> No such file or directory - Users/josephfleck/Documents/Download
>> Docs/ iptDataFile.xls (Errno::ENOENT)
>>  ^
>> Notice the space instead of the characters"cr" indicating
>> that \cr was interpreted as a Carriage Return, not the first
>> two characters in the file name "criptDataFile.xls"
>>
>>
>> So try all these:
>> 1. Use a full pathname, not a relative path (as previously mentioned)
>> Unless Ruby is running with the Root level of your Mac as it
>> working
>>directory, (which I'm pretty sure its not), then the Users
>> directory will not be a valid relative path.)
>>
>> 2. Remove the backslashes. They are not necessary on Mac/Linus OS,
>>(as previously mentioned), and may cause issues (e.g. \cr)
>>
>> 3. Always a good idea (as previously mentioned), to upgrade to the
>>latest version of the gems, (and Ruby if possible)
>>
>>If you are also running safariWatir you may not be able to upgrade
>>to Ruby 1.9.x.  I don't recall if safariWatir supports 1.9.x yet.
>>
>> 4. The space in the directory name should not be an issue, since the
>>full path is quoted,  but whenever possible using directory
>>   and file names without spaces is always safer.
>>
>>
>> Joe DiMauro
>>
>>
>> On Oct 17, 4:42 pm, Chuck van der Linden  wrote:
>> > or escape the space with a backslash? same as you are doing for the
>> > slashes?  (but Michael's solution of using double-quotes might be even
>> > easier)
>> >
>> > On Oct 17, 1:50 pm, Željko Filipin 
>> > wrote:
>> >
>> > > On Mon, Oct 17, 2011 at 10:01 PM, Joe Fleck 
>> wrote:
>> > > >  No such file or directory - Users/josephfleck/Documents/Download
>> Docs/
>> >
>> > > iptDataFile.xls
>> >
>> > > Try putting the file in a folder that has no spaces, something
>> > > like Users/josephfleck
>> >
>> > > Željko
>>
>> --
>> 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
>>
>
>  --
> 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
>

-- 
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


Re: [wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Joe Fleck
Hi,

Thank you all for helping. I really appreciate it.

I believe the file path is correct now because the error message I am now
getting has changed.

Code:
#Attach file
  @browser.file_field(:id,
"the_file").set("/Users/josephfleck/Documents/DownloadDocs/DataFile.xls")

It doesn't object name i am giving it.  Do I need to use something else like
the actual object name of the text field?


/Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/element.rb:248:in
`assert_exists': unable to locate element, using {:type=>"file",
:tag_name=>"input", :id=>"the_file"}
(Watir::Exception::UnknownObjectException)
from
/Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:23:in
`value='
from
/Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.4/lib/watir-webdriver/elements/file_field.rb:14:in
`set'
from ./common/helper_methods.rb:182:in `share_documents'
from
/Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:159
from
/Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
`each'
from
/Users/josephfleck/.rvm/rubies/ree-1.8.7-2010.02/lib/ruby/gems/1.8/gems/fastercsv-1.5.4/lib/faster_csv.rb:696:in
`each'
from
/Users/josephfleck/Sites/within3/qa_automation/discussion/add_multiple_discussion.rb:38

On Tue, Oct 18, 2011 at 9:28 AM, Joe DiMauro  wrote:

> Another thing I noticed. Due to the path ending with
> \criptDataFile.xls
>
> It appers that the backslash followed by the two characters "cr"
> is being interpeted as a Carridge Return.  You can see this
> in the error message:
>
> No such file or directory - Users/josephfleck/Documents/Download
> Docs/ iptDataFile.xls (Errno::ENOENT)
>  ^
> Notice the space instead of the characters"cr" indicating
> that \cr was interpreted as a Carriage Return, not the first
> two characters in the file name "criptDataFile.xls"
>
>
> So try all these:
> 1. Use a full pathname, not a relative path (as previously mentioned)
> Unless Ruby is running with the Root level of your Mac as it
> working
>directory, (which I'm pretty sure its not), then the Users
> directory will not be a valid relative path.)
>
> 2. Remove the backslashes. They are not necessary on Mac/Linus OS,
>(as previously mentioned), and may cause issues (e.g. \cr)
>
> 3. Always a good idea (as previously mentioned), to upgrade to the
>latest version of the gems, (and Ruby if possible)
>
>If you are also running safariWatir you may not be able to upgrade
>to Ruby 1.9.x.  I don't recall if safariWatir supports 1.9.x yet.
>
> 4. The space in the directory name should not be an issue, since the
>full path is quoted,  but whenever possible using directory
>   and file names without spaces is always safer.
>
>
> Joe DiMauro
>
>
> On Oct 17, 4:42 pm, Chuck van der Linden  wrote:
> > or escape the space with a backslash? same as you are doing for the
> > slashes?  (but Michael's solution of using double-quotes might be even
> > easier)
> >
> > On Oct 17, 1:50 pm, Željko Filipin 
> > wrote:
> >
> > > On Mon, Oct 17, 2011 at 10:01 PM, Joe Fleck 
> wrote:
> > > >  No such file or directory - Users/josephfleck/Documents/Download
> Docs/
> >
> > > iptDataFile.xls
> >
> > > Try putting the file in a folder that has no spaces, something
> > > like Users/josephfleck
> >
> > > Željko
>
> --
> 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
>

-- 
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


[wtr-general] Re: watir-webdriver unable to detect firefox

2011-10-18 Thread Joe DiMauro
It appears that it can't find the file specified by the first
require statement.

require 'watir-webdriver'

Add the line
require 'rubygems"
as the first require in your scripts.

Joe

-- 
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


[wtr-general] Re: Handling a MAC Pro book File Upload window.

2011-10-18 Thread Joe DiMauro
Another thing I noticed. Due to the path ending with
\criptDataFile.xls

It appers that the backslash followed by the two characters "cr"
is being interpeted as a Carridge Return.  You can see this
in the error message:

No such file or directory - Users/josephfleck/Documents/Download
Docs/ iptDataFile.xls (Errno::ENOENT)
  ^
 Notice the space instead of the characters"cr" indicating
 that \cr was interpreted as a Carriage Return, not the first
 two characters in the file name "criptDataFile.xls"


So try all these:
1. Use a full pathname, not a relative path (as previously mentioned)
 Unless Ruby is running with the Root level of your Mac as it
working
directory, (which I'm pretty sure its not), then the Users
directory will not be a valid relative path.)

2. Remove the backslashes. They are not necessary on Mac/Linus OS,
(as previously mentioned), and may cause issues (e.g. \cr)

3. Always a good idea (as previously mentioned), to upgrade to the
latest version of the gems, (and Ruby if possible)

If you are also running safariWatir you may not be able to upgrade
to Ruby 1.9.x.  I don't recall if safariWatir supports 1.9.x yet.

4. The space in the directory name should not be an issue, since the
full path is quoted,  but whenever possible using directory
   and file names without spaces is always safer.


Joe DiMauro


On Oct 17, 4:42 pm, Chuck van der Linden  wrote:
> or escape the space with a backslash? same as you are doing for the
> slashes?  (but Michael's solution of using double-quotes might be even
> easier)
>
> On Oct 17, 1:50 pm, Željko Filipin 
> wrote:
>
> > On Mon, Oct 17, 2011 at 10:01 PM, Joe Fleck  wrote:
> > >  No such file or directory - Users/josephfleck/Documents/Download Docs/
>
> > iptDataFile.xls
>
> > Try putting the file in a folder that has no spaces, something
> > like Users/josephfleck
>
> > Željko

-- 
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


Re: [wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Željko Filipin
On Tue, Oct 18, 2011 at 12:14 PM, Naveen  wrote:
>Relevant HTML is as follows and when i try the click its not showing
any errors but dropdown window is not opening

I would suggest that you read a bit about HTML.

You are trying to click a LINK inside DIV element:

$ff.div(:id,"NetworkAnalysisTabPanel").div(:index,1).div(:index,1).ul(:index,1).li(:index,1).link(:index,2).click

And you really want to click a select list, only it is not select list
(SELECT tag), but unordered list (UL and LI tags):






If you wand to click the first link in above HTML try this:

browser.link(:class => "x-tab-strip-close").click

If you want to click the second link try:

browser.link(:id => "ext-gen794").click

Željko

-- 
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


Re: [wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Naveen
I checked in the console by enabling the log events its showing



mousemove clientX=73, clientY=113
mousemove clientX=74, clientY=113
mousemove clientX=75, clientY=113
mousemove clientX=76, clientY=113
mousedown clientX=76, clientY=113
mouseup clientX=76, clientY=113
click clientX=76, clientY=113

-- 
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


Re: [wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Naveen
Hi,

   Relevant HTML is as follows and when i try the click its not showing any
errors but dropdown window is not opening







**
**
**
**























Bold part in the HTML is the location of element
-- 
*Thanks & Regards,
Naveen.Kandakur

*

-- 
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


Re: [wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Željko Filipin
On Tue, Oct 18, 2011 at 11:52 AM, Naveen  wrote:
> i tried the following
> but its not clicking on  element.

1) read this:
http://stackoverflow.com/questions/3787555/how-to-find-out-which-javascript-events-fired
2) show us relevant HTML
3) any error messages?

Željko

-- 
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


Re: [wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Naveen
HI,

 Following method is focusing on the element but i wanted to click on the
element

$ff.div(:id,"NetworkAnalysisTabPanel").div(:index,1).div(:index,1).ul(:index,1).li(:index,1).link(:index,2).flash

i tried the following

$ff.div(:id,"NetworkAnalysisTabPanel").div(:index,1).div(:index,1).ul(:index,1).li(:index,1).link(:index,2).click

but its not clicking on  element.

*Thanks & Regards,
Naveen.Kandakur
mob:9739336675
email id:naveen.kanda...@gmail.com
naveen.kanda...@yahoo.com
*

-- 
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


Re: [wtr-general] facing problem in calling a function

2011-10-18 Thread Raveendran P
Hi Babu,

Write a method First. And call it from next line

But in your case calling the method before defining it.


It Should be

def setup (iebro,val)
iebro.goto xlsheet.Range('C'"#val").value
  end

setup(browser2,$i)



Thanks

On Tue, Oct 18, 2011 at 1:58 AM, Babu  wrote:

> hi,
> require 'rubygems'
> require 'watir-webdriver'
> require 'win32ole'
> xl = WIN32OLE.new('Excel.Application')
> xl.visible = true
> xlbook = xl.workbooks.open('C:\Suvo\ControlFile.xls')
> xlsheet = xlbook.worksheets(1)
> xlsheet.Select
> count = xlsheet.Range('A1').currentRegion.Rows.count
> $i = 2;
> $num = count;
> val = 10;
> browser2 = Watir::Browser.new :ie
> setup(browser2,$i)
>
>def setup (iebro,val)
>iebro.goto xlsheet.Range('C'"#val").value
>   end
>
>
> i am getting error like:
> chrome.rb:: undefined method `setup' for main:Object (NoMethodError)
>
> --
> 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
>



-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

-- 
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


Re: [wtr-general] Cannot fill nested text_field in one form

2011-10-18 Thread Raveendran P
Hi,

I have navigated the website provided by you.

The Working Code for Google Chrome

ie=Watir::Browser.new :chrome
ie.goto("http://contour.com/users/";)
ie.link(:id,'dd1').click (To Click Sigin In Drop Box)
ie.text_field(:id,'user_email').set("jazzezr...@gmail.com")
ie.text_field(:id,'user_password').set("testing")



But in IE -->

When I Click Sign-In --> the drop down not appears. Instead of that its
navigating to http://contour.com/users/#

Also that page contains some Script issues. So please discuss with Dev's to
fix the Script issues before proceeding with IE


Thanks


On Tue, Oct 18, 2011 at 6:24 AM, get  wrote:

> Hey guys,
>
> I am realatively new to Watir. I have a simple project to fill up the
> user sign-up sheet. However, my code only filled the first part of the
> form, the user name, and then a javascipt fired up, and then it just
> exist without filling up the rest. It exit with out any error message.
>
> please help.
> Thank you guys!!
>
> here is my code:
>
> def FormFillUp (ie)
>
>  ie.text_field(:id,"user_display_name").set("SignUpRobot")
>
>  ie.text_field(:id,"user_email").set("signupro...@msn.com")
>
>  ie.text_field(:id,"user_password").set("1234567")
> end
>
> and here is website i am trying to test. "http://contour.com/users/
> new"
>
> and attached the section of the form from page source code:
>
>   id="new_user" method="post"> > value="TAYnWYYFKOCppQsikHwRlVNq3dYuNL03SYePmixMcUU=" />
>
>  
> name="user[display_name]" size="30" type="text" />
>contour.com/users/ class="display_name">you
>  
>  
> name="user[email]" size="30" type="text" />
>Keep it valid.
>  
>  
> name="user[password]" size="30" type="password" />
>Be sneaky. At least 6 characters.
>  
>
> name="user[password_confirmation]" type="hidden" />
>
> 
>
> --
> 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
>



-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

-- 
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


Re: [wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Željko Filipin
On Tue, Oct 18, 2011 at 8:26 AM, Naveen Kandakur 
wrote:
>Is there any watir method to select 'drop down menu' ?

browser.select_list(:id => "one").set("is fun")

More information:

http://wiki.openqa.org/display/WTR/Selection+Boxes

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
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


Re: [wtr-general] watir-webdriver unable to detect firefox

2011-10-18 Thread Željko Filipin
On Tue, Oct 18, 2011 at 7:52 AM, tester  wrote:
> i am using ruby 1.8.6
> and gems
>  watir (1.6.7, 1.5.6)
> watir-webdriver (0.1.7)

I would suggest that you follow this instructions to install recent versions
of Ruby and Watir:

https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host

-- 
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


Re: [wtr-general] watir-webdriver unable to detect firefox

2011-10-18 Thread Raveendran P
Hi ,

It seems like 'ffi' library not installed properly.

1. Open Command prompt
2. >gem install ffi
3. Run the script again

HElp --> http://rubygems.org/gems/ffi

If still it throws any error then

4>uninstall watir-webdriver
5>install watir-webdriver

Thanks


On Tue, Oct 18, 2011 at 11:22 AM, tester  wrote:

> hi
>
> i am using ruby 1.8.6
> and gems
>  watir (1.6.7, 1.5.6)
> watir-webdriver (0.1.7)
>
> and i tried to execute domo program
>  require 'watir-webdriver'
>
>  browser = Watir::Browser.new :firefox
>  browser.goto "http://google.com";
>  browser.text_field(:name => 'q').set("WebDriver rocks!")
>  browser.button(:name => 'btnG').click
>  puts browser.url
>  browser.close
> getting an error
>
> c:/Ruby1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `gem_original_require': no such file to load -- ffi (LoadError)
>from
> c:/Ruby1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> `require'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/childprocess-0.1.4/lib/
> childprocess/windows.rb:1
>from c:/Ruby1/lib/ruby/gems/1.8/gems/childprocess-0.1.4/lib/
> childprocess.rb:79:in `close_on_exec'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/firefox/socket_lock.rb:58:in `can_lock?'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/firefox/socket_lock.rb:43:in `lock'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/firefox/socket_lock.rb:29:in `locked'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/firefox/launcher.rb:32:in `launch'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/firefox/bridge.rb:21:in `initialize'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/common/driver.rb:38:in `new'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver/common/driver.rb:38:in `for'
>from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
> selenium/webdriver.rb:51:in `for'
>from
> c:/Ruby1/lib/ruby/gems/1.8/gems/watir-webdriver-0.1.7/lib/watir-
> webdriver/browser.rb:34:in `initialize'
>from test.rb:5:in `new'
>
> any body know about this issue
>
> please resolve
>
> Thanks
> Pavan
>
> --
> 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
>



-- 
Regards,
P.Raveendran
http://raveendran.wordpress.com

-- 
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


Re: [wtr-general] watir-webdriver unable to detect firefox

2011-10-18 Thread Jari Bakken
On Tue, Oct 18, 2011 at 7:52 AM, tester  wrote:

> hi
>
> i am using ruby 1.8.6
> and gems
>  watir (1.6.7, 1.5.6)
> watir-webdriver (0.1.7)
>
>
Make sure you have the latest version of these gems: watir-webdriver,
childprocess, selenium-webdriver.

Also, you should update your Ruby installation - 1.8.6 is not officially
supported by WebDriver (i.e. if it works, it's just by luck).

-- 
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


[wtr-general] Unable to click_no_wait in modal dialog window

2011-10-18 Thread Anthony
Hi, I'm having an issue where I'm trying to execute a click_no_wait
command in a webpage dialog. Within this dialog, I need to use a
click_no_wait because another webpage dialog pops up which I need to
automate.

I can use a click command, however, this does not work as Watir is
waiting for the page to finish loading but it won't because a new
modal dialog appears.

Any ideas on how I can create a new click_no_wait method that works
within a modal dialog or if I can create a new click method that does
not wait?

Any help would be appreciated.

-A

-- 
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


[wtr-general] Cannot fill nested text_field in one form

2011-10-18 Thread get
Hey guys,

I am realatively new to Watir. I have a simple project to fill up the
user sign-up sheet. However, my code only filled the first part of the
form, the user name, and then a javascipt fired up, and then it just
exist without filling up the rest. It exit with out any error message.

please help.
Thank you guys!!

here is my code:

def FormFillUp (ie)

  ie.text_field(:id,"user_display_name").set("SignUpRobot")

  ie.text_field(:id,"user_email").set("signupro...@msn.com")

  ie.text_field(:id,"user_password").set("1234567")
end

and here is website i am trying to test. "http://contour.com/users/
new"

and attached the section of the form from page source code:

 

  

contour.com/users/you
  
  

Keep it valid.
  
  

Be sneaky. At least 6 characters.
  





-- 
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


[wtr-general] watir-webdriver unable to detect firefox

2011-10-18 Thread tester
hi

i am using ruby 1.8.6
and gems
 watir (1.6.7, 1.5.6)
watir-webdriver (0.1.7)

and i tried to execute domo program
  require 'watir-webdriver'

  browser = Watir::Browser.new :firefox
  browser.goto "http://google.com";
  browser.text_field(:name => 'q').set("WebDriver rocks!")
  browser.button(:name => 'btnG').click
  puts browser.url
  browser.close
getting an error

c:/Ruby1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require': no such file to load -- ffi (LoadError)
from c:/Ruby1/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
from c:/Ruby1/lib/ruby/gems/1.8/gems/childprocess-0.1.4/lib/
childprocess/windows.rb:1
from c:/Ruby1/lib/ruby/gems/1.8/gems/childprocess-0.1.4/lib/
childprocess.rb:79:in `close_on_exec'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/firefox/socket_lock.rb:58:in `can_lock?'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/firefox/socket_lock.rb:43:in `lock'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/firefox/socket_lock.rb:29:in `locked'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/firefox/launcher.rb:32:in `launch'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/firefox/bridge.rb:21:in `initialize'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/common/driver.rb:38:in `new'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver/common/driver.rb:38:in `for'
from c:/Ruby1/lib/ruby/gems/1.8/gems/selenium-webdriver-0.1.1/lib/
selenium/webdriver.rb:51:in `for'
from c:/Ruby1/lib/ruby/gems/1.8/gems/watir-webdriver-0.1.7/lib/watir-
webdriver/browser.rb:34:in `initialize'
from test.rb:5:in `new'

any body know about this issue

please resolve

Thanks
Pavan

-- 
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


[wtr-general] Regarding selecting dropdown menu

2011-10-18 Thread Naveen Kandakur
Hello,

Is there any watir method to select 'drop down menu' ? and its
content, i tried with select list() its not working

my tags are as follows

 
  
 
 
 
   


my element is second anchor tab

Thanks
Naveen Kandakur


-- 
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