[wtr-general] Re: Watir+Webdriver/Cucumber + Appium on Sauce Labs

2015-10-01 Thread Dan
If you're not testing a native app you don't need appium, so maybe that 
will simplify your search?

On Monday, September 28, 2015 at 4:01:35 PM UTC-4, Farooq wrote:
>
> For more clarification and recommendations, I'm looking for the best way 
> to test the a mobile web app, NOT looking to test a native app.
>
> On Monday, September 28, 2015 at 3:53:18 PM UTC-4, Farooq wrote:
>>
>> Has anyone successfully gotten this config to 
>> work: Watir+Webdriver/Cucumber + Appium on Sauce Labs?
>>
>> Haven't found much online...
>>
>

-- 
-- 
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/d/optout.


[wtr-general] Re: attach files to gmail when compose email, using mac OSC

2015-08-17 Thread Dan
Not sure if you're just practicing against Gmail, which I think is actually 
against the terms of service, but you're really not going to want to try 
and automate sending email through the GUI.  You'd be much better off using 
a gem such as the one below:

https://github.com/gmailgem/gmail


On Monday, August 17, 2015 at 8:40:43 AM UTC-4, Aya Akl wrote:
>
> Hi there,
>
> I am trying to automate attaching files when composing an email using 
> gmail.
> I tried to use "$browser.file_field"  but it didn't work, the file_field 
> cannot be located.
>
> I am using mac OSX
>
> any help please will be much appreciated.
>
> Regards,
> Aya
>

-- 
-- 
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/d/optout.


[wtr-general] Re: Checking class equality in browser

2015-03-13 Thread Dan
Posting the error you get would help.  You don't need the "for i" or the 
each.  Just the below should do it:

b.divs(:class => "_again").each { |div| puts div.text }
On Thursday, March 12, 2015 at 5:30:27 AM UTC-4, Vish wrote:
>
> Hey guys,
>
> I'm trying to get all divs in a page with class = "_again" and print the 
> text that follows. How do I do this? 
>
> For eg., I got some help on the #watir IRC suggesting I do the following:
>
> for i in browser.divs(class: "_again").each do { |div| puts div.text }
>
> But I'm getting numerous syntax errors!
>
> Can I get some help on this?
>
> Thanks,
> Vish
>

-- 
-- 
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/d/optout.


[wtr-general] Re: newbie to watir-webdriver....

2015-02-19 Thread Dan
I would check out https://leanpub.com/cucumber_and_cheese if you're just 
getting started.

On Wednesday, February 18, 2015 at 1:05:18 AM UTC-5, rocky wrote:
>
>
> Hi all,
>
> I am just stated to learn watir-webdriver,could anyone share sample 
> framework code which will help me alot.
>
> Advance thanks
>
> Regards,
> rocky.
>

-- 
-- 
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/d/optout.


[wtr-general] Re: recommended version of ruby/gem/driver

2015-02-04 Thread Dan
frame and iframe are different elements now, so you might want to check 
that.  It used be that frame found frame and iframe, but no longer.

On Wednesday, February 4, 2015 at 5:22:26 AM UTC-5, t.ton...@gmail.com 
wrote:
>
> Hi all,
>
> I used to use watir for testing 2 years ago. Recently I wanted to rerun 
> the tests I wrote, but they no longer run, since in between I reinstalled 
> my OS and updated a few things: browser, chromedriver, ruby, etc.
>
> Currently I am using:
>
> - Chrome 40.0.2214.94 (64-bit) (installed on ubuntu 64bit using google 
> apt repo)
> - chromedriver: 2.14 (downloaded from 
> http://chromedriver.storage.googleapis.com/)
> - ruby: MRI 1.9.3, installed via rbenv/ruby-build
> - watir-webdriver:  0.6.11
>
>
> The problem I am having: I have a complex web page with many nested frames 
> like this:
>
> frame (top)
>   frame name=viewport
> frame name=menuframe
>   frame name=clientframe0
>   frame name=clientframe1
>   .
>   .
>   frame name=clientframe9
>
> I used to access menuframe as follows:
>
> viewport = browser.frame(:name => "viewport")
> viewport.exists? # true
> viewport.html # print expected html content
>
> menuframe = viewport.frame(:name => "menuframe")
> menuframe.exists? # false
>
> # next try
> menuframe = viewport.frame(:index => 0)
> menuframe.exists? # false
>
>
> Any hint what I should try please?
>
> Regards,
> Tony
>

-- 
-- 
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/d/optout.


[wtr-general] Clicking OK in a Save As dialog

2015-01-05 Thread Dan Sharp
Hi!

I'm new to Watir... working on a script to automate some browser screen 
scraping.

One page in particular has this problem that I'm stuck on:  the page has a 
link that is a javascript link, and the result of the javascript is that it 
generates/sends a PDF to be downloaded/saved.  So when I use Watir to click 
the link, I get the Save As dialog, but I have no idea how to make it 
actually click the "OK" button in the Save As dialog. It's not a javascript 
window, so the usual javascript dialog/alert methods don't work.  Also, as 
the link is not a direct link to the PDF, I can't right-click on it to save 
it without the dialog.

I tried looking through the source to see if the URL was just hidden, but 
it's not... it appears to be generated via some convoluted javascript.

So I'm stuck. I can manually click the link and get the Save As dialog and 
manually click the "OK" button (I'm on a mac, using Firefox, if the 
matters).  But I can't automate it.

Any help?

Thanks!

-Dan

-- 
-- 
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/d/optout.


[wtr-general] Re: Watir - Unable to capture Span Element Text value

2015-01-03 Thread Dan
Give this a try.  From your description it sounds like you're looking for 
the text and not the value.  You might also be running into a timing issue 
here.

puts @browser.span(:id => "*lblTitleHolder*").when_present.text

On Friday, December 26, 2014 5:29:52 PM UTC-5, Ma St wrote:
>
> I am attempting to figure out how to capture an element's text value (ex. 
> span id text value = "Welcome"), but I keep getting an error that it is 
> unable to locate the value.  The following is my statement in the ruby 
> file.  I tried online forums and documentation, but the syntax seems 
> tricky.  Is there something about the syntax that is off?  I can report on 
> the URL, so I know it sees my webpage.  I tried specifying the span id as a 
> tag, but that does not work either.  
>  
> *.rb file*
> mark = @browser.div(:id => "content-holder")
> p mark
>  
> *Error:*
> #"content-holder", 
> :tag_name=>"div
> "}>
>  
> *HTML:*
> 
> 
>  
>  
>  style="table-layout: fixed">
> 
> 
> 
> 
> 
> *Welcome*
>

-- 
-- 
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/d/optout.


[wtr-general] Re: whats the best way for automating app developed in angularjs

2014-10-21 Thread Dan
If you're testing from the presentation layer, it doesn't matter what's 
behind the scenes on the server.  WATIR is a great way to test websites.

On Monday, October 20, 2014 5:14:10 PM UTC-4, christina wrote:
>
> Hi,
>
> I have a question,
>
> has anyone experience with https://docs.angularjs.org/guide/e2e-testing?
>
>
> If the application is developed using angular js
> is still watir the best way for automation testing?
>
>
>
> Kind regards,
> Cristina
>

-- 
-- 
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/d/optout.


[wtr-general] Re: Watir Webdriver Safari : A modal dialog was opened. The SafariDriver does not support interacting with modal dialogs

2014-07-22 Thread Dan
Ok.  You have a couple of options then.

$driver.alert.ok rescue nil
 or probably better

$driver.alert.ok if b.alert.exists?




On Tuesday, July 22, 2014 6:08:08 PM UTC-4, Dimitri Reynaga wrote:
>
> No, it stops completely unfortunately.
>
> On Tuesday, July 22, 2014 7:16:24 AM UTC-7, Dan wrote:
>>
>> Your test continues after you get this error right?  You might need to 
>> wrap the $driver.alert.ok in a rescue block if not, but selenium will do 
>> exactly what it says below for Safari and dismiss any alerts it sees 
>> automatically.
>>
>> On Monday, July 21, 2014 4:13:43 PM UTC-4, Dimitri Reynaga wrote:
>>>
>>> While using the watir safari webdriver, the webdriver terminates as soon 
>>> as it encounters an alert pop-up. Are there any workarounds that will 
>>> either allow Safari webdriver to function properly with alerts, or to 
>>> prevent the alerts from appearing at all?
>>>
>>> $driver.button(:xpath, "//button[@class='btn btn-success 
>>> btn-success-red']").wait_until_present
>>> $driver.button(:xpath, "//button[@class='btn btn-success 
>>> btn-success-red']").click
>>>
>>> $driver.alert.ok()
>>>   $log.info("create organization successful")
>>>
>>> error:
>>>
>>>
>>> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/safari/bridge.rb:73:in
>>>  raw_execute': 
>>> A modal dialog was opened. The SafariDriver does not support interacting 
>>> with modal dialogs. To avoid hanging your test, the alert has been 
>>> dismissed. For more information, see 
>>> http://code.google.com/p/selenium/issues/detail?id=3862 
>>> (Selenium::WebDriver::Error::UnhandledAlertError) from 
>>> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:612:in
>>>  
>>> execute' from 
>>> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:369:in
>>>  clickElement' 
>>> from 
>>> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/element.rb:54:in
>>>  
>>> click' from 
>>> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.10/lib/watir-webdriver/elements/element.rb:132:in
>>>  click' 
>>> from /Users/usr/Documents/workspace/TTQA 
>>> Safari/tttestlibrary.rb:47:increate_org' 
>>> from /Users/usr/Documents/workspace/TTQA Safari/ttorgusercompare.rb:23:in 
>>> org_user_compare' 
>>> from /Users/usr/Documents/workspace/TTQA Safari/ttorgusercompare.rb:34:in
>>> '
>>>
>>> Thanks!
>>>
>>>

-- 
-- 
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/d/optout.


[wtr-general] Re: Watir Webdriver Safari : A modal dialog was opened. The SafariDriver does not support interacting with modal dialogs

2014-07-22 Thread Dan
Your test continues after you get this error right?  You might need to wrap 
the $driver.alert.ok in a rescue block if not, but selenium will do exactly 
what it says below for Safari and dismiss any alerts it sees automatically.

On Monday, July 21, 2014 4:13:43 PM UTC-4, Dimitri Reynaga wrote:
>
> While using the watir safari webdriver, the webdriver terminates as soon 
> as it encounters an alert pop-up. Are there any workarounds that will 
> either allow Safari webdriver to function properly with alerts, or to 
> prevent the alerts from appearing at all?
>
> $driver.button(:xpath, "//button[@class='btn btn-success 
> btn-success-red']").wait_until_present
> $driver.button(:xpath, "//button[@class='btn btn-success 
> btn-success-red']").click
>
> $driver.alert.ok()
>   $log.info("create organization successful")
>
> error:
>
>
> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/safari/bridge.rb:73:in
>  raw_execute': 
> A modal dialog was opened. The SafariDriver does not support interacting 
> with modal dialogs. To avoid hanging your test, the alert has been 
> dismissed. For more information, see 
> http://code.google.com/p/selenium/issues/detail?id=3862 
> (Selenium::WebDriver::Error::UnhandledAlertError) from 
> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:612:in
>  
> execute' from 
> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/remote/bridge.rb:369:in
>  clickElement' 
> from 
> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/selenium-webdriver-2.42.0/lib/selenium/webdriver/common/element.rb:54:in
>  
> click' from 
> /Users/usr/.rvm/rubies/ruby-2.1.2/lib/ruby/gems/2.1.0/gems/watir-webdriver-0.6.10/lib/watir-webdriver/elements/element.rb:132:in
>  click' 
> from /Users/usr/Documents/workspace/TTQA 
> Safari/tttestlibrary.rb:47:increate_org' 
> from /Users/usr/Documents/workspace/TTQA Safari/ttorgusercompare.rb:23:in 
> org_user_compare' 
> from /Users/usr/Documents/workspace/TTQA Safari/ttorgusercompare.rb:34:in'
>
> Thanks!
>
>

-- 
-- 
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/d/optout.


[wtr-general] Re: running watir webdriver scripts on Virtualbox

2014-06-28 Thread Dan
You might be able to use selenium grid for this?  Start up a grid server 
and then a node on the virtual box instance and connect it to the grid.

On Thursday, June 26, 2014 1:49:34 PM UTC-4, Joe Fl wrote:
>
> Hi Everyone,
>
> I need some guidance.  I have a mac and installed Virtualbox with Windows7 
> IE10.  I would like to kick off my scripts and allow them to run against 
> the Windows7 Virtualbox instant but not sure how to go about doing this.  I 
> have never done this before and my searches have come up short.
>
> If anyone could provide me with documentation, website with instructions 
> on how to do this i would appreciate it.
>
> thank you,
> 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

--- 
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/d/optout.


[wtr-general] Re: Sophisticated request, catch elements in array

2014-05-23 Thread Dan
You can do something like :

browser.div(:id => "folder-tree").spans(:class => "fancytree-title")

On Friday, May 23, 2014 8:29:23 AM UTC-4, QOExcel wrote:
>
> Hi ALL!!
> I have a page with elements, i can find some of them:
>
>>   span(:get_folder_names, :xpath => 
>> ".//div[@id='folder-tree']/ul/li/ul/li[1]/span/span[3]")
>>   span(:get_folder_second,:xpath => 
>> ".//*[@id='folder-tree']/ul/li/ul/li[2]/span/span[3]" )
>>   span(:get_folder_third,:xpath => 
>> ".//*[@id='folder-tree']/ul/li/ul/li[3]/span/span[3]" )
>>
>
> 
>
> My question is, how should i deal with such elements to get them in array. 
> Is it possible for span?
>
>
>   
>

-- 
-- 
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/d/optout.


[wtr-general] Re: Code stops working when executing on 2 simultaneous browsers

2014-04-03 Thread Dan
You really need to watch your variable scope when you try to thread thing 
like this.  I've run multiple browsers at the same time without issue.  Can 
you post an example of your code so we can help?

On Wednesday, April 2, 2014 5:23:11 PM UTC-4, gunit888 wrote:
>
> I'm working on a script using watir-webdriver, which I'm trying to execute 
> in parallel.  By parallel, I mean that the code spins off a new thread per 
> user designated, and executes the same script for each user, resulting in 
> an additional web browser per user (in our case, Firefox, but I don't 
> believe that is relevant).
>
> The script works fine with just 1 user, I can run through my scenario 10 
> times with a single user, and everything works.
>
> However, when I try to run it with 2 users (2 threads, each with it's own 
> browser), weird things seem to happen. In particular, it seems like things 
> are happening out of order.
>
> For example, part of the script sets a date field, does another step or 
> two, and then tries to submit the form.  However, *sometimes*, the form's 
> field validation indicates that there's an invalid date entered, as if it 
> hasn't fully registered that the date is entered.  It usually gets through 
> an iteration or two before this happens, so I know the code itself 
> "works".  I suspect there may be timing issues, due to the overhead of 
> extra browsers firing up on the same machine.
>
> Trying to run it with 5 users simultaneously is very slow, and it actually 
> throws a WebDriverError, due to being unable to obtain a stable firefox 
> connection in 60 seconds.
>
> Is what I'm attempting here (N simultaneous browsers running on one 
> machine) possible with watir-webdriver?  Can this be done, or is there some 
> fundamental limitation?  Is there another way to accomplish this?
>

-- 
-- 
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/d/optout.


Re: [wtr-general] Clicking an empty Div with Watir

2014-03-21 Thread Dan
Using sleeps is a bad idea.  There's plenty of wait methods available that 
do a much better job.  See here http://watirwebdriver.com/waiting/.

On Friday, March 21, 2014 5:10:08 AM UTC-4, jazze...@gmail.com wrote:
>
> Hi,
>
>   add --> sleep 10 after 
>
> browser.element(:class, 'loginTwitter').click
>
> I hope it will solve your problem
>
>
> On Wed, Mar 19, 2014 at 11:36 PM, Oscar Rieken 
> > wrote:
>
>> http://watirwebdriver.com/browser-popups/
>>
>>
>> On Wed, Mar 19, 2014 at 1:57 PM, Elad Shalom 
>> > wrote:
>>
>>> Thanks, for your help.  I was told to quit that one and do a different 
>>> POC.
>>> Should be very simple, but again - doesn't work.
>>>
>>> This should login to a website with Twitter.
>>>
>>> browser = Watir::Browser.start 'http://www.12mass.com/'
>>> browser.link(:class, 'priceLogin').click
>>> sleep 2
>>> browser.element(:class, 'loginTwitter').click
>>> browser.window.last.use do
>>> browser.text_field(:id, 'username_or_email').set 'name'
>>> browser.text_field(:id, 'password').set 'pass'
>>> 
>>> browser.button(:id, 'allow').click
>>> end
>>>
>>>
>>> I get to a point where a new window opens, but I can't reach it and fill 
>>> the credentials... 
>>>
>>> -- 
>>> -- 
>>> 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/d/optout.
>>>
>>
>>  -- 
>> -- 
>> 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/d/optout.
>>
>
>
>
> -- 
> 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

--- 
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/d/optout.


[wtr-general] Re: Firefox for OS X version 28 does not work with Watir-Webdriver

2014-03-20 Thread Dan
Sounds like you need to update your selenium-webdriver gem.  However, I 
don't see an update being pushed for that yet.  The selenium team is 
usually very quick with these updates, so it'll probably just be a couple 
of days.  You can watch http://docs.seleniumhq.org/download/ for updates.


On Wednesday, March 19, 2014 11:51:53 PM UTC-4, Lonny Eachus wrote:
>
>
> My Firefox updated itself to version 28 today, and Watir-Webdriver stopped 
> working. The .new method would open a window, but it never fully 
> initialized. Eventually it halts with error message "Could not connect in 
> 60 seconds."
>
> I tried re-installing version 28 but that had no effect.
>
> After re-installing version 27 it worked again.
>
>
>

-- 
-- 
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/d/optout.


Re: [wtr-general] simple way for this xpath?

2014-03-13 Thread Dan
I would recommend something like this actually.  If you have something that 
you know, like the name of the dog, you can work back up and down the tree. 
 Using index can be your only option sometimes, but it can be brittle.

For example:

b.h3(:text => "Hanna").parent.parent.button(:value => "View Details").click

On Thursday, March 13, 2014 5:51:39 PM UTC-4, christina wrote:
>
> Hi and thank you!
>
> I found the way:
>
> @browser.button(:value => 'View Details', :index => 0).click
>
> works great.
>
>
>
> On Thu, Mar 13, 2014 at 1:58 PM, c w  >wrote:
>
>> Thank you!
>>
>> The question is when we go here http://puppies.herokuapp.com
>>
>> how can we click in an easy way on the View Detail button for Hanna? or 
>> any View Detail button as we do not have an id.
>>
>> Kind Regards,
>> Cristina
>>
>>
>> On Thu, Mar 13, 2014 at 6:03 AM, Oscar Rieken 
>> > wrote:
>>
>>> when you are using watir you almost never have to use xpath. you didnt 
>>> post any html so its kind of hard to give you a simpler way to locate 
>>> without using xpath. but I would probably try to break out just the 
>>> container and then locate the button inside of it.
>>>
>>>
>>> On Wed, Mar 12, 2014 at 5:20 PM, c w 
>>> > wrote:
>>>
 Hi,

 I am using the following and works. 
 However my question is if there simple way to define these xpaths?


 When /^I click the first View Details button$/ do
@browser.button(:xpath, 
 "/html/body/div[@id='container']/div[@id='wrapper']/div[@id='content']/div[@class='puppy_list'][1]/div[@class='list_line_odd']/div[@class='view']/form[@class='button_to']/div/input[@class='rounded_button']").click()
 end

 When /^I click the second View Details button$/ do
   @browser.button(:xpath, 
 "/html/body/div[@id='container']/div[@id='wrapper']/div[@id='content']/div[@class='puppy_list'][2]/div[@class='list_line_even']/div[@class='view']/form[@class='button_to']/div/input[@class='rounded_button']").click()

 end


 Kind Regards,
 Cristina 

 -- 
 -- 
 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/d/optout.

>>>
>>>  -- 
>>> -- 
>>> 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/d/optout.
>>>
>>
>>
>

-- 
-- 
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/d/optout.


[wtr-general] Re: Cannot reach a nested menu

2014-03-03 Thread Dan
I think you need to do something like the below.

# Click tst to make the menu appear
a.span(:text => 'tst').click

# This will intelligently wait for the new menu item to be available and 
then click on it.
a.span(:text => "Activar").when_present.click 

On Wednesday, February 26, 2014 9:30:51 PM UTC-5, Yutzin Wong wrote:
>
> Hi,I started using watir few days ago, and still can find the way to reach 
> a dojo object.
>  I am using the following code, in order to display a Menu with the right 
> click (In Selenium context menu).
>
>
> # encoding: utf-8
>> require 'watir-webdriver'
>> b = Watir::Browser.new
>>
>>
>> b.goto 'localhost:8080/swbadmin'
>> b.text_field(:name => 'wb_username').set 'admin'
>> b.text_field(:name => 'wb_password').set 'webbuilder'
>> b.button(:text => 'Login').click
>>
>> a = b.div(:class => 'dijitTreeNodeContainer').div(:class => 
>> 'dijitTreeIsRoot').div(:class => 'dijitTreeRow').span(:class => 
>> 'dijitTreeContent')
>> c= a.span(:text => 'tst')
>> c.right_click
>>
>
>  The thing is that dijitTreeNodeContainer is made by a dojo. So i have to 
> wait until it loads all the information, I tried to use Watir::wait.until{ 
> span(:text => 'tst').visible ?} but it dindn't work. 
> With this code without the line
>
>> c= a.span(:text => 'tst') 
>>
>  and with c.click, I'm able to click the default TreeContent, but when I 
> try with right click or double_click, it throws an exception ( ..cannot 
> preform native interactions...) 
> I attach the html code of the dojo objects when the page is fully loaded 
> and the image of what I'm expecting to do. 
>
> Thanks! 
>

-- 
-- 
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] Control selenium logging with webdriver

2014-02-22 Thread Dan
So, here's the situation.  I'm trying to integrate a cloud grid provider 
into my framework, but I've discovered that the selenium command logs have 
the clear text value for everything.  This includes the password, which 
isn't going to make my security team happy and frankly I'm not comfortable 
with it either.  What I'd like to be able to do is turn off or change the 
logging level when I hit a password element or anything else sensitive.  Is 
this possible and how would I go about this with watir-webdriver?  if not 
this seems like a feature that might be needed.

https://code.google.com/p/selenium/wiki/DesiredCapabilities

What would be incredibly cool is when we set an element that we could tag 
or label it as sensitive so it wasn't logged.

b.text_field(:id => "password",:sensitive).set "test"

and in the logs where ever this field is show we would get something like

value : *

-- 
-- 
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: Has anyone used the Module: Watir::PerformanceHelper

2014-02-13 Thread Dan
I've used it, but it doesn't seem to be maintained anymore.  IIRC I stopped 
using it because it stop working due to various breaking browser updates, 
but I just tried it now and it seems to be ok with Firefox and Chrome at 
least, so maybe I'm not remembering correctly?  I don't think it works at 
all with IE though?  Definitely a neat gem though.

On Thursday, February 13, 2014 10:32:14 AM UTC-5, Super Kevy wrote:
>
> Has anyone used the Module: Watir::PerformanceHelper
>
> Ref: http://90kts.com/2011/04/19/watir-webdriver-performance-gem-released/
>
> I'm curious about it and would like to know more.
>

-- 
-- 
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 to get control on overlay pop up window

2014-02-11 Thread Dan
You need to determine if it's a javascript dialog or not.  Can you inspect 
it with one of the developer tools or not?  Can you share the relevant html 
code?

Dan

On Thursday, February 6, 2014 12:56:40 AM UTC-5, ARGHYA CHAKRABORTY wrote:
>
>
>
> Hi 
>
> There is a button in an webpage , clicking on which , an Overlay page is 
> opened(Background parent page gets shadowed by the front overlay page) . 
> That overlay page contains some fields and buttons . how to access those 
> fields and buttons by WATIR. I tried to access with the elements ids but it 
> could not find those as the control was still on the parent page. 
>
> Moreover the overlay page does not have any page id or title . And I am 
> using Watir 1.8.24.
> Please suggest the solutions.
>
> Thanks
> Arghya
>

-- 
-- 
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] Waiting for a element to load fails after upgrading to ruby 1.9

2014-01-28 Thread Dan
My question would be why simply using one of the wait methods like when_present 
isn't working for you?

-- 
-- 
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: page-objects returning other page objects?

2014-01-27 Thread Dan
Seems Cheezy makes 
mention<http://www.cheezyworld.com/2010/11/13/ui-tests-part-two/>of returning 
page objects as well.



On Monday, January 27, 2014 4:09:18 PM UTC-5, Dan wrote:
>
> Hi, I'm wondering if people have opinions one way or the other on 
> page-objects returning other page objects?  Anyone have any experience of 
> the pitfalls between one or the other?  There was a good article about it 
> here<http://watirmelon.com/2012/05/29/page-objects-returning-page-objects/>
> .
>

-- 
-- 
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] page-objects returning other page objects?

2014-01-27 Thread Dan
Hi, I'm wondering if people have opinions one way or the other on 
page-objects returning other page objects?  Anyone have any experience of 
the pitfalls between one or the other?  There was a good article about it 
here 
.

-- 
-- 
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: Watirwebdriver - Click on drop down value is not visible until I scroll down the list

2014-01-23 Thread Dan
You want something like this.

b.option(:text => "tags").select
On Thursday, January 23, 2014 11:43:31 AM UTC-5, watir webdriver wrote:
>
> @browser.select_list(:class => "exp_left_hand").optgroup(:class => 
> "identifier").select "tags"
>
>
>
> *Error :expected Hash or (:how, 'what'), got ["tags"] (ArgumentError)*
>
>
> On Thursday, January 23, 2014 3:04:58 PM UTC, watir webdriver wrote:
>>
>> Hi,
>>
>> I'm using watir-webdriver to automate our functional testing with an 
>> application. In the process we need to click on a drop down and select a 
>> value from the drop down. The problem i'm facing is that i'm able to click 
>> on the elements that are visible in the drop-down however, when i tried 
>> clicking on an item which is just below the visible item, its just passing 
>> the scenario without selecting the item.
>>
>> HTML code:
>>
>> 
>> Please select
>> 
>> countrycode
>> Visitor
>> keyword
>> 
>> **
>> smart
>> > value="purchasehistorybyattributes">purchasehistorybyattributes
>> > value="purchasehistorybycategory">purchasehistorybycategory
>> tags
>> 
>> 
>>
>> *The optgroup label as "Keywords" is invisible in the dropdown.*
>>
>> *I've tried below ways but not luck :*
>>
>> * @browser.select_list(:class => "exp_left_hand").optgroup(:class => 
>> "identifier").option(:value => "tags").fire_event 'onclick'*  # Without 
>> selecting the option its passing the scenario
>> *@browser.select_list(:class => "exp_left_hand").optgroup(:class => 
>> "identifier").option(:value => "tags").when_present.click* # is getting 
>> timedout
>>
>> 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

--- 
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: Question about running in IRB

2014-01-22 Thread Dan
Not if he's using watir-classic. You might want to look at this page.

http://support.microsoft.com/kb/106167

-- 
-- 
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: script in chrome

2014-01-21 Thread Dan
You have to be more specific about it not working.  We need logs, 
stacktraces, etc. to be able to help diagnose your issue.

On Tuesday, January 21, 2014 5:23:30 AM UTC-5, Priti Fhuse wrote:
>
> browser = Watir::Browser.new :chrome not works on my machine
>
> On Thursday, January 16, 2014 12:02:06 AM UTC-8, Priti Fhuse wrote:
>>
>> i fetch chrome by
>> system('start http://www.google.com')  coz browser = Watir::Browser.new 
>> :chrome not works on my machine
>> this line in watir 
>> but how to write further script
>>
>> 1> i want to click in chrome 
>> 2>
>>
>

-- 
-- 
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: Control system window in Firefox with RAutomation.

2014-01-20 Thread Dan
Can you show the html with the file upload field?  It'll usually look 
something like this.



You would then upload a file to it like so.

@browser.file_field(:id, "file_upload").set("C:\\test.txt")

When you do this you won't get any system upload windows, which is expected 
and preferable.

On Monday, January 20, 2014 10:52:10 AM UTC-5, FMQO GDRIVE wrote:
>
>
> This construction do not work on Chrome and Firefox too, neither on 7 no 
> on XP.
> System upload window is not reachable using method file_field, and I do 
> not know why.
> My code
>
> @browser.file_field(:name, "Open").set("\\test.txt")
>
> Error 
> Watir::Exception::UnknownObjectException: unable to locate element, using 
> {:name=>"Open", :tag_name=>"input", :type=>"file"}
>
> On Monday, January 20, 2014 7:14:48 PM UTC+4, Dan wrote:
>>
>> There's a much easier way to upload a file.  Find your file_field element 
>> and simply use the file_field method.  For example:
>>
>> b.file_field(:id => "my_file").set local_file
>>
>

-- 
-- 
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: Control system window in Firefox with RAutomation.

2014-01-20 Thread Dan
There's a much easier way to upload a file.  Find your file_field element 
and simply use the file_field method.  For example:

b.file_field(:id => "my_file").set local_file

On Monday, January 20, 2014 7:06:13 AM UTC-5, FMQO GDRIVE wrote:
>
> On XP and Chrome this code works well, but on XP and Firefox 24.2.0 still 
> not working.(rautomation (0.13.0))
> So, problem is in this gem, or we simply use it not correctly?
>

-- 
-- 
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: script in chrome

2014-01-17 Thread Dan
If you're just getting started I would begin by browsing the info on 
http://watirwebdriver.com/.

For chrome to work you need a binary for which ever platform you're using 
and it needs to be available in your path.
http://watirwebdriver.com/chrome/

Here's a much simpler script to get you started:

require 'watir-webdriver'

# Open the chrome browser
@b = Watir::Browser.start "http://watirwebdriver.com/",:chrome
@b.link(:text => "Browser Elements").when_present.hover
@b.link(:text => "Elements").when_present.click

On Thursday, January 16, 2014 3:02:06 AM UTC-5, Priti Fhuse wrote:
>
> i fetch chrome by
> system('start http://www.google.com')  coz browser = Watir::Browser.new 
> :chrome not works on my machine
> this line in watir 
> but how to write further script
>
> 1> i want to click in chrome 
> 2>
>

-- 
-- 
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: Undefined Method 'frame' for []:Array (NoMethodError)

2014-01-16 Thread Dan
mp;application=uc1').td(:text,
>  
> "New #{type}").hover
> browser.frame(:src, 
> '../../ContentServer?pagename=fatwire/wem/integration/processWemRequest&application=uc1').td(:text,
>  
> "New #{type}").click
> end
> rescue => e
> p e.message
> p e.backtrace
> puts "type #{type} may not be a valid input. Please review WatirToolbox 
> documentation for valid input for this field."
> end
> end
> if browser.frame(:src, 
> '../../ContentServer?pagename=fatwire/wem/integration/processWemRequest&application=uc1').frame(:id,
>  
> 'contentPane_view-3').text_field(:name => 'flexassets:name').present?
> return browser
> else
> createNewContent(browser, type)
> end
> end
>
> def checkinAsset(browser, comment)
> sleep 10
> #Wait for the frame containing the checkin button to load
> browser.frame(:src, 
> '../../ContentServer?pagename=fatwire/wem/integration/processWemRequest&application=uc1').wait_until_present
>  
> #*Fails here*
> browser.frame(:src, 
> '../../ContentServer?pagename=fatwire/wem/integration/processWemRequest&application=uc1').div(:id,
>  
> 'edit').wait_until_present
>
> #Click checkin icon
> checkin = browser.frame(:src, 
> '../../ContentServer?pagename=fatwire/wem/integration/processWemRequest&application=uc1').span(:xpath,
>  
> "//div[@id='edit']/span[position()=7]")
> checkin.click
> end
>
> On Wednesday, January 15, 2014 11:05:10 AM UTC-5, Dan wrote:
>>
>> Can you show some of that code?
>>
>> On Wednesday, January 15, 2014 9:33:10 AM UTC-5, Matt Caldwell wrote:
>>>
>>> I suppose that is ambiguous -- sorry about that. It is a Watir::Browser 
>>> object, it has been instantiated and has been used in lines preceding that 
>>> line that are also referencing frames.
>>>
>>> On Wednesday, January 15, 2014 9:25:03 AM UTC-5, Dan wrote:
>>>>
>>>> What are you passing into the method?
>>>>
>>>> On Wednesday, January 15, 2014 7:57:35 AM UTC-5, Matt Caldwell wrote:
>>>>>
>>>>> Update/clarification. I am using Firefox 17 as my base for this and 
>>>>> Watir 1.9.3.
>>>>>
>>>>> On Tuesday, January 14, 2014 2:27:05 PM UTC-5, Matt Caldwell wrote:
>>>>>>
>>>>>> Hello all,
>>>>>>
>>>>>> I have been struggling with this issue and was hoping to get some 
>>>>>> insight. I have a method in a helper class that I wrote that is using 
>>>>>> code 
>>>>>> that has worked in the past that is no longer working.
>>>>>>
>>>>>> def checkinAndApproveAsset(browser, comment)
>>>>>> browser.frame(:src, '../../pageSourcePath').wait_until_present  # 
>>>>>> This line throws "Undefined Method 'frame' for []:Array (NoMethodError)"
>>>>>> #.
>>>>>> #. additional irrelevant code
>>>>>> #.
>>>>>> return browser
>>>>>> end
>>>>>>
>>>>>> The method is called by the following method.
>>>>>> browser = toolbox.checkinAndApproveAsset(browser, 'comment')
>>>>>>
>>>>>> Any insights? 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

--- 
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: Undefined Method 'frame' for []:Array (NoMethodError)

2014-01-15 Thread Dan
Can you show some of that code?

On Wednesday, January 15, 2014 9:33:10 AM UTC-5, Matt Caldwell wrote:
>
> I suppose that is ambiguous -- sorry about that. It is a Watir::Browser 
> object, it has been instantiated and has been used in lines preceding that 
> line that are also referencing frames.
>
> On Wednesday, January 15, 2014 9:25:03 AM UTC-5, Dan wrote:
>>
>> What are you passing into the method?
>>
>> On Wednesday, January 15, 2014 7:57:35 AM UTC-5, Matt Caldwell wrote:
>>>
>>> Update/clarification. I am using Firefox 17 as my base for this and 
>>> Watir 1.9.3.
>>>
>>> On Tuesday, January 14, 2014 2:27:05 PM UTC-5, Matt Caldwell wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I have been struggling with this issue and was hoping to get some 
>>>> insight. I have a method in a helper class that I wrote that is using code 
>>>> that has worked in the past that is no longer working.
>>>>
>>>> def checkinAndApproveAsset(browser, comment)
>>>> browser.frame(:src, '../../pageSourcePath').wait_until_present  # This 
>>>> line throws "Undefined Method 'frame' for []:Array (NoMethodError)"
>>>> #.
>>>> #. additional irrelevant code
>>>> #.
>>>> return browser
>>>> end
>>>>
>>>> The method is called by the following method.
>>>> browser = toolbox.checkinAndApproveAsset(browser, 'comment')
>>>>
>>>> Any insights? 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

--- 
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: Undefined Method 'frame' for []:Array (NoMethodError)

2014-01-15 Thread Dan
What are you passing into the method?

On Wednesday, January 15, 2014 7:57:35 AM UTC-5, Matt Caldwell wrote:
>
> Update/clarification. I am using Firefox 17 as my base for this and Watir 
> 1.9.3.
>
> On Tuesday, January 14, 2014 2:27:05 PM UTC-5, Matt Caldwell wrote:
>>
>> Hello all,
>>
>> I have been struggling with this issue and was hoping to get some 
>> insight. I have a method in a helper class that I wrote that is using code 
>> that has worked in the past that is no longer working.
>>
>> def checkinAndApproveAsset(browser, comment)
>> browser.frame(:src, '../../pageSourcePath').wait_until_present  # This 
>> line throws "Undefined Method 'frame' for []:Array (NoMethodError)"
>> #.
>> #. additional irrelevant code
>> #.
>> return browser
>> end
>>
>> The method is called by the following method.
>> browser = toolbox.checkinAndApproveAsset(browser, 'comment')
>>
>> Any insights? 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

--- 
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: Click span doesn't work in Firefox 26.0

2014-01-14 Thread Dan
What's your selenium-webdriver version?  Also, that's not really the way 
you want to upload files.  What you really want to do is something like:

$driver.file_field(:id => "paymentFileFileUpload").set("myfile.txt")

Using this you won't have to deal with the file upload windows.

On Monday, January 13, 2014 5:11:56 PM UTC-5, Super Kevy wrote:
>
> maybeelement.parent.click  
>
> On Friday, December 13, 2013 10:09:44 AM UTC-6, Lucian Stan wrote:
>>
>>
>> Hi,
>>
>> I have the following html sample:
>>
>> ...
>> 
>>
>> 
>>
>> 
>> 
>> 
>>
>> 
>>
>> Browse
>>
>> 
>> 
>>
>> 
>> ...
>>
>> I'm trying to click on the Browse span:
>>
>> $driver = Watir::Browser.new :firefox
>> ...
>> element = $driver.span(:text => "Browse")
>> element.flash
>> element.click
>>
>> In Firefox 26.0 nothing happens after the span is clicked, there are no 
>> errors either. It should open a File upload window.
>>
>> This works fine in Chrome Version 31.0.1650.63 m.
>>
>> I am using watir-webdriver (0.6.4) and ruby 2.0.0p247 (2013-06-27) 
>> [x64-mingw32].
>>
>> Anyone else stuck into this? Any solution?
>>
>> Thank you,
>> Lucian
>>
>

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


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


[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: Logging HTTP traffic via a proxy while running webdriver tests?

2014-01-08 Thread Dan
Yeah.  Nothing special needed to be done to the browser.

On Wednesday, January 8, 2014 1:20:03 PM UTC-5, Chuck van der Linden wrote:
>
> On Wednesday, January 8, 2014 9:38:15 AM UTC-8, Dan wrote:
>>
>> Actually, I was confusing some work I've done with wireshark and fiddler. 
>>  Wireshark has a command line interface that I've used.  This was actually 
>> done in a powershell script and not ruby, but it's the same idea. 
>>  Wireshark might be a little too low level though? 
>>
>> You can pass the interface you want to monitor and filters and such.
>>
>> c:\Program Files\Wireshark\Wireshark"  -i Wi-Fi -k -w  $($path)
>>
>> http://www.wireshark.org/docs/wsug_html_chunked/ChCustCommandLine.html
>>
>> Looks like in ubuntu you can get it from the software center and probably 
>> do something very similar via ruby.
>>
>
> When you use wireshark did you need to do anything special when starting 
> the browser?  (like telling it to use a proxy) or does it work more like a 
> network monitor tool that just watches the traffic? 
>
>  
>
>>
>> On Wednesday, January 8, 2014 12:09:26 PM UTC-5, Chuck van der Linden 
>> wrote:
>>>
>>>
>>>
>>> On Tuesday, January 7, 2014 12:06:55 PM UTC-8, Dan wrote:
>>>>
>>>> I've "cheated" in the sense that I've used Fiddler by programmatically 
>>>> starting and stopping it when running tests.  There looks to be a Linux 
>>>> build of it now.  In my case it was ADFS so I feel your pain.
>>>>
>>>> http://fiddler.wikidot.com/mono<http://www.google.com/url?q=http%3A%2F%2Ffiddler.wikidot.com%2Fmono&sa=D&sntz=1&usg=AFQjCNHGL32pXhWZezicvDlNfw8nXkFKag>
>>>>
>>>
>>> If it gets me a usable HTTP log, I'm not sure I would call it cheating. 
>>>  I wonder if there is a standard package to install fiddler on the Saucy 
>>> version of ubuntu, I'd need that to be able to install it on the container. 
>>>  google is not finding me one, so I may be SOL in terms of this approach
>>>
>>> How did you tell the firefox browser instance to use the system proxy 
>>> when you did Watir::Browser.new?  The stuff at the site you referenced 
>>> tells me how to do it manually, but obviously that's not going to work.
>>>
>>> If you have code you could share, that would be wonderful and save me a 
>>> lot of trial and error
>>>
>>>
>>>>
>>>> On Tuesday, January 7, 2014 2:31:45 PM UTC-5, Chuck van der Linden 
>>>> wrote:
>>>>>
>>>>> This stackoverflow is very similar, and has no answer so far  
>>>>> http://stackoverflow.com/questions/19178901/integrate-watir-webdriver-and-browsermob-proxy-and-webdriver-user-agent
>>>>>
>>>>> I've got some web pages being very flakey and inconsistent (an SSO 
>>>>> solution based on shibbolith) and we really need to be able to generate a 
>>>>> http traffic log of what happens while the tests are running.
>>>>>
>>>>> Tests run in a unix container
>>>>>
>>>>> Looking around it seems like something such as BrowserMob/proxy might 
>>>>> work well, and there is even a  browsermob-proxy gem written by this 
>>>>> 'jarib' guy who I think may know something about watir-webdriver also 
>>>>>  (wink wink) 
>>>>>
>>>>> It seems like it ought to be possible to use watir-webdriver and 
>>>>> browsermob-proxy together to do what is needed to be able to create a 
>>>>> proxy 
>>>>> logfile of a session of watir tests, but I'm a little at a loss of where 
>>>>> to 
>>>>> start.The browsermob readme gives an example for webdriver, but not 
>>>>> for 
>>>>> watir-webdriver.
>>>>>
>>>>> can anyone tell me how I'd go about using browsermob-proxy with 
>>>>> watir-webdriver? 
>>>>>
>>>>> --Chuck vdL  (posting from the work email since this is work related) 
>>>>>
>>>>

-- 
-- 
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: Logging HTTP traffic via a proxy while running webdriver tests?

2014-01-08 Thread Dan
Actually, I was confusing some work I've done with wireshark and fiddler. 
 Wireshark has a command line interface that I've used.  This was actually 
done in a powershell script and not ruby, but it's the same idea. 
 Wireshark might be a little too low level though? 

You can pass the interface you want to monitor and filters and such.

c:\Program Files\Wireshark\Wireshark"  -i Wi-Fi -k -w  $($path)

http://www.wireshark.org/docs/wsug_html_chunked/ChCustCommandLine.html

Looks like in ubuntu you can get it from the software center and probably 
do something very similar via ruby.

On Wednesday, January 8, 2014 12:09:26 PM UTC-5, Chuck van der Linden wrote:
>
>
>
> On Tuesday, January 7, 2014 12:06:55 PM UTC-8, Dan wrote:
>>
>> I've "cheated" in the sense that I've used Fiddler by programmatically 
>> starting and stopping it when running tests.  There looks to be a Linux 
>> build of it now.  In my case it was ADFS so I feel your pain.
>>
>> http://fiddler.wikidot.com/mono<http://www.google.com/url?q=http%3A%2F%2Ffiddler.wikidot.com%2Fmono&sa=D&sntz=1&usg=AFQjCNHGL32pXhWZezicvDlNfw8nXkFKag>
>>
>
> If it gets me a usable HTTP log, I'm not sure I would call it cheating.  I 
> wonder if there is a standard package to install fiddler on the Saucy 
> version of ubuntu, I'd need that to be able to install it on the container. 
>  google is not finding me one, so I may be SOL in terms of this approach
>
> How did you tell the firefox browser instance to use the system proxy when 
> you did Watir::Browser.new?  The stuff at the site you referenced tells me 
> how to do it manually, but obviously that's not going to work.
>
> If you have code you could share, that would be wonderful and save me a 
> lot of trial and error
>
>
>>
>> On Tuesday, January 7, 2014 2:31:45 PM UTC-5, Chuck van der Linden wrote:
>>>
>>> This stackoverflow is very similar, and has no answer so far  
>>> http://stackoverflow.com/questions/19178901/integrate-watir-webdriver-and-browsermob-proxy-and-webdriver-user-agent
>>>
>>> I've got some web pages being very flakey and inconsistent (an SSO 
>>> solution based on shibbolith) and we really need to be able to generate a 
>>> http traffic log of what happens while the tests are running.
>>>
>>> Tests run in a unix container
>>>
>>> Looking around it seems like something such as BrowserMob/proxy might 
>>> work well, and there is even a  browsermob-proxy gem written by this 
>>> 'jarib' guy who I think may know something about watir-webdriver also 
>>>  (wink wink) 
>>>
>>> It seems like it ought to be possible to use watir-webdriver and 
>>> browsermob-proxy together to do what is needed to be able to create a proxy 
>>> logfile of a session of watir tests, but I'm a little at a loss of where to 
>>> start.The browsermob readme gives an example for webdriver, but not for 
>>> watir-webdriver.
>>>
>>> can anyone tell me how I'd go about using browsermob-proxy with 
>>> watir-webdriver? 
>>>
>>> --Chuck vdL  (posting from the work email since this is work related) 
>>>
>>

-- 
-- 
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: Logging HTTP traffic via a proxy while running webdriver tests?

2014-01-07 Thread Dan
I've "cheated" in the sense that I've used Fiddler by programmatically 
starting and stopping it when running tests.  There looks to be a Linux 
build of it now.  In my case it was ADFS so I feel your pain.

http://fiddler.wikidot.com/mono

On Tuesday, January 7, 2014 2:31:45 PM UTC-5, Chuck van der Linden wrote:
>
> This stackoverflow is very similar, and has no answer so far  
> http://stackoverflow.com/questions/19178901/integrate-watir-webdriver-and-browsermob-proxy-and-webdriver-user-agent
>
> I've got some web pages being very flakey and inconsistent (an SSO 
> solution based on shibbolith) and we really need to be able to generate a 
> http traffic log of what happens while the tests are running.
>
> Tests run in a unix container
>
> Looking around it seems like something such as BrowserMob/proxy might work 
> well, and there is even a  browsermob-proxy gem written by this 'jarib' guy 
> who I think may know something about watir-webdriver also  (wink wink) 
>
> It seems like it ought to be possible to use watir-webdriver and 
> browsermob-proxy together to do what is needed to be able to create a proxy 
> logfile of a session of watir tests, but I'm a little at a loss of where to 
> start.The browsermob readme gives an example for webdriver, but not for 
> watir-webdriver.
>
> can anyone tell me how I'd go about using browsermob-proxy with 
> watir-webdriver? 
>
> --Chuck vdL  (posting from the work email since this is work related) 
>

-- 
-- 
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: Dismissing javascript popups

2013-12-31 Thread Dan
Should be as simple as using what's on this page 
http://watirwebdriver.com/javascript-dialogs/.  When you say it doesn't 
work, do you get an exception or does nothing happen?

On Tuesday, December 31, 2013 9:12:17 AM UTC-5, Madhu Ganesh wrote:
>
> Folks,
>
> I am using Ruby 1.9.3 and Watir 5.0.0 . I've tried many solution available 
> online to handle javascript popups such as 
> http://watirmelon.com/2010/10/31/dismissing-pesky-javascript-dialogs-with-watir/
>   
> and many other stack overflow posts. I am unable to get it to work with IE. 
> Any help greatly appreciated.
>
> Thanks
> Madhu.
>

-- 
-- 
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: Major delay with watir script execution. Possible newbie error.

2013-12-31 Thread Dan
This doesn't necessarily answer the question, but I imagine you'd be much 
better off using the Facebook api for this sort of thing.  There also seems 
to be a few gems for working with the Graph API.  To answer your question, 
I and others have run into issues with parsing complex tables and there are 
some strategies for dealing with that such as 
here
.

https://developers.facebook.com/docs/graph-api/reference/app#roles

On Monday, December 30, 2013 2:36:23 AM UTC-5, Colin Milyoni wrote:
>
> Hi folks,
>
> I'm new to both ruby and to watir, so I apologize in advance if this is a 
> massive rookie mistake. Assistance of any level is greatly appreciated.
>
> My problem is that I am running into a gigantic delay when executing a 
> simple watir script. This is the first time that I've run into such a large 
> delay.
>
> The point of the script is to go into Facebook's Developers section, open 
> an app, then individually remove test users from the app by clicking on a 
> checkbox which corresponds to a table row, then clicking a button on the 
> page which initiates a delete action, confirming the delete, then closing 
> the window.  As you can see, I have a while-loop which will end the script 
> once the table has been thinned to only 11.
>
> Here is the code itself:
>
> require 'watir-webdriver'
> b = Watir::Browser.new :chrome
>
>
> b.goto "http://www.facebook.com";
> b.text_field(:name=> "email").set "x"
> b.text_field(:name=> "pass").set "xx"
> b.input(:value=>"Log In").click
>
> b.goto "
> https://developers.facebook.com/apps/1423456271203959/roles?role=test+users
> "
>
> rows = b.elements(:class=>"odd").size
>
> while rows > 10
> b.tr(:id =>/test_user/, :index => 10).checkbox(:type =>"checkbox").set
> b.input(:type =>"submit", :value=>"Remove").click
> sleep 1
> b.input(:type =>"button", :value=>"Remove").click
> sleep 1
>
> sleep 2
> b.input(:type =>"button", :value=>"Close").click
> end
>
> puts "Purge completed!"
>
>
> After running the code line-by-line in IRB, I am able to conclusively 
> isolate the issue to this line of code:
>
> b.tr(:id =>/test_user/, :index => 10).checkbox(:type =>"checkbox").set
>
> You can see how long it takes this line to execute by viewing the attached 
> swf file called "Remove problem_with_selecting_ID_12-29-13.swf"
>
> When this line of code runs, the script takes 30-60 seconds just to run 
> that single line of code.  Apparently that method is a little too complex, 
> but I'm not sure exactly why that is.  Would anyone be able to explain to 
> me what the problem is exactly?  My hunch is that the way that it is 
> parsing the DOM for that method is very inefficient.  I'm sure there is 
> another way I could write my code but I would most be interesting in being 
> pointed to a resource which explains why it is that this is so inefficient. 
> I'd really appreciate that.
>
> Thanks,
>
> Colin
>
>
>
>

-- 
-- 
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] Rspec - group rspec descriptions

2013-12-06 Thread Dan
So, this is not a watir-webdriver question per se, but I know many people 
here use rspec.  I'm looking to do exactly what is described as the 
solution in the stack overflow question below, which is to be able to group 
my descriptions in the html report output.  What I'm really looking for is 
how that's actually done in a custom formatter without reinventing the 
wheel.

http://stackoverflow.com/questions/14488976/how-to-group-rspec-descriptions-in-the-html-output-result

Thanks!

-- 
-- 
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: getting fixnum error for :index in webdriver

2013-12-05 Thread Dan
You're passing a string instead of a number.  Change

$ie.span(:class => "x-btn-icon refresh", :index => "3").click

to

$ie.span(:class => "x-btn-icon refresh", :index => 3).click

Dan

On Thursday, December 5, 2013 4:07:26 AM UTC-5, Bhavesh wrote:
>
> Hi
>  
> I just upgraded to watir webdriver.
>  
> Using ruby 193.
>  
> Im using this expression to click on third refresh button in my page :
>  
> $ie.span(:class => "x-btn-icon refresh", :index => "3").click
>  
> But then it shows me error as :
>  
> "failed expected Fixnum, got "3":String"
>  
> this use to work with my earlier version of watir 1.6.2 and ruby 1.8.7.
>  
> So what changes i need to do so that this command work and clicks on third 
> refresh button.
>  
> Any help is apreciated.
>  
> Thanks
> bhavesh
>

-- 
-- 
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: page-object and frames

2013-12-04 Thread Dan
Perfect!  That's exactly what I was looking for.  Thanks!

On Wednesday, December 4, 2013 12:14:46 AM UTC-5, Justin Ko wrote:
>
> You can use the generic element accessor, which is in the form 
> element(:name, :tag_name, :identifier => 'value'). For example:
>
> element(:fckeditor, :frame, :id => 'editor')
>
> This would let you do:
>
> fckeditor_element.send_keys("This is my text")
>
> Note that you can also locate the element directly, without the accessor:
>
> page.element(:frame, :id => 'editor').send_keys("This is my text")
>
> - Justin
>
> On Monday, December 2, 2013 9:15:33 AM UTC-5, Dan wrote:
>>
>> This doesn't get me a handle to the frame itself.  I'm looking for 
>> something like.
>>
>> frame(:fckeditor,:id => 'editor') 
>> fckeditor_element.send_keys("This is my text")
>>
>> On Friday, November 29, 2013 5:44:32 AM UTC-5, QOExcel wrote:
>>>
>>> in_frame(:class => 'share-client-content-iframe') do |frame|
>>> text_field(:invite, :id => ':p.fakeRecipient', :frame => frame)
>>> text_area(:hiddeninvite, :id => ':l', :frame => frame)
>>>
>>> среда, 27 ноября 2013 г., 20:07:58 UTC+4 пользователь Dan написал:
>>>>
>>>> I know this isn't a watir question per se, but I know a lot of members 
>>>> of this group use page object.  I'm trying to send keys directly to a 
>>>> frame 
>>>> using page-object, but the problem is I can't get a handle to just the 
>>>> frame, just elements inside of it?  This is one of those fckeditor kind of 
>>>> things.
>>>>
>>>> # How do I interact with just the frame itself?
>>>>
>>>> in_frame(:id => 'blah') do |frame|
>>>> end
>>>>
>>>

-- 
-- 
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: page-object and frames

2013-12-02 Thread Dan
This doesn't get me a handle to the frame itself.  I'm looking for 
something like.

frame(:fckeditor,:id => 'editor') 
fckeditor_element.send_keys("This is my text")

On Friday, November 29, 2013 5:44:32 AM UTC-5, QOExcel wrote:
>
> in_frame(:class => 'share-client-content-iframe') do |frame|
> text_field(:invite, :id => ':p.fakeRecipient', :frame => frame)
> text_area(:hiddeninvite, :id => ':l', :frame => frame)
>
> среда, 27 ноября 2013 г., 20:07:58 UTC+4 пользователь Dan написал:
>>
>> I know this isn't a watir question per se, but I know a lot of members of 
>> this group use page object.  I'm trying to send keys directly to a frame 
>> using page-object, but the problem is I can't get a handle to just the 
>> frame, just elements inside of it?  This is one of those fckeditor kind of 
>> things.
>>
>> # How do I interact with just the frame itself?
>>
>> in_frame(:id => 'blah') do |frame|
>> end
>>
>

-- 
-- 
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] page-object and frames

2013-11-27 Thread Dan
I know this isn't a watir question per se, but I know a lot of members of 
this group use page object.  I'm trying to send keys directly to a frame 
using page-object, but the problem is I can't get a handle to just the 
frame, just elements inside of it?  This is one of those fckeditor kind of 
things.

# How do I interact with just the frame itself?

in_frame(:id => 'blah') do |frame|
end

-- 
-- 
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] Watir &XPATH and sophisticated tags

2013-11-18 Thread Dan
Another way to locate these would be by the aria-labelledby attribute which 
appears to be unique.  See below.

b.element(:css, 
'input[aria-labelledby=":j6.findLabel"]').to_subtype.set("things")

b.element(:css, 
'input[aria-labelledby=":j6.replaceLabel"]').to_subtype.set("stuff")

On Friday, November 15, 2013 9:35:39 AM UTC-5, johnssn wrote:
>
> Think you could replace tbody with table, since the first table in the div 
> has the text fields
>
>
>   On Friday, November 15, 2013 2:42 AM, QOExcel 
> > 
> wrote:
>  Yes. I use 'cheesy' gem. It is pity, but this implementation doesn't 
> work .tbody isn't understood as a method here. 
>
> пятница, 15 ноября 2013 г., 0:05:43 UTC+4 пользователь johnssn написал:
>
> That last comment I made wasn't right since you're trying to get to the 
> text field. Maybe this instead (sorry, haven't used that library)
>
>
> text_field(:my_text_field, :class=>'modal-dialog-content' ). 
> tbody(:index=>0).text_field(: index=>0)
>
>
>   On Thursday, November 14, 2013 6:55 AM, John Fitisoff  
> wrote:
>  That's a really good question. I think you're talking about the 'cheesy' 
> gem and I think that it does some sort of normalization between watir and 
> selenium. Maybe this will work (collections are stripped out):
>
> div(:my_div, :class=>'modal-dialog-content' ). 
> tbody(:index=>0).text_field(: index=>0)
>
>
>   On Thursday, November 14, 2013 1:02 AM, QOExcel  
> wrote:
>  Thank you very much for your help!! I will read beforehand 
> http://watir.com/support 
>   
> It works actually .. But i use Page Object style for writing code, 
> something like this:
>
> span(:find_replace_dialog_ matchcase_checkbox_3,:id => 
> 'find-replace-regex') or
> button(:find_replace_dialog_ done_button, :name => 'done') 
>
> Can i convert b.div(:class, 'modal-dialog-content'). 
> tbodys[0].text_fields[0]  to style of Page Object ?
>
> среда, 13 ноября 2013 г., 19:52:29 UTC+4 пользователь johnssn написал:
>
> You almost never need to resort to xpath if you're using watir. Something 
> like this?
>
> b.div(:class, 'modal-dialog-content'). tbodys[0].text_fields[0]
> b.div(:class, 'modal-dialog-content').
> tbodys[0].text_fields[1]
>
>
>
>   On Wednesday, November 13, 2013 3:55 AM, QOExcel  
> wrote:
>  Hello, All
> I have to find a couple locators (textboxes).They have the same  so 
> i need xpath to find definite locator :
>
> 
> 
> 
> 
> 
> Find 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
>
> I can find  by such request : div(:test_el1, :xpath 
> => '//div[@class="modal-dialog- content"]') but i can't define lower 
> elements through this request. What i mean actually :  div(:test_el1, 
> :xpath => '//div[@class="modal-dialog- content"]/table/tbody/tr/td[2] ')
> Does anybody know  solution for this?
>
> -- 
> -- 
> 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-...@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-...@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-...@googlegroups.com 
> http://groups.google.com/group/watir-general
> watir-genera...@googlegroups.com 
>  
> --- 
> You received this message because you ar

Re: [wtr-general] Newbie - Requests for resources/ tutorials on Watir online

2013-10-31 Thread Dan
http://www.codecademy.com/ is good for some Ruby basics as well.

On Thursday, October 31, 2013 6:36:08 AM UTC-4, Avinash Suresh wrote:
>
> Thanks a ton for your suggestions, I will check them out.
>
> Avinash
>
> On Friday, October 25, 2013 5:36:04 PM UTC+5:30, Joe Fl wrote:
>>
>> Hi,
>>
>> I have found the following books pretty helpful:
>>
>>
>> http://www.amazon.com/RSpec-Book-Behaviour-Development-Cucumber/dp/1934356379/ref=sr_1_1?s=books&ie=UTF8&qid=1382702342&sr=1-1&keywords=rspec
>>
>>
>> http://www.amazon.com/Cucumber-Book-Behaviour-Driven-Development-Programmers/dp/1934356808/ref=sr_1_1?s=books&ie=UTF8&qid=1382702426&sr=1-1&keywords=cucumber+ruby
>>
>>
>> http://www.amazon.com/Cucumber-Recipes-Techniques-Pragmatic-Programmers/dp/1937785017/ref=sr_1_2?s=books&ie=UTF8&qid=1382702426&sr=1-2&keywords=cucumber+ruby
>>
>>
>> http://www.amazon.com/Beginning-Ruby-Novice-Professional-Experts/dp/1430223634/ref=sr_1_11?s=books&ie=UTF8&qid=1382702501&sr=1-11&keywords=ruby+programming
>>
>>
>> http://www.amazon.com/Everyday-Scripting-Ruby-Teams-Testers/dp/0977616614/ref=sr_1_30?s=books&ie=UTF8&qid=1382702713&sr=1-30&keywords=ruby+programming
>>
>> Joe
>>
>> On Fri, Oct 25, 2013 at 7:09 AM, Avinash Suresh wrote:
>>
>>> Hey,
>>>
>>> I do not have any background in automated testing or in coding and my 
>>> job requires me to work with Watir, Cucumber and Sikuli right now.
>>>
>>> I am through with the setup and I really need help in writing out the 
>>> predefinedsteps.rb for some fairly simple onscreen browser actions so I 
>>> will be able to run the actions in Cucumber.
>>>
>>> Any links/ resources that any of you guys can suggest will be of great 
>>> help.
>>>
>>> Thanks in advance,
>>>
>>> Avinash
>>>
>>> -- 
>>> -- 
>>> 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.


Re: [wtr-general] Elements property

2013-10-02 Thread Dan
li_number = @browser.div(:id => "cabMenu").ul.lis.length

On Wednesday, October 2, 2013 10:10:06 AM UTC-4, LuisE wrote:
>
> And how do I ask only for how many  li's there are?
>
>
> On 2 October 2013 12:54, Oscar Rieken >wrote:
>
>> you are asking for elements inside of the ul, which i guess if you 
>> counted every valid type of element inside of the ul tag its 15 why dont 
>> you ask for how many li's are inside of the ul?
>>  
>>
>> On Wed, Oct 2, 2013 at 5:35 AM, Luis Espla 
>> > wrote:
>>
>>> Hello, I have the html source code:
>>>
>>> 
>>>   
>>>   >> class="fixHref"> Live Video  
>>> >> class="fixHref"> Recorded Video   
>>>   
>>>  Photos   
>>>  >> href="#maintenance">  Maintenance   
>>>   >> class="fixHref"> Configuration
>>> 
>>>  
>>>
>>> I want to find how many "li tag" there are, I did: 
>>>
>>> li_number = @browser.div(:id => "cabMenu").ul.elements.length
>>>
>>> But it return 15 also fields there are within the li tag, and it would 
>>> like it return 5
>>>
>>> How can do it?
>>>
>>> Sincerely regards
>>>
>>> -- 
>>> -- 
>>> 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-...@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.


[wtr-general] Re: Unable To Click Button In IE -9 Browser

2013-10-02 Thread Dan
Please see 
here
.

On Tuesday, October 1, 2013 10:03:56 AM UTC-4, faro...@gmail.com wrote:
>
> let me begin with my system requirements
>
> OS=win7
>
> browser=IE 9
>
> I am working on sample gmail(gmail login page ) application when i try to 
> click the button of gmail login page it doesn't get clicked nor it give any 
> error message 
>
> but It is working fine in IE 8
>
>
> Thanks
>

-- 
-- 
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: Using watir, how can I read the values from a dropdown list and create an array?

2013-09-30 Thread Dan
I think it would be helpful to know what you're trying to accomplish by 
doing this, but you could do it like below.

values = b.ul.lis.collect{|x|x.value}

On Monday, September 30, 2013 8:46:06 AM UTC-4, sp22 wrote:
>
> I have html code like -
>
> 
>  
>
> Value1
> Value2
> Value3
> Value4
> Value5
>
>   
> 
>
> Can you please suggest how I can create an array with the values in the 
> list?
>
> Thanks!
>

-- 
-- 
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 image html tag

2013-09-25 Thread Dan
So, after you fire the mouseover what element is displayed?  Usually you 
fire an event and some other element is then displayed and then you click 
on that.  Your code seems to indicate that you're firing a mouseover and 
then clicking on the same element?

On Wednesday, September 25, 2013 11:23:26 AM UTC-4, LuisE wrote:
>
> It returns this error message:
>
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/response.rb:51:in
>  
> `assert_ok': The point at which the driver is attempting to click on the 
> element was not scrolled into the viewport. 
> (Selenium::WebDriver::Error::ElementNotVisibleError)
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/response.rb:15:in
>  
> `initialize'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/http/common.rb:59:in
>  
> `new'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/http/common.rb:59:in
>  
> `create_response'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/http/default.rb:66:in
>  
> `request'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/http/common.rb:40:in
>  
> `call'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/bridge.rb:634:in
>  
> `raw_execute'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/bridge.rb:612:in
>  
> `execute'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/remote/bridge.rb:369:in
>  
> `clickElement'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.35.1/lib/selenium/webdriver/common/element.rb:54:in
>  
> `click'
> from 
> C:/ruby/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:131:in
>  
> `click'
> from C:/Users/luis/RubymineProjects/Visual_Tools/NVX/login.rb:58:in 
> `'
> from -e:1:in `load'
> from -e:1:in `'
>
>
>
> On 25 September 2013 16:22, Luis Espla >wrote:
>
>> Hello,
>> I've a problem with the next html code. I can onmouseover event but when 
>> I try a click in this tag, it doesn't work
>> The source code is 
>> 
>> > onload='this.__gwtLastUnhandledEvent="load";' src="
>> http://192.168.0.3/venomweb/clear.cache.gif"; border="0">
>> 
>>
>> I did(it works well): 
>> @browser.div(:id => "cab").image(:title => "Close session").fire_event 
>> "onmouseover"
>>   
>> but then I did(it doesn't work):
>> @browser.div(:id => "cab").image(:title => "Close session").click
>>
>> Does anyboy know the problem
>>
>> Sincerely regards
>>  
>
>

-- 
-- 
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: right click issue in watir webdriver

2013-09-25 Thread Dan
What did you try and what was the error if any?

On Wednesday, September 25, 2013 10:10:47 AM UTC-4, Vegi Sekhar wrote:
>
>
> 
> Hi am unable to perform right click operation in watir webdriver.
> any solution for that ?
>
>
>

-- 
-- 
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: Why Watir-Webdriver is unable to identify the Element based on custom attribute

2013-09-22 Thread Dan
Post the relevant html and what you've tried please.

On Friday, September 20, 2013 3:57:24 PM UTC-4, Mukul Bist wrote:
>
> Hi ,
>
> I added custom attribute to a button and i am not able to identify that 
> element based on custom attribute. Do you guys have any idea.
>
> ~Mukul
>

-- 
-- 
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: run test scripts on three different browsers one after another?

2013-09-20 Thread Dan
I'm pretty sure watirgrid is dead.  Your'e going to want to look at Grid2 
from Selenium.  You don't need the grid just to run across different 
browsers though.

On Friday, September 20, 2013 1:34:30 PM UTC-4, Ragavan Ambighananthan 
wrote:
>
> Ankita
>
> currently i am trying https://github.com/90kts/watirgrid , this is 
> originally developed for the same purpose as yours.
>
> Regards
> Ragavan
>
> On Friday, September 20, 2013 2:57:22 PM UTC+1, Dan wrote:
>>
>> Yeah, that's why I stated I wasn't sure what they were considering a 
>> failure.
>>
>>
>> On Fri, Sep 20, 2013 at 9:52 AM, Oscar Rieken  wrote:
>>
>>> To me this doesn't sound like a good test I would probably do something 
>>> more like
>>>
>>>
>>> before do
>>>b = (ENV['BROWSER'] ||= 'firefox').downcase
>>>   @browser = Watir::Browser.new b.to_sym
>>> end
>>>
>>> it "has the correct title" do
>>>   @browser.goto "place"
>>>   expect(@browser.title).to eql "something"
>>> end
>>>
>>> then just run it with
>>> rspec BROWSER=chrome
>>> rspec BROWSER=ie
>>> rspec 
>>>
>>> to me this makes more sense because , sorry if the code doesn't actually 
>>> work did this from memory 
>>>
>>>
>>> On Fri, Sep 20, 2013 at 9:08 AM, Dan  wrote:
>>>
>>>> Not sure what you're considering a failure, but you'll want to use some 
>>>> exception handling in that case.  See below for an example.  :none is not 
>>>> a 
>>>> valid browser so, it'll fail to initialize it, but keep going with some 
>>>> exception handling.
>>>>
>>>> require 'watir-webdriver'
>>>> browsers = [:none,:firefox,:chrome,:safari].each do |br|
>>>> begin
>>>> b = Watir::Browser.new br
>>>> b.goto("google.com")
>>>> puts b.title
>>>> b.close
>>>> rescue => e
>>>> puts e.message
>>>> next
>>>> end
>>>> end
>>>>
>>>> On Thursday, September 19, 2013 6:47:54 PM UTC-4, Ankita@Adslot wrote:
>>>>>
>>>>> Hi Dan 
>>>>>
>>>>> Thanks for your reply. This does work if the script runs without any 
>>>>> failure, but, in case any failure happens script stops and does not 
>>>>> execute 
>>>>> on other browsers.
>>>>>
>>>>>  I wanted something where even if script fails on one browser, it 
>>>>> still runs on others to complete the test.
>>>>>
>>>>> Your help is much appreciated!
>>>>>
>>>>> On Thursday, September 19, 2013 11:07:48 PM UTC+10, Dan wrote:
>>>>>>
>>>>>> Not sure what framework you're using or whatever, but you can do this 
>>>>>> pretty easy with a loop.  Below is the basic concept.
>>>>>>
>>>>>> require 'watir-webdriver'
>>>>>> browsers = [:firefox,:chrome,:safari].**each do |br|
>>>>>> b = Watir::Browser.new br
>>>>>> b.goto("google.com")
>>>>>> puts b.title
>>>>>> b.close
>>>>>> end
>>>>>>
>>>>>> On Wednesday, September 18, 2013 11:57:44 PM UTC-4, Ankita@Adslot 
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi 
>>>>>>>
>>>>>>> Just wondering if there is a way I could automate my script to run 
>>>>>>> on three different browsers one after another...
>>>>>>>
>>>>>>> wanted something like
>>>>>>>
>>>>>>> Open Browser1 - firefox
>>>>>>> Run script
>>>>>>> Close Browser
>>>>>>> 
>>>>>>> Open Browser2 - ie
>>>>>>> Run script
>>>>>>> Close Browser 
>>>>>>> 
>>>>>>> OpenBrowser3- phantomjs
>>>>>>> Run script 
>>>>>>> Close Browser
>>>>>>>  
>>>>>>>
>>>>>>>
>>>>>>> I know we could initiate browser of our choice through command 
>>>>>>> prompt and then run the script but just wondering if ther

Re: [wtr-general] Re: run test scripts on three different browsers one after another?

2013-09-20 Thread Dan Franko
Yeah, that's why I stated I wasn't sure what they were considering a
failure.


On Fri, Sep 20, 2013 at 9:52 AM, Oscar Rieken  wrote:

> To me this doesn't sound like a good test I would probably do something
> more like
>
>
> before do
>b = (ENV['BROWSER'] ||= 'firefox').downcase
>   @browser = Watir::Browser.new b.to_sym
> end
>
> it "has the correct title" do
>   @browser.goto "place"
>   expect(@browser.title).to eql "something"
> end
>
> then just run it with
> rspec BROWSER=chrome
> rspec BROWSER=ie
> rspec
>
> to me this makes more sense because , sorry if the code doesn't actually
> work did this from memory
>
>
> On Fri, Sep 20, 2013 at 9:08 AM, Dan  wrote:
>
>> Not sure what you're considering a failure, but you'll want to use some
>> exception handling in that case.  See below for an example.  :none is not a
>> valid browser so, it'll fail to initialize it, but keep going with some
>> exception handling.
>>
>> require 'watir-webdriver'
>> browsers = [:none,:firefox,:chrome,:safari].each do |br|
>> begin
>> b = Watir::Browser.new br
>> b.goto("google.com")
>> puts b.title
>> b.close
>> rescue => e
>> puts e.message
>> next
>> end
>> end
>>
>> On Thursday, September 19, 2013 6:47:54 PM UTC-4, Ankita@Adslot wrote:
>>>
>>> Hi Dan
>>>
>>> Thanks for your reply. This does work if the script runs without any
>>> failure, but, in case any failure happens script stops and does not execute
>>> on other browsers.
>>>
>>> I wanted something where even if script fails on one browser, it still
>>> runs on others to complete the test.
>>>
>>> Your help is much appreciated!
>>>
>>> On Thursday, September 19, 2013 11:07:48 PM UTC+10, Dan wrote:
>>>>
>>>> Not sure what framework you're using or whatever, but you can do this
>>>> pretty easy with a loop.  Below is the basic concept.
>>>>
>>>> require 'watir-webdriver'
>>>> browsers = [:firefox,:chrome,:safari].**each do |br|
>>>> b = Watir::Browser.new br
>>>> b.goto("google.com")
>>>> puts b.title
>>>> b.close
>>>> end
>>>>
>>>> On Wednesday, September 18, 2013 11:57:44 PM UTC-4, Ankita@Adslotwrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Just wondering if there is a way I could automate my script to run on
>>>>> three different browsers one after another...
>>>>>
>>>>> wanted something like
>>>>>
>>>>> Open Browser1 - firefox
>>>>> Run script
>>>>> Close Browser
>>>>> 
>>>>> Open Browser2 - ie
>>>>> Run script
>>>>> Close Browser
>>>>> 
>>>>> OpenBrowser3- phantomjs
>>>>> Run script
>>>>> Close Browser
>>>>>  
>>>>>
>>>>>
>>>>> I know we could initiate browser of our choice through command prompt
>>>>> and then run the script but just wondering if there is something which
>>>>> could automate the process rather then running the test manually 3 times
>>>>> with three different browsers?
>>>>>
>>>>  --
>> --
>> 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 a topic in the
> Google Groups "Watir General" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/watir-general/C9ufcIGfIPY/unsubscribe.
> To unsubscribe from this group and all its topics, 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: run test scripts on three different browsers one after another?

2013-09-20 Thread Dan
Not sure what you're considering a failure, but you'll want to use some 
exception handling in that case.  See below for an example.  :none is not a 
valid browser so, it'll fail to initialize it, but keep going with some 
exception handling.

require 'watir-webdriver'
browsers = [:none,:firefox,:chrome,:safari].each do |br|
begin
b = Watir::Browser.new br
b.goto("google.com")
puts b.title
b.close
rescue => e
puts e.message
next
end
end

On Thursday, September 19, 2013 6:47:54 PM UTC-4, Ankita@Adslot wrote:
>
> Hi Dan 
>
> Thanks for your reply. This does work if the script runs without any 
> failure, but, in case any failure happens script stops and does not execute 
> on other browsers.
>
> I wanted something where even if script fails on one browser, it still 
> runs on others to complete the test.
>
> Your help is much appreciated!
>
> On Thursday, September 19, 2013 11:07:48 PM UTC+10, Dan wrote:
>>
>> Not sure what framework you're using or whatever, but you can do this 
>> pretty easy with a loop.  Below is the basic concept.
>>
>> require 'watir-webdriver'
>> browsers = [:firefox,:chrome,:safari].each do |br|
>> b = Watir::Browser.new br
>> b.goto("google.com")
>> puts b.title
>> b.close
>> end
>>
>> On Wednesday, September 18, 2013 11:57:44 PM UTC-4, Ankita@Adslot wrote:
>>>
>>> Hi 
>>>
>>> Just wondering if there is a way I could automate my script to run on 
>>> three different browsers one after another...
>>>
>>> wanted something like
>>>
>>> Open Browser1 - firefox
>>> Run script
>>> Close Browser
>>> 
>>> Open Browser2 - ie
>>> Run script
>>> Close Browser 
>>> 
>>> OpenBrowser3- phantomjs
>>> Run script 
>>> Close Browser
>>>  
>>>
>>>
>>> I know we could initiate browser of our choice through command prompt 
>>> and then run the script but just wondering if there is something which 
>>> could automate the process rather then running the test manually 3 times 
>>> with three different browsers?
>>>
>>

-- 
-- 
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] Cucumber and Quality Center

2013-09-20 Thread Dan
Well, it's no so much of a matter that it needs to be run manually if it's 
automated.  It's a matter of sharing the test cases with either our 
customers or for audits and that sort of thing and having one repository. 
 I've sort of caused this issue myself by bringing watir into the equation, 
but I don't think I have to sell the advantages of watir over QTP here.  By 
good description I mean that in the cucumber test reports the gerkin can be 
included which would state more exactly what the test is doing and in plain 
English.  I suppose I could accomplish a similar thing by requiring a 
description in QC for a given test case and then retrieving that via the 
API to include in the report.

On Thursday, September 19, 2013 7:24:52 PM UTC-4, Oscar.Rieken wrote:
>
> my question is... if you take a manual test case and automate it... do you 
> still need to run it manually?
>
> if so then why automate it :) 
>
> And if it is automated why does it need to be with the manual test cases? 
> how will you know what is automated or not? probably a flag somewhere its 
> always a flag 
>
> also, By good description of what it is doing I hope you mean something in 
> more of a declarative scenario. 
>
>
>
>
> On Thu, Sep 19, 2013 at 3:30 PM, Dan >wrote:
>
>> So we're standing up ALM now actually, which has the rest API, but I'm 
>> not sure I want to go down that road.  One thing that's really drawing me 
>> to cucumber is that along with reporting the results of the test you get a 
>> good description of what it's doing.  It is possible to pull the 
>> information from QC via the api and commit other sorts of information back 
>> to QC.  If I do that though I lose the coupling between gerkins and 
>> cucumber and the rest of the framework it seems.
>>
>> Dan
>>
>>
>> On Thursday, September 19, 2013 3:15:29 PM UTC-4, johnssn wrote:
>>
>>>  At my previous company we were using TestLink and Test::Unit. I 
>>> modified Test::Unit to update tests as they were executed (individual 
>>> classes or methods just needed to include the test id as part of the class 
>>> or method name).  The test would make a call to TestLink as each test 
>>> result was obtained.
>>>
>>> A better way of doing it might be to let the test run to completion and 
>>> then have a post-processing step that parses the results using regular 
>>> expressions and then does the update. The advantage to this is if you get a 
>>> really bad run you don't care about you can just reprocess the results from 
>>> the previous run. If you care about that.
>>>
>>> It does look like QC has an API that allows updates. You just need to 
>>> make sure whatever ID QC is using gets into the results somehow, then use 
>>> that.
>>>
>>> It looks like the latest version has a rest api (yay!). Here's the link 
>>> to that API doc (down at the bottom of the thread)
>>>
>>> http://h30499.www3.hp.com/t5/**Quality-Center-Support-and-**
>>> News/ALM-11-0-REST-API-**reference-guide/td-p/4747218#.**UjtMubyraIs<http://h30499.www3.hp.com/t5/Quality-Center-Support-and-News/ALM-11-0-REST-API-reference-guide/td-p/4747218#.UjtMubyraIs>
>>>
>>>
>>>   --
>>>  *From:* Dan 
>>> *To:* watir-...@googlegroups.com 
>>>  *Sent:* Thursday, September 19, 2013 11:42 AM
>>> *Subject:* Re: [wtr-general] Cucumber and Quality Center
>>>  
>>> I should clarify.  QC won't be going away.  It's going to remain the 
>>> repository for manual test cases from which we'll create automation.  We 
>>> use watir-webdriver as opposed to QTP in the cases where our tests are 
>>> browser based.  My concern is that if we have the test cases in QC and then 
>>> we create automated watir test cases using cucumber, that we now 
>>> essentially have two test cases that need to be maintained.  I'm trying to 
>>> think of a more intelligent way for them to work together.
>>>
>>> Dan
>>>
>>> On Thursday, September 19, 2013 1:39:02 PM UTC-4, Oscar.Rieken wrote:
>>>
>>> If you are going to migrate over to cucumber from QTP. I have done that 
>>> they way we did it was located the important behaviors that were being 
>>> tested in QTP rewrite them in cucumber/watir and then delete them from QTP. 
>>>  
>>>
>>>
>>> On Thu, Sep 19, 2013 at 11:50 AM, Dan  wrote:
>>>
>>> I'm not sure that this is the correct forum for this, but I'm su

Re: [wtr-general] Cucumber and Quality Center

2013-09-19 Thread Dan
So we're standing up ALM now actually, which has the rest API, but I'm not 
sure I want to go down that road.  One thing that's really drawing me to 
cucumber is that along with reporting the results of the test you get a 
good description of what it's doing.  It is possible to pull the 
information from QC via the api and commit other sorts of information back 
to QC.  If I do that though I lose the coupling between gerkins and 
cucumber and the rest of the framework it seems.

Dan

On Thursday, September 19, 2013 3:15:29 PM UTC-4, johnssn wrote:
>
> At my previous company we were using TestLink and Test::Unit. I modified 
> Test::Unit to update tests as they were executed (individual classes or 
> methods just needed to include the test id as part of the class or method 
> name).  The test would make a call to TestLink as each test result was 
> obtained.
>
> A better way of doing it might be to let the test run to completion and 
> then have a post-processing step that parses the results using regular 
> expressions and then does the update. The advantage to this is if you get a 
> really bad run you don't care about you can just reprocess the results from 
> the previous run. If you care about that.
>
> It does look like QC has an API that allows updates. You just need to make 
> sure whatever ID QC is using gets into the results somehow, then use that.
>
> It looks like the latest version has a rest api (yay!). Here's the link to 
> that API doc (down at the bottom of the thread)
>
>
> http://h30499.www3.hp.com/t5/Quality-Center-Support-and-News/ALM-11-0-REST-API-reference-guide/td-p/4747218#.UjtMubyraIs
>
>
>   --
>  *From:* Dan >
> *To:* watir-...@googlegroups.com  
> *Sent:* Thursday, September 19, 2013 11:42 AM
> *Subject:* Re: [wtr-general] Cucumber and Quality Center
>  
> I should clarify.  QC won't be going away.  It's going to remain the 
> repository for manual test cases from which we'll create automation.  We 
> use watir-webdriver as opposed to QTP in the cases where our tests are 
> browser based.  My concern is that if we have the test cases in QC and then 
> we create automated watir test cases using cucumber, that we now 
> essentially have two test cases that need to be maintained.  I'm trying to 
> think of a more intelligent way for them to work together.
>
> Dan
>
> On Thursday, September 19, 2013 1:39:02 PM UTC-4, Oscar.Rieken wrote:
>
> If you are going to migrate over to cucumber from QTP. I have done that 
> they way we did it was located the important behaviors that were being 
> tested in QTP rewrite them in cucumber/watir and then delete them from QTP. 
>  
>
>
> On Thu, Sep 19, 2013 at 11:50 AM, Dan  wrote:
>
> I'm not sure that this is the correct forum for this, but I'm sure that 
> someone here must have run into a similar situation.  We pretty heavily use 
> QC/ALM here along with a mixture of QTP and watir-webdriver.  Currently 
> we're using a custom framework, but I'd like to start moving to something 
> like cucumber, since there's a lot of advantages there.  The problem is 
> using cucumber seems like a duplication of what we're doing in Quality 
> Center.  Any thoughts on this would be greatly appreciated.
>  -- 
> -- 
> 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<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<https://groups.google.com/groups/opt_out>
> .
>
>
>  -- 
> -- 
> 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.


Re: [wtr-general] Cucumber and Quality Center

2013-09-19 Thread Dan
I should clarify.  QC won't be going away.  It's going to remain the 
repository for manual test cases from which we'll create automation.  We 
use watir-webdriver as opposed to QTP in the cases where our tests are 
browser based.  My concern is that if we have the test cases in QC and then 
we create automated watir test cases using cucumber, that we now 
essentially have two test cases that need to be maintained.  I'm trying to 
think of a more intelligent way for them to work together.

Dan

On Thursday, September 19, 2013 1:39:02 PM UTC-4, Oscar.Rieken wrote:
>
> If you are going to migrate over to cucumber from QTP. I have done that 
> they way we did it was located the important behaviors that were being 
> tested in QTP rewrite them in cucumber/watir and then delete them from QTP. 
>  
>
>
> On Thu, Sep 19, 2013 at 11:50 AM, Dan >wrote:
>
>> I'm not sure that this is the correct forum for this, but I'm sure that 
>> someone here must have run into a similar situation.  We pretty heavily use 
>> QC/ALM here along with a mixture of QTP and watir-webdriver.  Currently 
>> we're using a custom framework, but I'd like to start moving to something 
>> like cucumber, since there's a lot of advantages there.  The problem is 
>> using cucumber seems like a duplication of what we're doing in Quality 
>> Center.  Any thoughts on this would be greatly appreciated.
>>  
>> -- 
>> -- 
>> 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.


[wtr-general] Cucumber and Quality Center

2013-09-19 Thread Dan
I'm not sure that this is the correct forum for this, but I'm sure that 
someone here must have run into a similar situation.  We pretty heavily use 
QC/ALM here along with a mixture of QTP and watir-webdriver.  Currently 
we're using a custom framework, but I'd like to start moving to something 
like cucumber, since there's a lot of advantages there.  The problem is 
using cucumber seems like a duplication of what we're doing in Quality 
Center.  Any thoughts on this would be greatly appreciated.

-- 
-- 
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: run test scripts on three different browsers one after another?

2013-09-19 Thread Dan
Not sure what framework you're using or whatever, but you can do this 
pretty easy with a loop.  Below is the basic concept.

require 'watir-webdriver'
browsers = [:firefox,:chrome,:safari].each do |br|
b = Watir::Browser.new br
b.goto("google.com")
puts b.title
b.close
end

On Wednesday, September 18, 2013 11:57:44 PM UTC-4, Ankita@Adslot wrote:
>
> Hi 
>
> Just wondering if there is a way I could automate my script to run on 
> three different browsers one after another...
>
> wanted something like
>
> Open Browser1 - firefox
> Run script
> Close Browser
> 
> Open Browser2 - ie
> Run script
> Close Browser 
> 
> OpenBrowser3- phantomjs
> Run script 
> Close Browser
>  
>
>
> I know we could initiate browser of our choice through command prompt and 
> then run the script but just wondering if there is something which could 
> automate the process rather then running the test manually 3 times with 
> three different browsers?
>

-- 
-- 
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: Finding currently open windows

2013-08-28 Thread Dan
I'm 99% sure that this is only possible with IE and using watir and not 
watir-webdriver.  There's an issue opened at the selenium issue tracker for 
webdriver, but it's been open for quite a while.  
https://code.google.com/p/selenium/issues/detail?id=18

On Wednesday, August 28, 2013 8:04:49 AM UTC-4, Mark Turton wrote:
>
> Hi
>
> I'm trying to write a script that will look for and use a browser window 
> (it can be either IE or Firefox) that is *already opened before the 
> script is executed*. The attach method works for IE, but it can't with 
> Firefox. I tried the window switching trick posted elsewhere, but that only 
> seems to work when you clicked a link from the original browser window. It 
> can't seem to find a window that was already opened before the script is 
> run.
>
> browser = Watir::Browser.attach(:url, /url.com/)
>
> if browser==nil then
>
> raise("Browser with expected URL segment could not be found")
>
> end
>
>
> Any ideas? Thanks in advance. (PS - If this was solved in a prior post, 
> apologies for the repetition and please just point me to where. Thanks.)
>
> -Mark
>

-- 
-- 
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: New Chrome 29 driver and ie.link.exists? error

2013-08-23 Thread Dan
Might want to try updating the selenium-webdriver gem since it's at 2.35. 
 Also did you get Chromedriver2 or chomedriver?  I don't think chromedriver 
will even work at all, so you've probably got the new new.

On Friday, August 23, 2013 12:08:08 PM UTC-4, Super Kevy wrote:
>
> This morning (8/23/13) chrome stopped work.  I quickly discovered that 
> chrome updated. to version 29.
> I downloaded the new chromedriver.exe and retested.
>
> When I run across a code reference like this 
>
> puts ie.link(:text,'anytext').exists?
>
> the crash occurs with the following error:
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/http/common.rb:66:in
>  
> `create_response': unexpected response, code=404, content-type="text/plain" 
> (Selenium::WebDriver::Error::WebDriverError)
> unknown command: session/0ab3d1093e6dd138bed9fa97a4334fc9/element/name
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/http/default.rb:64:in
>  
> `request'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/http/common.rb:40:in
>  
> `call'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/bridge.rb:598:in
>  
> `raw_execute'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/bridge.rb:576:in
>  
> `execute'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/remote/bridge.rb:475:in
>  
> `getElementTagName'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/selenium/webdriver/common/element.rb:68:in
>  
> `tag_name'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/locators/element_locator.rb:387:in
>  
> `validate_element'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/locators/element_locator.rb:37:in
>  
> `locate'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/elements/element.rb:509:in
>  
> `locate'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/elements/element.rb:487:in
>  
> `assert_exists'
> from 
> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/elements/element.rb:43:in
>  
> `exists?'
> from C:/Documents and 
> Settings/kpetry/Desktop/WATIR-TR/Methods_TR.rb:1500:in 
> `Method_MenuExistence'
>
> Is it me or chromedriver?
>
>
>

-- 
-- 
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: rautomation send_keys failing when running on remote machine that is minimized

2013-08-19 Thread Dan
If it's a javascript popup you don't need rautomation and you shouldn't 
have this problem.  Check out http://watirwebdriver.com/javascript-dialogs/
 or http://rubydoc.info/github/watir/watir-classic/frames.

On Monday, August 19, 2013 6:27:31 PM UTC-4, Champ wrote:
>
> Hello,
>
> I use rautomation frequently within my watir scripts to work with popups. 
> It works really well when I have an open active window and browser open and 
> I use the send_keys functionality.
>
> However,  it is failing when I run the scripts on a remote machine 
> minimized as a window, It just stays at the popup where it is supposed to 
> send the keys.
>
> I am suspecting it is something to do with activating the popup window, 
> but not sure.
>
> Any inputs?
>
> Eg script:
>
>   @ie.button(:text, "logoff").click_no_wait
>   logoff_win= RAutomation::Window.new(:title => "page title", :adapter => 
> :autoit)
>   logoff_win.WinWait("page title",'',7)
>   logoff_win.WinActivate("page title")
>   logoff_win.send_keys('{ENTER}')
>
>
> -champ
>

-- 
-- 
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: Cannot open excel

2013-08-06 Thread Dan
This isn't a watir question, but the problem is that you don't want to use 
open, you want to use new.  See the documentation 
here: https://github.com/hmcgowan/roo.  Also, don't try to automate against 
gmail.  If you need to check mail there, use the gmail gem.

See this thread for a discussion on that matter : 
https://groups.google.com/forum/#!searchin/selenium-users/gmail/selenium-users/8jR6Fw5ndxU/GbKzuBNYOGAJ


On Monday, August 5, 2013 10:42:30 AM UTC-4, Nikhil Nerkar wrote:
>
> I want to login to gmail using userid & password from the excel stored on 
> my machine.
> I am getting the error :
>
> C:/Documents and 
> Settings//Desktop/Watir/Project/TestProject/S10.rb:5:in `': 
> private method `open' called for Roo::Excelx:Class (NoMethodError)
>
> *Please advice*
>
>
> require 'watir'
> require 'rubygems'
> require 'roo'
>
> xl = Roo::Excelx.open("C:\Documents and 
> Settings\\Desktop\Watir\Project\TestProject\TestExcel.xlsx")
> xl.default_sheet = xl.sheets[0]
> c1=x1.cell(1,2)
> c2=x1.cell(2,2)
>
> B=Watir::Browser.new
> url="http://www.gmail.com";
> B.goto(url)
>
> B.text_field(:id,'Email').set c1
> B.text_field(:id,'Passwd').set 'abc'
> B.button(:value,'Sign in').click
>
>

-- 
-- 
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: Cannot open excel

2013-08-06 Thread Dan
Not sure why my original reply to this was deleted, but the problem with 
roo here is that you're using open and not new.  A quick look at the roo 
documentation would clear up your issues.

On Monday, August 5, 2013 10:42:30 AM UTC-4, Nikhil Nerkar wrote:
>
> I want to login to gmail using userid & password from the excel stored on 
> my machine.
> I am getting the error :
>
> C:/Documents and 
> Settings//Desktop/Watir/Project/TestProject/S10.rb:5:in `': 
> private method `open' called for Roo::Excelx:Class (NoMethodError)
>
> *Please advice*
>
>
> require 'watir'
> require 'rubygems'
> require 'roo'
>
> xl = Roo::Excelx.open("C:\Documents and 
> Settings\\Desktop\Watir\Project\TestProject\TestExcel.xlsx")
> xl.default_sheet = xl.sheets[0]
> c1=x1.cell(1,2)
> c2=x1.cell(2,2)
>
> B=Watir::Browser.new
> url="http://www.gmail.com";
> B.goto(url)
>
> B.text_field(:id,'Email').set c1
> B.text_field(:id,'Passwd').set 'abc'
> B.button(:value,'Sign in').click
>
>

-- 
-- 
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] [Watir-Webdriver] How can i access Gmail

2013-07-11 Thread Dan
This isn't a watir problem, but I think many of us have experience with the 
gmail gem.  What error do you get when you try to use the gmail gem?

On Thursday, July 11, 2013 2:38:30 AM UTC-4, maulik goswami wrote:
>
>  i need to access the mail that is being sent by my system
>
> On Wednesday, 10 July 2013 17:37:33 UTC+5:30, Oscar.Rieken wrote:
>>
>> do you need to access gmail because you work at google? or do you need to 
>> access an email that is being sent by your system to an email address that 
>> happens to be a gmail acct?
>>
>>
>> On Wed, Jul 10, 2013 at 6:29 AM, maulik goswami wrote:
>>
>>> *require "watir-webdriver"*
>>> *require "gmail"*
>>> *br = Watir::Browser.new :chrome
>>> *
>>> *br.goto "gmail.com"*
>>> *gmail = Gmail.new("email address", "password")
>>> *
>>> *gmail.inbox.count(:unread)*
>>> *gmail.inbox.click(:unread, :from => "no reply registration 
>>> email").label("Confirm Verification")*
>>>
>>> I was able to sign in with basic HTML IDs but as there where many tags 
>>> inside Gmail so i install the gem for it.
>>> But i'm not even able to sign in with it so what am i doing wrong ?
>>>
>>> Thanks.
>>>
>>> On Wednesday, 10 July 2013 15:49:55 UTC+5:30, Željko Filipin wrote:
>>>
 On Wed, Jul 10, 2013 at 12:12 PM, maulik goswami wrote:

> I've installed ruby *Gmail* gem and also made a sample script but it 
> only goes to *Gmail* website after that script stops and returns the 
> null value.
>

 Please share relevant Ruby code and error messages, if any.

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

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




[wtr-general] Re: cannot load such file -- watir/ie (LoadError)

2013-07-10 Thread Dan
What's your script/code look like?

On Wednesday, July 10, 2013 12:34:24 PM UTC-4, LiveLoveLaugh wrote:
>
> i recently had to reinstall everything on my computer and that included 
> ruby, cucumber, and watir. in the past i had a library of scripts that 
> worked for a very long time, however after the reinstallation everything 
> seems broken. i suspect this is probably due to updated versions of ruby, 
> cucumber and watir.
>
> at the moment i am getting this error.
>
> and its happening at Watir::Browser.start...
>
> Starting browser...
> cannot load such file -- watir/ie (LoadError)
> D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in 
> `require'
> D:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in 
> `require'
> C:/Users//Desktop/root/features/step_definitions/rb/login/xx.rb:4:in 
> `'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/rb_support/rb_language.rb:122:in
>  
> `load'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/rb_support/rb_language.rb:122:in
>  
> `load_code_file'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/runtime/support_code.rb:180:in
>  
> `load_file'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/runtime/support_code.rb:83:in
>  
> `block in load_files!'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/runtime/support_code.rb:82:in
>  
> `each'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/runtime/support_code.rb:82:in
>  
> `load_files!'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/runtime.rb:183:in
>  
> `load_step_definitions'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/runtime.rb:42:in
>  
> `run!'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/lib/cucumber/cli/main.rb:47:in
>  
> `execute!'
> D:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.3/bin/cucumber:13:in 
> `'
> D:/Ruby193/bin/cucumber:23:in `load'
> D:/Ruby193/bin/cucumber:23:in `'
>
> i was using Watir::IE.start before and i've changed it to Browser 
> now...however i can't test it properly i think due to that error. seems 
> like whether it's IE or Browser i'm getting the same error
>
> i do realize there was a previous question that had the exact same issue 
> https://groups.google.com/forum/#!topic/watir-general/FyXjKdTMScQ the 
> problem is that was 2011 and it is now 2013 so when i tried to follow some 
> of the steps in the solution i ran into some obstacles. i've tried 
> uninstalling watir and reinstalling it. i've tried uninstalling commonwatir 
> but it says i shouldn't due to dependency, i've tried uninstalling nokogiri 
> but again it says i shouldn't due to dependency. i wasn't sure if i should 
> go ahead and uninstall them anyways even if there's dependency issues 
> because i don't know what have changed since 2011.
>
> here is a list of my local gems
>
> *** LOCAL GEMS ***
>
> bigdecimal (1.1.0)
> builder (3.2.2)
> childprocess (0.3.9)
> commonwatir (4.0.0)
> cucumber (1.3.3)
> diff-lcs (1.2.4)
> ffi (1.9.0 x86-mingw32)
> gherkin (2.12.0 x86-mingw32)
> hoe (3.6.3)
> io-console (0.3)
> json (1.5.5)
> mini_magick (3.5.0)
> mini_portile (0.5.1)
> minitest (2.5.1)
> multi_json (1.7.7)
> multi_test (0.0.1)
> nokogiri (1.6.0 x86-mingw32)
> rake (0.9.2.2)
> rautomation (0.9.2)
> rdoc (3.9.5)
> rspec (2.14.0)
> rspec-core (2.14.0)
> rspec-expectations (2.14.0)
> rspec-mocks (2.14.1)
> rubygems-update (2.0.4)
> rubyzip (0.9.9)
> s4t-utils (1.0.4)
> selenium-webdriver (2.33.0)
> subexec (0.2.3)
> user-choices (1.1.6.1)
> watir (4.0.2 x86-mingw32)
> watir-classic (3.7.0)
> watir-webdriver (0.6.4)
> websocket (1.0.7)
> win32-api (1.4.8 x86-mingw32)
> win32-process (0.7.2)
> win32console (1.3.2 x86-mingw32)
> win32screenshot (1.0.8)
> windows-api (0.4.2)
> windows-pr (1.2.2)
> xml-simple (1.1.2)
>
>
> prior to the above error i had 
> Starting browser...
> cannot load such file -- watir/loader (LoadError)
> D:/Ruby193/lib/ruby/site_ruby/**1.9.1/rubygems/core_ext/**kernel_require.
> rb:45:in `require'
> D:/Ruby193/lib/ruby/site_ruby/**1.9.1/rubygems/core_ext/**kernel_require.rb:45:in
>  
> `require'
> D:/Ruby193/lib/ruby/gems/1.9.**1/gems/commonwatir-4.0.0/lib/**watir.rb:1:in 
> `'
> D:/Ruby193/lib/ruby/site_ruby/**1.9.1/rubygems/core_ext/**kernel_require.
> rb:110:in `require'
> D:/Ruby193/lib/ruby/site_ruby/**1.9.1/rubygems/core_ext/**kernel_require.rb:110:in
>  
> `rescue in require'
> D:/Ruby193/lib/ruby/site_ruby/**1.9.1/rubygems/core_ext/**kernel_require.rb:35:in
>  
> `require'
> C:/Users/xx/Desktop/root/**features/step_definitions/**xxx.rb:3:in
>  `'
> D:/Ruby193/lib/ruby/gems/1.9.**1/gems/cucumber-1.3.3/lib/**
> cucumber/rb_support/rb_**language.rb:122:in `load'
> D:/Ruby193/lib/ruby/gems/1.9.**1/gems/cucumber-1.3.3/lib/**
> cucumber/rb_support/rb_**language.rb:122:in `load_code_file'
> D:/Ruby193/lib/ruby/gems/1.9.**1/gems/cucumber-1.3.3/lib/**cucumber/
> runtime/support_cod

Re: [wtr-general] Selecting items from JS drop down list

2013-07-01 Thread Dan
Manually when you use this menu do you click or hover to expand it?  You 
may want to try b.li(:id,"ctl00_ChangeCustodyMenu").hover to expand the 
menu.

On Friday, June 28, 2013 2:44:54 PM UTC-4, scra...@foray.com wrote:
>
> Hi Joe,
>>  
>>
> Thanks for the help. I tried the tip you suggested, but it's still not 
> dropping the list down.  I've attached the list so you can see that it is 
> not a complex drop down or list. I can flash the Change Custody menu and it 
> appears to be selected with 
> b.li(:id,"ctl00_ChangeCustodyMenu").fire_event("onclick"), 
> but will not drop to display the list to select the Drop off item. Any 
> ideas on how to make this list drop?
>  
> Thanks!
>

-- 
-- 
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: Picking out attribute values from inside a div

2013-07-01 Thread Dan
I think you want this.

>> b.ul(:class => 
"battery-level-list").attribute_value("data-battery-level")
=> "5.71535"

On Sunday, June 30, 2013 10:01:24 AM UTC-4, Fred Cassirer wrote:
>
> Hi,
>
> I have been struggling with how to extract the value of 
> "data-battery-level" from the code below:
>
>data-battery-level="5.71535">1 
>1 class="green">11  
> 
>
>
> Below is a snip from my interactive debugging window 
>
> >> b = Watir::Browser.new
>
> ?> d= b.div :class => 'battery'
> => #"battery", 
> :tag_name=>"div"}>
> >> d.text
> => "1\n1\n1\n1"
> >> d.exists?
> => true
> >> u=b.div :class => 'battery-level-list'
> => # selector={:class=>"battery-level-list", :tag_name=>"div"}>
> >> u.exists?
> => false
> >> d.text
> => "1\n1\n1\n1"
> >> d.ul
> => #"ul"}>
> >> d.elements
> => # @parent=# selector={:class=>"battery", :tag_name=>"div"}>>
> >> d.sections
> => # @selector={:tag_name=>"section"}, @parent=# located=true selector={:class=>"battery", :tag_name=>"div"}>>
> >> d.sections.size
> => 0
> >> d.ul
> => #"ul"}>
> >> b.ul
> => #"ul"}>
> >> d.ul(:class,'battery-level-list')
> => # selector={:class=>"battery-level-list", :tag_name=>"ul"}>
> >> b.ul(:class,'battery-level-list')
> => # selector={:class=>"battery-level-list", :tag_name=>"ul"}>
> >> d.attribute_value('class')
> => "battery"
> >> d.attribute_value('ul')
> => nil
> >> d.attribute_value('data-battery-level')
> => nil
> >> b.div(:class,"battery").text
> => "1\n1\n1\n1"
> >> b.div(:class,"battery").li(:index,2).text
> => "1"
> >> b.div(:class,"battery-level-list")
> => # selector={:class=>"battery-level-list", :tag_name=>"div"}>
> >> b.div(:class,"battery").elements
> => # @parent=#"battery", 
> :tag_name=>"div"}>>
> >> b.div(:class,"data-battery-level")
> => # selector={:class=>"data-battery-level", :tag_name=>"div"}>
> >> b.ul(:class,'battery')
> => #"battery", 
> :tag_name=>"ul"}>
> >> b.ul(:class,'battery-level-list')
> => # selector={:class=>"battery-level-list", :tag_name=>"ul"}>
>
> As you can see, I'm not finding anything in the b. or d. objects that seem 
> to be able to list out what the data-battery-level is.  I've spent several 
> hours searching all of the various forums and documentation, and have not 
> yet found any similar examples.
>
> Any help or insight would be greatly appreciated ... I'm trying to pull 
> this value from my wifi enabled keypad doorkock page so I can create an 
> alert when the battery goes low (unfortunately, the web site doesn't 
> provide this function), it goes from working to out of juice with no 
> warning and it's not fun getting locked out of the house ;-)
>
> Thanks again.
>

-- 
-- 
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: passing value to the div

2013-06-30 Thread Dan
I don't know why you're using such an old version of watir.  You should 
upgrade and your life will be much easer. 

On Sunday, June 30, 2013 11:21:22 AM UTC-4, sivam wrote:
>
> Thanks Dan.. im using watir 1.6.5. so i tried AutoItX3 and it worked 
> fine.. but everytime while passing value to DIV using "send" we have pass 
> command to activate the webpage.. check my below code.. do we have any 
> other option?
>
> ie.bring_to_front()
> $autoit = WIN32OLE.new('AutoItX3.Control')  
> $autoit.Send("TEST") 
>
> On Sunday, 30 June 2013 19:26:08 UTC+5:30, Dan wrote:
>>
>> Have you tried using send_keys?
>>
>> On Sunday, June 30, 2013 12:03:26 AM UTC-4, sivam wrote:
>>>
>>> Hi All,
>>>
>>> Below is my code.. The DIV tag specified below is editable in the 
>>> webpage im having.. i want to pass some value to the tag using our 
>>> WatirRuby code.. i have tried in many ways but i couldnt find it.. can 
>>> anyone help me out from this..
>>>
>>>
>>> >>
>>> id="ctl00_SPWebPartManager1_4fae_bcfa_63ad7c3896a6_FormControl0__customcontrol1_upLevelDiv"
>>>  
>>> tabindex="0"  title="PPicker"  
>>>
>>> aria-multiline="true" contentEditable="true" aria-haspopup="true" 
>>> class="ms-inputuserfield" style="word-wrap: break-word;overflow-x: hidden; 
>>> background-color: window; color: windowtext;overflow-y: auto;" 
>>>
>>> preferContentEditableDiv="true" name="upLevelDiv" role="textbox">
>>>
>>> Thanks..
>>>
>>

-- 
-- 
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: passing value to the div

2013-06-30 Thread Dan
Have you tried using send_keys?

On Sunday, June 30, 2013 12:03:26 AM UTC-4, sivam wrote:
>
> Hi All,
>
> Below is my code.. The DIV tag specified below is editable in the webpage 
> im having.. i want to pass some value to the tag using our WatirRuby code.. 
> i have tried in many ways but i couldnt find it.. can anyone help me out 
> from this..
>
>
> 
> id="ctl00_SPWebPartManager1_4fae_bcfa_63ad7c3896a6_FormControl0__customcontrol1_upLevelDiv"
>  
> tabindex="0"  title="PPicker"  
>
> aria-multiline="true" contentEditable="true" aria-haspopup="true" 
> class="ms-inputuserfield" style="word-wrap: break-word;overflow-x: hidden; 
> background-color: window; color: windowtext;overflow-y: auto;" 
>
> preferContentEditableDiv="true" name="upLevelDiv" role="textbox">
>
> Thanks..
>

-- 
-- 
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: Radio buttons with watir-webdriver

2013-06-17 Thread Dan
If you want to follow the example on the page more closely it would be like 
this for your html:

>> radio = b.label(:text=> 'Yes').parent.radio :value => '1'
=> #"radio", 
:value=>"1", :tag_name=>"input"}>
>> radio.set
=> nil


On Monday, June 17, 2013 11:56:31 AM UTC-4, Fabian Arocena wrote:
>
> I thought b.radio was with watir, not watir-webdriver ...
> I'm just following the examples n the webpage
>
>
> On Mon, Jun 17, 2013 at 12:54 PM, Dan >wrote:
>
>> I think you might be overcomplicating things, but if you want to work 
>> back up from the label you can do this:
>>
>> b.label(:text => 'Yes').parent.radio.set
>>
>> Otherwise you can just do this:
>> b.radio(:id => "Server_0").set
>> or
>> b.radio(:name => "Server").set
>>
>>
>>
>> On Monday, June 17, 2013 11:39:31 AM UTC-4, fabian@gmail.com wrote:
>>>
>>> radio = browser.label(:for => 'Server_0').parent.radio.set
>>>
>>> radio = browser.label(:name => 'Server').parent.radio.set
>>>
>>> radio = browser.label(:text=> 'Server').parent.radio :value 'Yes'
>>>
>>> etc
>>>
>>> El lunes, 17 de junio de 2013 12:32:54 UTC-3, Dan escribió:
>>>>
>>>> Please show us the code that you tried.
>>>>
>>>> On Monday, June 17, 2013 11:26:19 AM UTC-4, fabian@gmail.com wrote:
>>>>>
>>>>> Guys,
>>>>>
>>>>> I have this html :
>>>>>
>>>>> >>>> onclick="displayHiddenText();**setPageChanged(true);" id="Server_0">
>>>>> Yes
>>>>>
>>>>> which would be the right ruby code with watir-webdriver to set the 
>>>>> radio button to Yes?
>>>>> I've tried the examples at:
>>>>>
>>>>> http://watirwebdriver.com/web-**elements/<http://watirwebdriver.com/web-elements/>
>>>>>
>>>>> but I'm not being able to locate the element...
>>>>>
>>>>> Thanks!
>>>>> Fabian
>>>>>
>>>>  -- 
>> -- 
>> 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 a topic in the 
>> Google Groups "Watir General" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/watir-general/3BHv_mq-d10/unsubscribe.
>> To unsubscribe from this group and all its topics, 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.




[wtr-general] Re: Radio buttons with watir-webdriver

2013-06-17 Thread Dan
I think you might be overcomplicating things, but if you want to work back 
up from the label you can do this:

b.label(:text => 'Yes').parent.radio.set

Otherwise you can just do this:
b.radio(:id => "Server_0").set
or
b.radio(:name => "Server").set


On Monday, June 17, 2013 11:39:31 AM UTC-4, fabian@gmail.com wrote:
>
> radio = browser.label(:for => 'Server_0').parent.radio.set
>
> radio = browser.label(:name => 'Server').parent.radio.set
>
> radio = browser.label(:text=> 'Server').parent.radio :value 'Yes'
>
> etc
>
> El lunes, 17 de junio de 2013 12:32:54 UTC-3, Dan escribió:
>>
>> Please show us the code that you tried.
>>
>> On Monday, June 17, 2013 11:26:19 AM UTC-4, fabian@gmail.com wrote:
>>>
>>> Guys,
>>>
>>> I have this html :
>>>
>>> >> onclick="displayHiddenText();setPageChanged(true);" id="Server_0">
>>> Yes
>>>
>>> which would be the right ruby code with watir-webdriver to set the radio 
>>> button to Yes?
>>> I've tried the examples at:
>>>
>>> http://watirwebdriver.com/web-elements/
>>>
>>> but I'm not being able to locate the element...
>>>
>>> Thanks!
>>> Fabian
>>>
>>

-- 
-- 
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: Radio buttons with watir-webdriver

2013-06-17 Thread Dan
Please show us the code that you tried.

On Monday, June 17, 2013 11:26:19 AM UTC-4, fabian@gmail.com wrote:
>
> Guys,
>
> I have this html :
>
>  onclick="displayHiddenText();setPageChanged(true);" id="Server_0">
> Yes
>
> which would be the right ruby code with watir-webdriver to set the radio 
> button to Yes?
> I've tried the examples at:
>
> http://watirwebdriver.com/web-elements/
>
> but I'm not being able to locate the element...
>
> Thanks!
> Fabian
>

-- 
-- 
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] ios-driver

2013-06-13 Thread Dan
Anyone know what the syntax should be to start a native app with 
watir-webdriver is?  I've got no problems starting safari in a simulator, 
but I want to run a native app in either the simulator or a real device.

Here's the instructions for java.
http://freynaud.github.io/ios-driver/native.html

Thanks!

-- 
-- 
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: Any fast ways to parse a table

2013-06-11 Thread Dan
Ah, I missed the part where you're trying to match data in multiple columns.

On Tuesday, June 11, 2013 9:32:03 AM UTC-4, Super Kevy wrote:
>
> The clicking is no problem.  Its matching the 7 columns of data to 
> make sure I've got the correct row. 
> The matching is what is taking so long. 
>
> Currently I push a table row into an array and match with  .include? 
> which beats a bunch of if A=B comparisons. 
> Would it be faster to push the table into an 2-d array  using the 
> table method   .to_a  ? 
>
>
>
> On Jun 10, 8:36 am, Dan  wrote: 
> > I use something like the below.  Find the row you're looking for and 
> then 
> > click on the column and element within that column.  You might be able 
> to 
> > get away with less, but this works pretty well. 
> > 
> > b.tr(:text => /the row I'm looking for/).td(:index => 5).img.click 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Friday, June 7, 2013 4:36:21 PM UTC-4, Super Kevy wrote: 
> > 
> > > I have a table on a page with 7 columns of data that I need to match 
> > > against in order to click a button associated with row. 
> > > My current method is to do compares of the row data but it seems to 
> > > take forever to evaluate the 7 column match. 
> > > Any suggestions on how I can speed up validating a table row contains 
> > > the values I'm looking for? 
>

-- 
-- 
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: Any fast ways to parse a table

2013-06-10 Thread Dan
I use something like the below.  Find the row you're looking for and then 
click on the column and element within that column.  You might be able to 
get away with less, but this works pretty well.

b.tr(:text => /the row I'm looking for/).td(:index => 5).img.click

On Friday, June 7, 2013 4:36:21 PM UTC-4, Super Kevy wrote:
>
> I have a table on a page with 7 columns of data that I need to match 
> against in order to click a button associated with row. 
> My current method is to do compares of the row data but it seems to 
> take forever to evaluate the 7 column match. 
> Any suggestions on how I can speed up validating a table row contains 
> the values I'm looking for? 
>
>
>

-- 
-- 
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] Can't use = sign in URL.

2013-06-04 Thread Dan
I think you're going to want to look into using yaml instead of flat text 
files.  You'll want to start by looking here.

http://www.ruby-doc.org/stdlib-1.8.7/libdoc/yaml/rdoc/YAML.html#method-c-parser

On Tuesday, June 4, 2013 2:26:05 PM UTC-4, JimJamie wrote:
>
> I'm using Watir with Ruby 1.86.
>
> I have a properties file that I point to when I fire up a Watir script.
>
> properties = 
> TemplateProperties.new("../properties/template_properties.txt")
>
> Then it uses this:
>
> b.goto(properties.getUrl)
>
> to pull the correct url.  I use several.
>
> When I attempt to fire up a Watir script I do not get the website that I'm 
> looking for when I use the url in my previous (original) post, given to me 
> today to test with.
> When I copy and paste the url into the browser address bar it works fine.
> When I copy and paste the url into the browser address bar, up to the 
> first = sign I get the same result as when I try to fire it up in Watir.
> So, I'm pretty sure Watir/Ruby interprets the = as something else. (like, 
> oh this must be a new row)
> I did some research before I posted. 
> Someone else had a similar issue where the equals sign was replaced with 
> something like %3D. It worked for them, not for me.
>
>
> On Tue, Jun 4, 2013 at 1:05 PM, Željko Filipin 
> 
> > wrote:
>
>> How is this related to Watir? I have no idea what you are talking about. 
>> Moar context, please. :)
>>
>> Željko
>> --
>> https://leanpub.com/watirbook 
>>
>>
>> On Tue, Jun 4, 2013 at 5:59 PM, JimJamie 
>> > wrote:
>>
>>>
>>> It seems to stop looking at the first equal sign.
>>> Is there a way to rewrite the equals sign and get the same result?
>>> I have something like this in my properties file.
>>>
>>> #url=
>>> http://FooBar.com/Portal/quote?source=club&clubcode=412&state=CA&zipcode=90210
>>>
>>>
>>>  -- 
>>> -- 
>>> 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-...@googlegroups.com 
>> http://groups.google.com/group/watir-general
>> watir-genera...@googlegroups.com 
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Watir General" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/watir-general/u5fJr43D74Y/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, 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.




[wtr-general] Re: Issue with clicking on a button which opens a on click alert - works on Firefox but not on phantom.js

2013-05-23 Thread Dan
Might want to read up on how ghostdriver handles alerts?  There's a lot of 
discussion here:

https://github.com/detro/ghostdriver/issues/20


On Thursday, May 23, 2013 1:46:33 AM UTC-4, Ankita@Adslot wrote:
>
> Hi 
>
> I have following code 
> 
>   Login
> 
>
>
> Now when you click on this login link, it opens a alert JS message having 
> two buttons OK and Cancel.. Clicking OK will log you in.
>
> I added the code 
> browser.element(:xpath,"//div/a[contains(.,'Login')]).when_present.click
> $b.alert.ok
>
> This code does works fine on firefox, but if I want to use it with 
> phantom.js, seems like it does not click the login button.
>
> Any help would be highly appreciated.
>

-- 
-- 
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 : How to select an option from the list

2013-05-17 Thread Dan
You may need a when_present because if that list is being populated via 
some other selection or ajax it might not be there when you're trying to 
select it.
 
@browser.select_list(:name => "siteName").when_present.select "ccfashion"

On Friday, May 17, 2013 12:07:53 PM UTC-4, watir webdriver wrote:
>
>
>
> On Friday, May 17, 2013 4:58:11 PM UTC+1, watir webdriver wrote:
>>
>> Hi,
>>
>> In my application I've to select an option from the list.I tried as below 
>> but its not selecting the option:
>>
>> @browser.select_list(:name => "siteName").select "ccfashion"
>>
> @browser.select_list_element(:name => "siteName").option(:value, 
> 'ccfashion') 
>
>>
>> HTML code:
>> 
>> burton
>> burtoneu
>> cathkidston
>> ccfashion
>> chemistdirect
>> cloggs
>> coggles
>> colorway
>> coopersofstortford
>> cottontraders
>> crewclothing
>> cultura
>> 
>>
>> Error message :
>>  "ccfashion" not found in select list 
>> (Watir::Exception::NoValueFoundException)
>>
>> 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

--- 
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: Cannot identify button element by value?

2013-05-16 Thread Dan
It doesn't look like it's just Chrome actually.  I got the same results in 
Firefox.  Looks like the stackoverflow answer addresses the issue?  If I 
change from button type of button to input type of button it works like you 
would expect.

>> b = Watir::Browser.new :firefox
=> #
>> b.goto("file:///Users/admin/Desktop/button.html")
=> "file:///Users/admin/Desktop/button.html"
>> b.html
=> "http://www.w3.org/1999/xhtml\";>Click 
Me!"
>> b.button.value
=> "hey"
>> b.button(:value => "hey").exists?
=> false
>> b.button(:value => "hey").click
Watir::Exception::UnknownObjectException: unable to locate element, using 
{:value=>"hey", :tag_name=>"button"}
from 
/Library/Ruby/Gems/1.8/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:490:in
 
`assert_exists'
from 
/Library/Ruby/Gems/1.8/gems/watir-webdriver-0.6.4/lib/watir-webdriver/elements/element.rb:118:in
 
`click'
from (irb):11
# Changed from button to input type of button
>> b.refresh
=> []
>> b.html
=> "http://www.w3.org/1999/xhtml\";>Click 
Me!"
>> b.button(:value => "hey").exists?
=> true

On Wednesday, May 15, 2013 5:35:12 PM UTC-4, Chuck van der Linden wrote:
>
> See this SO issue for HTML sample, code samples tried in IRB
>
>   
> http://stackoverflow.com/questions/16574999/watir-webdriver-unable-to-identify-button-by-value
>
> the short of it.  I've got HTML like
>
> value="is_agent" style="">An Agent
>
>  When I try to identify the button by class, or text, it works, but by 
> value  such as 
>
> b.button(:value => "is_agent").exists?
>
> fails  (that returns false, most other stuff returns the typical cannot be 
> located message)
>
> what the heck?  shouldn't this be working?   (Chrome on a Mac) 
>

-- 
-- 
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: Waitir: Ignoring modal wait dialogs during ajax call

2013-05-10 Thread Dan
Thanks Andrew!  You learn something new everyday!

On Friday, May 10, 2013 11:58:31 AM UTC-4, Andrew Leaf wrote:
>
>
>
> On Thursday, May 9, 2013 8:54:19 PM UTC-5, Dan wrote:
>>
>> Secondly, your syntax for starting a browser is incorrect.  It should be 
>> .new not .start.
>> browser = Watir::Browser.new :chrome
>>
>
> Hello Dan,
>
> I just wanted to clarify that is valid Watir code.
>
> browser = Watir::Browser.start "http://localhost:8080/admin/index.php/login";
>
> This is valid Watir code.  Calling Watir::Browser.start with a URL as an 
> argument is the same as:
>
> browser = Watir::Browser.new
>
> browser.goto "browser "http://localhost:8080/admin/index.php/login";
>
> You may need to dismiss the modal by clicking on whichever element dismisses 
> the modal for the user.  Without page HTML when the modal is visible and an 
> indication of which line is giving the failure in your Watir code, it's 
> difficult to provide any further guidance.
>
> If you have HTML available, paste it in so we can further troubleshoot.
>
> Andrew
>
>

-- 
-- 
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: Waitir: Ignoring modal wait dialogs during ajax call

2013-05-09 Thread Dan
There's a few funny things about your script.  You really only need to 
require watir or watir-webdriver.  If you're using the watir gem it'll 
either load the watir-classic gem, if you ask it for ie, or watir-webdriver 
gem if you ask it for chrome or firefox.

Secondly, your syntax for starting a browser is incorrect.  It should be 
.new not .start.
browser = Watir::Browser.new :chrome

As far as handling the alert, you can do something like this after you 
click on whatever element that causes the spinner to popup.  This below 
will just wait until the dialog goes away.

browser.alert.wait_while_present

It's nice to see that you're using the wait methods.  It seems lots of 
people who are just starting out end up using sleeps which is bad practice. 
 You can actually collapse two lines into one like below as well.


browser.link(:text, "Manage Members").when_present.click


On Saturday, April 20, 2013 5:56:08 AM UTC-4, Christian Scheid wrote:
>
> Hi,
>
> I'm just starting to use Waitir and have the following issue: The Waitir 
> script is supposed to execute a search on a KendoUI Grid element which in 
> turn displays a modal spinner when performing an ajax call to retrieve the 
> search results. (script below). Waitir throws an UnhandledAlertError 
> because a modal dialog is present (below). I've seen Waitir code to handle 
> javascript pop ups but I haven't found a solution how to handle a modal 
> pop-up without any buttons like a spinner.
>
> Any ideas?
>
> Thanks!
>
> *Error*: nsCommandProcessor.prototype.execute': Modal dialog present 
> (Selenium::WebDriver::Error::UnhandledAlertError)
>
> *Script:*
>
> require 'watir'
> require 'watir-webdriver'
>
> browser = Watir::Browser.start "http://localhost:8080/admin/index.php/login";
> browser.link(:text, "Manage Members").wait_until_present
> browser.link(:text, "Manage Members").click
> browser.text_field(:id, "subscriber_id").set("1")
> browser.button(:value,"Search").click
>
>

-- 
-- 
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: Tabs, PDFs, focus, and Chrome

2013-05-09 Thread Dan Meltz

Dan,

Thanks for the help, but I wasn't able to make that work, either. 
I also tried exploring using something like
b = Watir::Browser.new :chrome, :switches => ['--disable-plugins']
but I had no luck with that, either.

The point of the test is for a human to look at the PDFs, so I don't really 
care if they are downloaded or left open in the browser, I just need to get 
*one* of those options to work.
I hate to even consider it, but it's starting to look like I'll just have 
to open a new browser for every freakin' test, because there doesn't seem 
to be any way to get chrome to *actually* download PDFs, nor any way to use 
watir to *actually* go back to a previously opened (and still open) tab. 
Yes, I tried browser.window(:title => "tab_name").use do.  No, it doesn't 
work, because there is a modal there, so I need focus to go back there so 
it will see the modal. At least that's what it seems like.

Back to the drawing board.

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

2013-05-09 Thread Dan
You downloaded the wrong chromedriver.  Chromedriver2 isn't quite ready. 
 Get the 
chromedriver_win_26.0.1383.0.zip
.

On Thursday, May 9, 2013 7:35:37 AM UTC-4, mc060200778 wrote:
>
> even this is not working.
> i just learnt from chromdriver download page that Chrome Driver is not 
> available for WIN 64 bit operating system. :( is it true?
> i think my OS is 64 bit and that is causing problem since chrome driver is 
> 32 bit compatible
>
>
>
> On Thu, May 9, 2013 at 3:33 PM, Željko Filipin 
> 
> > wrote:
>
>> On Thu, May 9, 2013 at 12:05 PM, Sohail Mirza 
>> > wrote:
>>  
>>> You are using an old or stdlib version of json gem
>>> Please upgrade to the recent version by adding this to your Gemfile:
>>>   gem 'json', '~> 1.7.7'
>>>
>>
>> I think you should explicitly install json gem:
>>
>> gem install json
>>
>> Željko
>>  
>> -- 
>> -- 
>> 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.




[wtr-general] Re: Tabs, PDFs, focus, and Chrome

2013-05-09 Thread Dan
Can't seem to edit my post, but the example should be

profile = Selenium::WebDriver::Chrome::Profile.new
profile['plugins.enabled_internal_pdf3'] = false
b = Watir::Browser.new :chrome, :profile => profile
b.goto("http://www.aisb.org.uk/convention/aisb08/AISB08.pdf";)

On Thursday, May 9, 2013 9:06:56 AM UTC-4, Dan wrote:
>
> Seems like the best thing to do would be to disable the chrome pfd viewer 
> so it downloads it instead of trying to open it.  I think technically you 
> should be able to pass a switch to chrome to disable the 
> viewer programmatically, but I tried and it didn't work for me, but maybe 
> this will lead you in the right direction.
>
> http://watirwebdriver.com/chrome/
>
> profile = Selenium::WebDriver::Chrome::Profile.new
> b = Watir::Browser.new :chrome, :profile => profile
> b.goto("http://www.aisb.org.uk/convention/aisb08/AISB08.pdf";)
>
> Although, if you're not validating anything in the file, it might not even 
> be worth the trouble to download it.  See below for some thoughts on that. 
>  The examples there are in java, but the concept is much the same in ruby.
>
>
> http://ardesco.lazerycode.com/index.php/2012/07/how-to-download-files-with-selenium-and-why-you-shouldnt/
>
> On Wednesday, May 8, 2013 5:45:53 PM UTC-4, Dan Meltz wrote:
>>
>>
>> Short version: new tabs in Chromeprevent old tabs from being used, fixing 
>> that means that opened tabs with PDFs in them get reused before a human can 
>> examine the PDFs.
>>
>> Originally it worked like this:
>> 1. open new Chrome window to main page of the app (tab #1)
>> 2. [do process A and then] click the button and a new tab (tab #2) opens 
>> with PDF A in it.
>> 3. Go back to tab #1 [do process B and then] click the button and a new 
>> tab (tab #3) opens with PDF B in it.
>> 4. Go back to tab #1 [do process C and then] click the button and a new 
>> tab (tab #4) opens and Word document C document gets downloaded.
>> 6. Go back to tab #1 [do process D and then] click the button and a new 
>> tab (tab #5) opens and Word document D document gets downloaded.
>>
>> All tabs stay open and PDFs can be viewed.  Not perfect, but workable.
>>
>> But then things changed. I pulled frequently used stuff out, put them in 
>> methods in another file so all of the various tests could use them, which 
>> seemed like a good idea. But that seems to have caused problems with losing 
>> focus on the original window. (I may be wrong) now I'm stuck with: 
>> 1. open new Chrome window to main page of the app (tab #1)
>> 2. [do process A and then] click the button and a new tab (tab #2) opens 
>> with PDF A in it.
>> 3. Stay in tab #2 [do process B and then] click the button and a new tab 
>> (tab #3) opens with PDF B in it. PDF A is now lost
>> 4. Stay in tab #3 [do process C and then] click the button and a new tab 
>> (tab #4) opens and Word document C document gets downloaded. PDF B is now 
>> lost
>> 6. Stay in tab #4 [do process D and then] click the button and a new tab 
>> (tab #5) opens and Word document D document gets downloaded.
>>
>> This was caused by using "b.windows.last.use"
>> So I tried using "b.windows.first.use"
>> But that fails, because focus isn't going back to tab #1, and watir can't 
>> find the object in the modal that it needs to click. 
>> (in `assert_ok': Element is not clickable at point (737.5, -373) 
>> (Selenium::WebDriver::Error::UnknownError))
>>
>> So far as I can tell, I would be fine if I could do any one of the 
>> following
>> 1) get PDFs to download. I cannot. This 
>> page<https://groups.google.com/forum/?fromgroups=#!topic/watir-general/gItPeAaWZWY>seemed
>>  promising, but the code didn't work and I couldn't fix it. 
>> 2) get watir to go back to the first page, "for realsies", and find the 
>> buttons it needs 
>> 3) perhaps open a new tab for every section of the test (I'm going to 
>> look into this one, but I'm not overly hopeful)
>>
>> Any ideas?
>> I updated Watir and Ruby both within the last two months. I'm using 
>> Chrome on OSX. Moving to Windows or IE are not viable options.
>>
>> Here is a section of the code. No, I'm not a programmer first and 
>> foremost.
>>
>> # print Inventory Report .PDF
>> b.goto currenturl
>> b.div(:id, 'page').a(:text, 'Inventory Report').click 
>> sleep 1
>> b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click
>> b.link(:id => "submitB

[wtr-general] Re: Tabs, PDFs, focus, and Chrome

2013-05-09 Thread Dan
Seems like the best thing to do would be to disable the chrome pfd viewer 
so it downloads it instead of trying to open it.  I think technically you 
should be able to pass a switch to chrome to disable the 
viewer programmatically, but I tried and it didn't work for me, but maybe 
this will lead you in the right direction.

http://watirwebdriver.com/chrome/

profile = Selenium::WebDriver::Chrome::Profile.new
b = Watir::Browser.new :chrome, :profile => profile
b.goto("http://www.aisb.org.uk/convention/aisb08/AISB08.pdf";)

Although, if you're not validating anything in the file, it might not even 
be worth the trouble to download it.  See below for some thoughts on that. 
 The examples there are in java, but the concept is much the same in ruby.

http://ardesco.lazerycode.com/index.php/2012/07/how-to-download-files-with-selenium-and-why-you-shouldnt/

On Wednesday, May 8, 2013 5:45:53 PM UTC-4, Dan Meltz wrote:
>
>
> Short version: new tabs in Chromeprevent old tabs from being used, fixing 
> that means that opened tabs with PDFs in them get reused before a human can 
> examine the PDFs.
>
> Originally it worked like this:
> 1. open new Chrome window to main page of the app (tab #1)
> 2. [do process A and then] click the button and a new tab (tab #2) opens 
> with PDF A in it.
> 3. Go back to tab #1 [do process B and then] click the button and a new 
> tab (tab #3) opens with PDF B in it.
> 4. Go back to tab #1 [do process C and then] click the button and a new 
> tab (tab #4) opens and Word document C document gets downloaded.
> 6. Go back to tab #1 [do process D and then] click the button and a new 
> tab (tab #5) opens and Word document D document gets downloaded.
>
> All tabs stay open and PDFs can be viewed.  Not perfect, but workable.
>
> But then things changed. I pulled frequently used stuff out, put them in 
> methods in another file so all of the various tests could use them, which 
> seemed like a good idea. But that seems to have caused problems with losing 
> focus on the original window. (I may be wrong) now I'm stuck with: 
> 1. open new Chrome window to main page of the app (tab #1)
> 2. [do process A and then] click the button and a new tab (tab #2) opens 
> with PDF A in it.
> 3. Stay in tab #2 [do process B and then] click the button and a new tab 
> (tab #3) opens with PDF B in it. PDF A is now lost
> 4. Stay in tab #3 [do process C and then] click the button and a new tab 
> (tab #4) opens and Word document C document gets downloaded. PDF B is now 
> lost
> 6. Stay in tab #4 [do process D and then] click the button and a new tab 
> (tab #5) opens and Word document D document gets downloaded.
>
> This was caused by using "b.windows.last.use"
> So I tried using "b.windows.first.use"
> But that fails, because focus isn't going back to tab #1, and watir can't 
> find the object in the modal that it needs to click. 
> (in `assert_ok': Element is not clickable at point (737.5, -373) 
> (Selenium::WebDriver::Error::UnknownError))
>
> So far as I can tell, I would be fine if I could do any one of the 
> following
> 1) get PDFs to download. I cannot. This 
> page<https://groups.google.com/forum/?fromgroups=#!topic/watir-general/gItPeAaWZWY>seemed
>  promising, but the code didn't work and I couldn't fix it. 
> 2) get watir to go back to the first page, "for realsies", and find the 
> buttons it needs 
> 3) perhaps open a new tab for every section of the test (I'm going to look 
> into this one, but I'm not overly hopeful)
>
> Any ideas?
> I updated Watir and Ruby both within the last two months. I'm using Chrome 
> on OSX. Moving to Windows or IE are not viable options.
>
> Here is a section of the code. No, I'm not a programmer first and foremost.
>
> # print Inventory Report .PDF
> b.goto currenturl
> b.div(:id, 'page').a(:text, 'Inventory Report').click 
> sleep 1
> b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click
> b.link(:id => "submitBTNprint-inventory-report").fire_event "onclick"
> status = page_status(currenturl)  # these are the methods that I pulled 
> out 
> passtest = section_results(currenturl,b) # and put in a shared file
>
> # print General List .PDF
> b.goto [main page URL]
> b.div(:id, 'page').a(:text, 'General List').click 
> sleep 1
> b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click
> b.link(:id => "submitBTNprint-general-list").fire_event "onclick"
> status = page_status(currenturl) 
> passtest = section_results(currenturl,b)
>
> # print General List .DOC
> b.goto [main page URL]
>

[wtr-general] Tabs, PDFs, focus, and Chrome

2013-05-09 Thread Dan Meltz


Short version: new tabs in Chromeprevent old tabs from being used, fixing 
that means that opened tabs with PDFs in them get reused before a human can 
examine the PDFs.

Originally it worked like this:
1. open new Chrome window to main page of the app (tab #1)
2. [do process A and then] click the button and a new tab (tab #2) opens 
with PDF A in it.
3. Go back to tab #1 [do process B and then] click the button and a new tab 
(tab #3) opens with PDF B in it.
4. Go back to tab #1 [do process C and then] click the button and a new tab 
(tab #4) opens and Word document C document gets downloaded.
6. Go back to tab #1 [do process D and then] click the button and a new tab 
(tab #5) opens and Word document D document gets downloaded.

All tabs stay open and PDFs can be viewed.  Not perfect, but workable.

But then things changed. I pulled frequently used stuff out, put them in 
methods in another file so all of the various tests could use them, which 
seemed like a good idea. But that seems to have caused problems with losing 
focus on the original window. (I may be wrong) now I'm stuck with: 
1. open new Chrome window to main page of the app (tab #1)
2. [do process A and then] click the button and a new tab (tab #2) opens 
with PDF A in it.
3. Stay in tab #2 [do process B and then] click the button and a new tab 
(tab #3) opens with PDF B in it. PDF A is now lost
4. Stay in tab #3 [do process C and then] click the button and a new tab 
(tab #4) opens and Word document C document gets downloaded. PDF B is now 
lost
6. Stay in tab #4 [do process D and then] click the button and a new tab 
(tab #5) opens and Word document D document gets downloaded.

This was caused by using "b.windows.last.use"
So I tried using "b.windows.first.use"
But that fails, because focus isn't going back to tab #1, and watir can't 
find the object in the modal that it needs to click. 
(in `assert_ok': Element is not clickable at point (737.5, -373) 
(Selenium::WebDriver::Error::UnknownError))

So far as I can tell, I would be fine if I could do any one of the following
1) get PDFs to download. I cannot. This 
pageseemed
 promising, but the code didn't work and I couldn't fix it. 
2) get watir to go back to the first page, "for realsies", and find the 
buttons it needs 
3) perhaps open a new tab for every section of the test (I'm going to look 
into this one, but I'm not overly hopeful)

Any ideas?
I updated Watir and Ruby both within the last two months. I'm using Chrome 
on OSX. Moving to Windows or IE are not viable options.

Here is a section of the code. No, I'm not a programmer first and foremost.

# print Inventory Report .PDF
b.goto currenturl
b.div(:id, 'page').a(:text, 'Inventory Report').click 
sleep 1
b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click
b.link(:id => "submitBTNprint-inventory-report").fire_event "onclick"
status = page_status(currenturl)  # these are the methods that I pulled out 
passtest = section_results(currenturl,b) # and put in a shared file

# print General List .PDF
b.goto [main page URL]
b.div(:id, 'page').a(:text, 'General List').click 
sleep 1
b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click
b.link(:id => "submitBTNprint-general-list").fire_event "onclick"
status = page_status(currenturl) 
passtest = section_results(currenturl,b)

# print General List .DOC
b.goto [main page URL]
b.div(:id, 'page').a(:text, 'General List').click 
sleep 1
b.div(:id, 'printGeneralInventoryListModal').a(:text, '.DOC').click
b.div(:id, 'printGeneralInventoryListModal').a(:text, 'A4').click
b.link(:id => "submitBTNprint-general-list").fire_event "onclick"
status = page_status(currenturl) 
passtest = section_results(currenturl,b)

# print Inventory Report .XLS
b.goto [main page URL]
b.div(:id, 'page').a(:text, 'Inventory Report').click 
sleep 1
b.div(:id, 'printInventoryReportModal').a(:text, 'A4').click
b.div(:id, 'printInventoryReportModal').a(:text, '.XLS').click
b.link(:id => "submitBTNprint-inventory-report").fire_event "onclick"
status = page_status(currenturl) 
passtest = section_results(currenturl,b)

-- 
-- 
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] watir installation issues

2013-05-01 Thread Dan
I think the easiest thing to do is drop the IE and/or chromedriver into 
the C:\Ruby\Ruby200\bin directory and then try again.

Dan

On Wednesday, May 1, 2013 1:27:13 PM UTC-4, Anne wrote:
>
> So, I'm also doing a fresh install on a new PC.  I followed the 
> instructions above (although not necessarily in the same order).
>
> I put ieDriverServer in a folder called WebDrivers and added that to my 
> PATH.
>
> This is the list of gems installed.
>  *** LOCAL GEMS ***
>  bigdecimal (1.2.0)
>  builder (3.2.0)
>  childprocess (0.3.9)
>  commonwatir (4.0.0)
>  ffi (1.8.1 x86-mingw32)
>  hoe (3.6.0)
>  io-console (0.4.2)
>  json (1.7.7)
>  mini_magick (3.5.0)
>  mini_portile (0.5.0)
>  minitest (4.3.2)
>  multi_json (1.7.2)
>  nokogiri (1.5.9 x86-mingw32)
>  psych (2.0.0)
>  rake (0.9.6)
>  rautomation (0.9.1)
>  rdoc (4.0.0)
>  rubygems-update (2.0.3)
>  rubyzip (0.9.9)
>  s4t-utils (1.0.4)
>  selenium-webdriver (2.32.1)
>  subexec (0.2.3)
>  test-unit (2.0.0.0)
>  user-choices (1.1.6.1)
>  watir (4.0.2 x86-mingw32)
>  watir-classic (3.6.0)
>  watir-webdriver (0.6.4)
>  websocket (1.0.7)
>  win32-api (1.4.8 x86-mingw32)
>  win32-process (0.7.2)
>  win32screenshot (1.0.8)
>  windows-api (0.4.2)
>  windows-pr (1.2.2)
>  xml-simple (1.1.2)
>
> On at least one of the gem installs, I saw this:
> unable to convert "\x90" from ASCII-8BIT to UTF-8 for 
> lib/watir-classic/IEDialog/Release/IEDialog.dll, skipping
>
> when I tried to bring up the IE browser through irb -- well, this is the 
> 'session'
>  C:\Ruby>irb
>  DL is deprecated, please use Fiddle
>  irb(main):001:0> require "watir-webdriver"
>  => true
>  irb(main):002:0> browser = Watir::Browser.new :ie
>  Selenium::WebDriver::Error::WebDriverError: Unable to find standalone 
> executable. Please download the IEDriverServer from 
>  http://code.google.com/p/selenium/downloads/list and place the 
> executable on your PATH.
> from 
> C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/ie/server.rb:13:in
>  
> `get'
> from 
> C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/ie/bridge.rb:23:in
>  
> `initialize'
> from 
> C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/common/driver.rb:35:in
>  
> `new'
> from 
> C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/common/driver.rb:35:in
>  
> `for'
> from 
> C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver.rb:67:in
>  
> `for'
> from 
> C:/Ruby/Ruby200/lib/ruby/gems/2.0.0/gems/watir-webdriver-0.6.4/lib/watir-webdriver/browser.rb:46:in
>  
> `initialize'
> from (irb):2:in `new'
> from (irb):2
> from C:/Ruby/Ruby200/bin/irb:12:in `'
> irb(main):003:0>
>
> I have no idea where to go from here.  I've checked my PATH
>  C:\Ruby>path
>  PATH=C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files 
> (x86)\AMD APP\bin\x86;C:\windows\system32;C:\windows;C:\windows\Sy
>  stem32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;c:\Program 
> Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Ruby\Ruby20
>  0\bin; C:\WebDrivers
>
> I verified IEDriverServer is in WebDrivers
>  C:\Ruby>dir \WebDrivers
>   Volume in drive C is Windows
>   Volume Serial Number is B4E6-C01B
>   Directory of C:\WebDrivers
>   04/30/2013  12:52 PM  .
>   04/30/2013  12:52 PM  ..
>   04/30/2013  12:52 PM 2,459,648 IEDriverServer.exe
> 1 File(s)  2,459,648 bytes
> 2 Dir(s)  275,042,410,496 bytes free
>
> I'm actually using IE10, if that makes a difference.
>
> Can anyone tell me what I'm missing?
>
> Thanks in advance!
> Anne
>
> On Friday, April 26, 2013 8:42:30 AM UTC-4, gary wrote:
>>
>> hurrah found it, details posted below in case anyone else encounters the 
>> same problem
>>
>> ok, summarising from the top
>>
>> installed ruby 2.0.0 using installer
>>
>> from command prompt, > gem update --system
>>
>> downloaded appropriate devkit
>> extracted devkit to c:\devkit
>> from command prompt, devkit folder, ruby dk.rb init
>> then ruby dk.rb install
>>
&

[wtr-general] Re: CHROME DRIVER FOR WIN64 is needed on wiki page

2013-04-30 Thread Dan
I see what the problem is.  This actually happened to a couple of guy here 
as well.  You downloaded chromedriver2 which doesn't appear to be ready for 
prime time.  I can tell because I see chromedriver=0.8.  Download one of 
the servers that doesn't have 2 at the end of the name such as this one:

https://chromedriver.googlecode.com/files/chromedriver_win_26.0.1383.0.zip


On Tuesday, April 30, 2013 12:17:03 PM UTC-4, agrant wrote:
>
> Thanks for responding Dan when when I load Watir/Wedriver that loads fine. 
> Even when I load IE/FF but I only get the error in the Chromelog when I try 
> to load Chrome with browser = Watir::Browser.new :chrome. I put the 32bit 
> Driver in the correct location which is the ruby/bin so I am not sure why I 
> am getting the error. 
>
> On Monday, April 22, 2013 1:38:16 PM UTC-4, HoodRules Street Safety wrote:
>>
>> *I am receiving the below error in my chromedriver.log and I suspect it 
>> is because I don't have the Chrome Win64. *
>>
>>
>> [0422/115838:INFO:chromedriver_server.cc(76)] Handling request: /session 
>> {"desiredCapabilities":{"browserName":"chrome","version":"","platform":"ANY","javascriptEnabled":true,"cssSelectorsEnabled":true,"takesScreenshot":false,"nativeEvents":false,"rotatable":false,"chromeOptions":{"detach":true},"chrome.detach":true}}
>> [0422/115839:INFO:chromedriver_server.cc(81)] Done handling request: 200 
>> {"sessionId":"","status":13,"value":{"message":"unknown error: unrecognized 
>> chrome option: detach\n  (Driver info: chromedriver=0.8,platform=Windows NT 
>> 6.1 SP1 x86_64)"}}
>> [0422/115839:INFO:chromedriver_server.cc(76)] Handling request: 
>> /session/url 
>> [0422/115839:INFO:chromedriver_server.cc(81)] Done handling request: 200 
>> {"sessionId":"url","status":100,"value":{"message":"no such session: url\n 
>>  (Driver info: chromedriver=0.8,platform=Windows NT 6.1 SP1 x86_64)"}}
>> [0422/115839:INFO:chromedriver_server.cc(76)] Handling request: 
>> /session/title 
>> [0422/115839:INFO:chromedriver_server.cc(81)] Done handling request: 200 
>> {"sessionId":"title","status":100,"value":{"message":"no such session: 
>> title\n  (Driver info: chromedriver=0.8,platform=Windows NT 6.1 SP1 
>> x86_64)"}}
>>
>>
>> *When I go to the below page I only see Chrome WIN32 which I downloaded 
>> but that still doesn't resolved the issue because I have a 64bit machine. 
>> Do you have Chrome WIN64? Or am I misunderstanding the issue?*
>>
>> https://code.google.com/p/chromedriver/downloads/list
>>
>

-- 
-- 
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: data-bind="value: UserName

2013-04-29 Thread Dan
Any reason you can't use the placeholder attribute to locate it?

browser.text_field(:placeholder => "User Name").set("user")

On Monday, April 29, 2013 3:03:27 PM UTC-4, mc060200778 wrote:
>
> Hi,
>
> In the following rendered HTML code, can i use Value attribute to set 
> value into the user name field? like as follow
>
> *Browser.text_field(:value,"UserName").set "Hi"*
>
>  placeholder="User Name">
>
> kindly advise.
> Thanks
>

-- 
-- 
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: CHROME DRIVER FOR WIN64 is needed on wiki page

2013-04-23 Thread Dan
There's not 64 bit Chrome on Windows so, the 32 bit chrome driver should be 
fine.

http://www.chromium.org/nativeclient/design-documents/native-client-in-chrome-on-64-bit-windows

Those messages below are informational, are you having some problem with 
watir/watir-webdriver?

On Monday, April 22, 2013 1:38:16 PM UTC-4, HoodRules Street Safety wrote:
>
> *I am receiving the below error in my chromedriver.log and I suspect it 
> is because I don't have the Chrome Win64. *
>
>
> [0422/115838:INFO:chromedriver_server.cc(76)] Handling request: /session 
> {"desiredCapabilities":{"browserName":"chrome","version":"","platform":"ANY","javascriptEnabled":true,"cssSelectorsEnabled":true,"takesScreenshot":false,"nativeEvents":false,"rotatable":false,"chromeOptions":{"detach":true},"chrome.detach":true}}
> [0422/115839:INFO:chromedriver_server.cc(81)] Done handling request: 200 
> {"sessionId":"","status":13,"value":{"message":"unknown error: unrecognized 
> chrome option: detach\n  (Driver info: chromedriver=0.8,platform=Windows NT 
> 6.1 SP1 x86_64)"}}
> [0422/115839:INFO:chromedriver_server.cc(76)] Handling request: 
> /session/url 
> [0422/115839:INFO:chromedriver_server.cc(81)] Done handling request: 200 
> {"sessionId":"url","status":100,"value":{"message":"no such session: url\n 
>  (Driver info: chromedriver=0.8,platform=Windows NT 6.1 SP1 x86_64)"}}
> [0422/115839:INFO:chromedriver_server.cc(76)] Handling request: 
> /session/title 
> [0422/115839:INFO:chromedriver_server.cc(81)] Done handling request: 200 
> {"sessionId":"title","status":100,"value":{"message":"no such session: 
> title\n  (Driver info: chromedriver=0.8,platform=Windows NT 6.1 SP1 
> x86_64)"}}
>
>
> *When I go to the below page I only see Chrome WIN32 which I downloaded 
> but that still doesn't resolved the issue because I have a 64bit machine. 
> Do you have Chrome WIN64? Or am I misunderstanding the issue?*
>
> https://code.google.com/p/chromedriver/downloads/list
>

-- 
-- 
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] Using chrome-driver with watir (and not watir-webdriver?)

2013-04-19 Thread Dan
One thing to note is that once you initialize one of the browsers you're 
stuck with that driver that's chosen within the ruby "session."  Like if 
you do something like this:

require 'watir'
# Starts with the watir-classic gem/driver
b = Watir::Browser.new :ie
b.goto("google.com")

# This will start ie with watir-classic even though you specified chrome.
c = Watir::Browser.new :chrome
b.goto("cnn.com")

On Thursday, April 18, 2013 5:56:59 PM UTC-4, Chuck van der Linden wrote:
>
> On Thursday, April 18, 2013 3:46:02 AM UTC-7, Željko Filipin wrote:
>
>> On Thu, Apr 18, 2013 at 11:37 AM,  wrote:
>>
>>> So does that mean that watir-webdriver is implicitly imported?
>>
>>
>> As far as I know, yes. When you install/require watir gem, either 
>> watir-webdriver or watir-classic gems will be required, depending on your 
>> platform and browser that you want to drive.
>>
>> Željko
>>
>
> Watir is now a wrapper around the other two.  So that is why the code he 
> is using works, and yes, he's actually using watir-webdriver when he does 
> that.  There's a .driver method you can use to select which driver (classic 
> or webdriver) is actually used, and some logic that tried to guess smartly 
> which one you want based on the OS and the browser type you specify.
>
> I've not played with it myself, I'm just using watir-webdriver, so I can't 
> give you a lot of details.  
>

-- 
-- 
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 set an input MULTIPLE files with Watir?

2013-04-15 Thread Dan
What about just the below?

@browser.file_field(:name => "original").when_present.set *my_image*

On Monday, April 15, 2013 11:07:40 AM UTC-4, Karoline Leite wrote:
>
> Hi !
>
> I'm trying to use an INPUT FILE, but I'm receiving error like "unable to 
> locate {:name=>"original", :tag_name=>"input", :type=>"file"} "
>
> My page has an DIV with an FORM, and the FORM has an INPUT FILE element. 
> The input file has an attribute "MULTIPLE"... 
>
> I'm trying:
>
> *@browser.div(:class, "ui-dialog ui-widget ui-widget-content 
> ui-corner-all ").form(:id, "file_upload").file_field(:name, 
> "original").when_present.set my_image*
> *
> *
> This way, I can't find the element... 
>
> I tried, just testing, the both codes and the STEP pass:
>
> *@browser.div(:class, "ui-dialog ui-widget ui-widget-content 
> ui-corner-all ").when_present.click*
> *
> *
> *@browser.div(:class, "ui-dialog ui-widget ui-widget-content 
> ui-corner-all ").form(:id, "file_upload").when_present.click*
> *
> *
> So, watir finds the DIV and the FORM, but can't find the input file... I'm 
> thinking the problem is the attribute *multiple *
> *
> *
>
> How do I set this input file ?
>
>
> The page code:
>
> >> aria-labelledby="ui-dialog-title-add_media_dialog">>> class="ui-dialog-titlebar ui-widget-header ui-corner-all 
>>> ui-helper-clearfix">>> id="ui-dialog-title-add_media_dialog">Adicionar 
>>> imagensclose>> style="display: block; width: auto; min-height: 114px; height: auto;" 
>>> class="ui-dialog-content ui-widget-content">
>>
>> 
>>
>>   >> enctype="multipart/form-data" id="file_upload" method="post" 
>>> class="file_upload">>> name="authenticity_token" type="hidden" 
>>> value="jyzTEwkkJt3MjDn7O5IS+EY1gmuayRiBpDtZXumS4TA=">
>>
>> **
>>
>> Arraste seus arquivos de imagem nesta área ou 
>>> clique para escolher os arquivos
>>
>>   
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> 
>>
>> Cancelar
>>
>> 
>>
>> >> id="btn_file_upload_start">
>>
>> 
>>
>> >> pausing="Pausando...">Iniciar
>>
>> 
>>
>> >> id="btn_file_upload_done">
>>
>> 
>>
>> Pronto
>>
>> 
>>
>> 
>>
>> 
>>
>>
>
> Thanks in advance!
> Karol  
>

-- 
-- 
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: Drag and drop is not working after updating firefox to 20.0 -- Could not load native events component.

2013-04-10 Thread Dan
Looks like there's a new version.  Also, the safari extension, which is 
awesome!

2.32.0 (2013-04-09)
===

Safari:
  * The Safari extension is now packaged with the gem and automatically 
installed (#5322)
  * Improved detection of the binary location on 64-bit windows (5273)
Opera:
  * Allow passing :desired_capabailities (#5279)
Firefox:
  * This release supports versions 10esr, 17esr, 19, 20.
  * Improved SVG support
Other:
  * Allow #click_and_hold without target (#5410).
  * Remove assumptions about returned capabilities (for ios-driver)


On Friday, April 5, 2013 9:16:59 AM UTC-4, Dan wrote:
>
> I don't see anything on the issue tracker that indicates a release date, 
> but they are usually within a week or so as far as I remember.  Best thing 
> to do for now is to downgrade to 19.
>
> You can watch this page for updates as well.
> http://docs.seleniumhq.org/download/
>
> Dan
>
> On Friday, April 5, 2013 4:53:23 AM UTC-4, watir webdriver wrote:
>>
>> Thanks both for your reply
>>
>> @Dan : Any idea when is the next release ? Where do I get the future 
>> release dates ?
>>
>> Any help is much more appreciated.
>>
>>
>> On Thursday, April 4, 2013 5:18:04 PM UTC+1, watir webdriver wrote:
>>>
>>> Hi there,
>>>
>>> Today I've updated my firefox 19.2 to 20.0 and drag and drop of the 
>>> element is not working.Those tests were working on the earlier version.
>>> Is the webdriver version not compatible with the FF 20 ? Can anybody 
>>> suggest me what is the solution for this ? 
>>>
>>> Using selenium-webdriver (2.31.0)
>>> Using watir-webdriver (0.6.2)
>>> Using page-object (0.8.7)
>>>
>>> Getting below exception :
>>>
>>>   Cannot perform native interaction: Could not load native events 
>>> component.
>>>  (Selenium::WebDriver::Error::InvalidElementStateError)
>>>   [remote server] 
>>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>>> file20130404-5472-1ozzmjv/extensions/
>>> fxdri...@googlecode.com/components/driver_c
>>> omponent.js:8577:in `generateErrorForNativeEvents'
>>>   [remote server] 
>>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>>> file20130404-5472-1ozzmjv/extensions/
>>> fxdri...@googlecode.com/components/driver_c
>>> omponent.js:8610:in `FirefoxDriver.prototype.mouseMove'
>>>   [remote server] 
>>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>>> file20130404-5472-1ozzmjv/extensions/
>>> fxdri...@googlecode.com/components/command_
>>> processor.js:10275:in `DelayedCommand.prototype.executeInternal_/h'
>>>   [remote server] 
>>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>>> file20130404-5472-1ozzmjv/extensions/
>>> fxdri...@googlecode.com/components/command_
>>> processor.js:10280:in `DelayedCommand.prototype.executeInternal_'
>>>   [remote server] 
>>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>>> file20130404-5472-1ozzmjv/extensions/
>>> fxdri...@googlecode.com/components/command_
>>> processor.js:10220:in `DelayedCommand.prototype.execute/<'
>>>   ./features/step_definitions/smartmanager_email_steps.rb:63:in `/^I 
>>> drag "(
>>> .+)" rule to the position (\d+) slot$/'
>>>   features\smart_manager_email_setup_05.feature:22:in `When I drag 
>>> "Product
>>> Catalog" rule to the position 1 slot'
>>>
>>> Any help is much more appreciated.
>>>
>>

-- 
-- 
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: Getting "rescue in rbuf_fill': Timeout::Error" with watir-webdriver

2013-04-08 Thread Dan
I think you're approaching this the wrong way.  If you're navigating to a 
new page after the click, then there's not really anything you have to do 
to force it to wait, unless you're dealing with some javascript after the 
page has loaded.  What it looks like you're running into is a really long 
page load, and that the selenium client is timing out.  Interestingly 
enough Chuck posted this question and the solution is on stackoverflow :). 
 You're probably going to want to get to the bottom of why it's taking a 
web page more than 5 minutes to load however.

http://stackoverflow.com/questions/9014121/how-do-i-change-the-page-load-timeouts-in-watir-webdriver-timeout-in-click-met

On Monday, April 8, 2013 2:45:16 PM UTC-4, fabian@gmail.com wrote:
>
> I forgot ... the 'Load Form' button doesn;t get hidden by a javascript. It 
> just dissapears because the browser moves to a new URL, the one that 
> contains the actual form.
> Thanks,
> Fabian
>
> El lunes, 8 de abril de 2013 15:23:50 UTC-3, fabian@gmail.comescribió:
>>
>> Here you go:
>>
>> C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill': 
>> Timeout::Error (Timeout::Error)
>> from C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
>> from C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
>> from C:/Ruby193/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:2562:in 
>> `read_status_line'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1319:in `block in 
>> transport_request'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1316:in 
>> `transport_request'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1293:in `request'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1286:in `block in 
>> request'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:745:in `start'
>> from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1284:in `request'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/remote/http/default.rb:83:in
>>  
>> `response_for'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/remote/http/default.rb:39:in
>>  
>> `request'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/remote/http/common.rb:40:in
>>  
>> `call'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/remote/bridge.rb:615:in
>>  
>> `raw_execute'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/remote/bridge.rb:593:in
>>  
>> `execute'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/remote/bridge.rb:358:in
>>  
>> `clickElement'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.30.0/lib/selenium/webdriver/common/element.rb:54:in
>>  
>> `click'
>> from 
>> C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/elements/element.rb:131:in
>>  
>> `click'
>> from C:/Users/sg0894301/SaaS 
>> Projects/iescripts/security/unixfunc.rb:12:in `loadForm'
>> from C:/Users/sg0894301/SaaS Projects/iescripts/unixfunc.rb:6:in 
>> `
>>
>>
>> El lunes, 8 de abril de 2013 14:49:07 UTC-3, Chuck van der Linden 
>> escribió:
>>>
>>> On Monday, April 8, 2013 10:25:22 AM UTC-7, fabian@gmail.com wrote:
>>>
>>>> what's a stacktrace? :)
>>>>
>>>
>>> http://en.wikipedia.org/wiki/Stack_trace
>>>
>>> in other words the error you get, and all the lines below it that show 
>>> what lines of code were being executed at the time the error occured
>>>  
>>>
>>>>
>>>> El lunes, 8 de abril de 2013 13:50:41 UTC-3, Dan escribió:
>>>>>
>>>>> Hi Fabian, 
>>>>>
>>>>> It's a little unclear what the expectation/flow is after you click the 
>>>>> 'Load Form' button.  That button is hidden or removed by some javascript? 
>>>>>  It's possible that you&#

[wtr-general] Re: Getting "rescue in rbuf_fill': Timeout::Error" with watir-webdriver

2013-04-08 Thread Dan
Hi Fabian, 

It's a little unclear what the expectation/flow is after you click the 
'Load Form' button.  That button is hidden or removed by some javascript? 
 It's possible that you're running into the http timeout as opposed to a 
timeout for one of the wait methods.  I think what would help is to see the 
stacktrace that you get when you hit the timeout.

On Monday, April 8, 2013 11:55:15 AM UTC-4, fabian@gmail.com wrote:
>
> Hi Chuck,
>
> It worked for a bit, but because the website was responding faster. Now it 
> started to happen again and it doesn't seem to care how much time I put 
>  for the timeout:
>
> browser.button(:value => 'Load Form').wait_while_present(timeout=5600)
>
> Same error ...
> fabian
>
> El jueves, 4 de abril de 2013 21:49:30 UTC-3, Chuck van der Linden 
> escribió:
>>
>> On Tuesday, April 2, 2013 7:35:42 AM UTC-7, fabian@gmail.com wrote:
>>
>>> Hi Chuck,
>>>
>>> Thanks for the detailed explanation and suggestion. I'll give it  a try.
>>>
>>> Thanks,
>>> Fabian
>>>
>>
>> Did that help or are you still stuck?
>>
>>  
>>
>>>
>>> El miércoles, 27 de marzo de 2013 11:13:57 UTC-3, 
>>> fabian@gmail.comescribió:

 Hi Folks,

 The title pretty much says it all. After I click a button to load a 
 form I get the above error. My code:

 browser = Watir::Browser.new :ie
 browser.driver.manage.timeouts.implicit_wait = 360
 browser.goto 'http://myform.html'
 browser.text_field(:name => 'EmpNumber').set empnum
 browser.text_field(:name => 'LastName').set lastName
 browser.button(:value => 'Load Form').click
 browser.button(:value => 'Load Form').wait_while_present

 This still timesout before 6 minutes ... So I don;t know what I'm doing 
 wrong.

 Before you ask, yes, I've googled and searched this list and stack 
 overflow was well :)

 Thanks,
 Fabian

>>>

-- 
-- 
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: Drag and drop is not working after updating firefox to 20.0 -- Could not load native events component.

2013-04-05 Thread Dan
I don't see anything on the issue tracker that indicates a release date, 
but they are usually within a week or so as far as I remember.  Best thing 
to do for now is to downgrade to 19.

You can watch this page for updates as well.
http://docs.seleniumhq.org/download/

Dan

On Friday, April 5, 2013 4:53:23 AM UTC-4, watir webdriver wrote:
>
> Thanks both for your reply....
>
> @Dan : Any idea when is the next release ? Where do I get the future 
> release dates ?
>
> Any help is much more appreciated.
>
>
> On Thursday, April 4, 2013 5:18:04 PM UTC+1, watir webdriver wrote:
>>
>> Hi there,
>>
>> Today I've updated my firefox 19.2 to 20.0 and drag and drop of the 
>> element is not working.Those tests were working on the earlier version.
>> Is the webdriver version not compatible with the FF 20 ? Can anybody 
>> suggest me what is the solution for this ? 
>>
>> Using selenium-webdriver (2.31.0)
>> Using watir-webdriver (0.6.2)
>> Using page-object (0.8.7)
>>
>> Getting below exception :
>>
>>   Cannot perform native interaction: Could not load native events 
>> component.
>>  (Selenium::WebDriver::Error::InvalidElementStateError)
>>   [remote server] 
>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>> file20130404-5472-1ozzmjv/extensions/
>> fxdri...@googlecode.com/components/driver_c
>> omponent.js:8577:in `generateErrorForNativeEvents'
>>   [remote server] 
>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>> file20130404-5472-1ozzmjv/extensions/
>> fxdri...@googlecode.com/components/driver_c
>> omponent.js:8610:in `FirefoxDriver.prototype.mouseMove'
>>   [remote server] 
>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>> file20130404-5472-1ozzmjv/extensions/
>> fxdri...@googlecode.com/components/command_
>> processor.js:10275:in `DelayedCommand.prototype.executeInternal_/h'
>>   [remote server] 
>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>> file20130404-5472-1ozzmjv/extensions/
>> fxdri...@googlecode.com/components/command_
>> processor.js:10280:in `DelayedCommand.prototype.executeInternal_'
>>   [remote server] 
>> file:///C:/Users/fsultana/AppData/Local/Temp/webdriver-pro
>> file20130404-5472-1ozzmjv/extensions/
>> fxdri...@googlecode.com/components/command_
>> processor.js:10220:in `DelayedCommand.prototype.execute/<'
>>   ./features/step_definitions/smartmanager_email_steps.rb:63:in `/^I 
>> drag "(
>> .+)" rule to the position (\d+) slot$/'
>>   features\smart_manager_email_setup_05.feature:22:in `When I drag 
>> "Product
>> Catalog" rule to the position 1 slot'
>>
>> Any help is much more appreciated.
>>
>

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




  1   2   3   >