Re: [wtr-general] Watir - How to call browser.goto from another file

2022-03-24 Thread 'John Fitisoff' via Watir General
Replace all hard-coded instance of the the URLs with a variable or a constant. Store that different URLs in a hash in a file. Something like this: URLS = {  dev: 'https://url1.com',  prod: 'https://url2.com'} Then, in whatever you're using to run the script, add an option to specify the environm

Re: [wtr-general] not able to click on button that is visible.

2021-02-05 Thread 'John Fitisoff' via Watir General
Just a guess but the page HTML may have multiple buttons that match value: "OK" (and you're getting the very first one, which isn't the one that you actually want.) It's been a while but think you could add visible: true if that's the case, then it should find the one that you're looking for.

Re: [wtr-general] Re: List of items that refresh every second

2019-02-12 Thread 'John Fitisoff' via Watir General
I may be misunderstanding, but you probably want something that'll loop until a condition is met, then poll all of the (divs, spans whatever) checking for one with text matching job name + status. Watir has some wait functionality and there are gems that do this also. rspec-wait's pretty good b

Re: [wtr-general] WATIR can be used for AngularJS?

2019-02-02 Thread 'John Fitisoff' via Watir General
I wrote something with Angular in mind. Some sample tests for Google's angular components are here: https://github.com/jfitisoff/insite/blob/master/spec/material_angular_io_spec.rb And Google's showcase for those components are here (the tests utilize this site): https://material.angular.io I d

Re: [wtr-general] How do i copy employee dataset into a textbox accurately?

2018-10-14 Thread 'John Fitisoff' via Watir General
If Titus's suggestion doesn't sort it it's worth checking to see if line breaks are getting handled properly and that the encoding is handled properly. Found a random link: https://forums.asp.net/t/1456447.aspx?how+to+convert+line+breaks+r+n+to+excel+alt+enter+after+exporting+from+mssql+to+excel

Fw: [wtr-general] Re: Uploading file to a readonly field

2017-10-11 Thread 'John Fitisoff' via Watir General
maybe jdenen/watir-ng | | | | || | | | || jdenen/watir-ng watir-ng - Identify watir-webdriver elements with ng directives | | | | × - Forwarded Message - From: Raymond Raymundo To: Watir General Sent: Tuesday, 10 October 2017, 21:

Re: [wtr-general] How to select a csv file from hard disc using watir ruby on MAC OS

2017-09-01 Thread 'John Fitisoff' via Watir General
#!/usr/bin/env ruby# Encoding: utf-8 # Paste everything into script, including the shebang and encoding# lines above.# Don't forget to make script executable.# Usage: ./some_script.rb /path/to/csv require 'csv'obj = CSV.read(ARGV[0]) # ARGV is an array that will have the cmd line args. F

[wtr-general] Looking for QA

2017-07-16 Thread John Fitisoff
Hi all, In case anyone's interested, Recurly is looking for a QA engineer with Ruby and Watir experience (San Francisco or Boulder.) Job details can be found here: https://recurly.com/jobs/job-details/#op-fk0me4p Probably best not to respond here if you want to follow up. You can apply via ou

Re: [wtr-general] Exist method is needed while I use visible method, Can it be avoided?

2017-03-23 Thread 'John Fitisoff' via Watir General
i'm not sure if it slows things down a lot. think you need to do some level of checking anyway. one way of implementing this sort of thing would be to try to write or whatever and only do polling when the op is going to fail. i suspect it's probably done like that. you'd be better off using just

Re: [wtr-general] Exist method is needed while I use visible method, Can it be avoided?

2017-03-23 Thread 'John Fitisoff' via Watir General
try .present? instead From: Raja gopalan To: watir-general@googlegroups.com Sent: Thursday, March 23, 2017 9:52 AM Subject: [wtr-general] Exist method is needed while I use visible method, Can it be avoided? I find I couldn't use visible method without exists method because visible

Re: [wtr-general] Is Watir the right tool?

2017-02-15 Thread 'John Fitisoff' via Watir General
it's a browser automation tool that requires ruby, so basically if it's html and you can use ruby then the answer is yes From: "achirotou...@gmail.com" To: Watir General Sent: Wednesday, February 15, 2017 11:00 AM Subject: [wtr-general] Is Watir the right tool? Hello, Our Company

Re: [wtr-general] angular login

2017-02-03 Thread 'John Fitisoff' via Watir General
i think watir-ng just gives you the ability to use non-standard attributes not sure if this'll work with the new watir codebase without adjustments but we're using something like this to access a custom "role" attribute  Watir::HTMLElement.attributes << :role module Watir  class Element    attribu

Re: [wtr-general] Re: Clicking out of view elements chrome/chromedriver

2017-02-01 Thread &#x27;John Fitisoff' via Watir General
Yeah, I've seen it. It's been a while since I've used ChromeDriver on a regular basis but my recollection was that it seemed a little fussier about that sort of thing.  From: Brian Rieck To: Watir General Sent: Wednesday, February 1, 2017 4:58 PM Subject: [wtr-general] Re: Clicking o

Re: [wtr-general] iterating LI through elements

2017-01-03 Thread &#x27;John Fitisoff' via Watir General
Watir models everything in the DOM. So think something like this should work b.uls.each do |ul|  ul.lis.each { |li| p li.text }end  From: "artie.z...@gmail.com" To: Watir General Sent: Tuesday, January 3, 2017 2:59 PM Subject: [wtr-general] iterating LI through elements Hello Folks

Re: [wtr-general] How to click specific link in table?

2016-12-28 Thread &#x27;John Fitisoff' via Watir General
May be semantics, but you mentioned clicking on a link to call a button, which could be a problem if the element truly is a link. If it's a link then you should try to access it that way: book_rows.a(value: /view/i).click. There might be more than one table with that id: @browser.tables(id: /acad

Re: [wtr-general] Re: latest watir giving error with firefox

2016-12-15 Thread &#x27;John Fitisoff' via Watir General
I can't remember for sure if this is the same thing but you may want to try this, grabbed it from our framework: # Absolutely, positively have to have this to create browser instances via webdriver.# Something in the Ruby stack is modifying how Kernel#exec works. This setting# allows Kernel#exe

Re: [wtr-general] Re: "watir webdriver cannot select checkbox input element"

2016-08-09 Thread &#x27;John Fitisoff' via Watir General
It's most likely exactly what Titus suggested. One other thing you can do, in addition to providing the HTML he asked for, is to see how many elements there are that match. Stuff like this: b.checkboxes(:id => 'sv').length # More than 1? If so, the one you want may be one of the others b.checkbo

Re: [wtr-general] How to identify the index of an element by text

2016-07-18 Thread &#x27;John Fitisoff' via Watir General
probably nicer ways are doing it but think this'll work index = nilb.divs(:class, 'grid').each_with_index do |div, idx|  index = idx if div.text =~ /text6/  break if indexend From: Soori To: Watir General Sent: Monday, July 18, 2016 2:05 PM Subject: [wtr-general] How to identify the i

Re: [wtr-general] cannot load such file — Config/Data/data_form.yml (LoadError)

2016-07-11 Thread &#x27;John Fitisoff' via Watir General
Hard to say. If you're kicking off things with a Ruby script and that script's above the stuff that you want to load, you may want to start off with putting it there From: Ajay Reddy To: Watir General Cc: jfitis...@yahoo.com Sent: Monday, July 11, 2016 8:44 AM Subject: Re: [wtr-gener

Re: [wtr-general] cannot load such file — Config/Data/data_form.yml (LoadError)

2016-07-11 Thread &#x27;John Fitisoff' via Watir General
Ruby has a $LOAD_PATH constant that tells it where to look for things. I usually do something like this to add something for the 'root' directory where I have some files that I need to access: root = File.expand_path(File.dirname(__FILE__))$LOAD_PATH.unshift(root) And then you should be able to

Re: [wtr-general] Passing value to is not working

2016-06-08 Thread &#x27;John Fitisoff' via Watir General
may need to click on the input inside td From: sivam To: Watir General Sent: Wednesday, June 8, 2016 8:46 AM Subject: [wtr-general] Passing value to is not working Hi all, I am using watir 1.6.5 to interact with pages. I got into an issue and I need your help on to fix this. I

Re: [wtr-general] Re: Upload multiple files to input element?

2016-05-14 Thread &#x27;John Fitisoff' via Watir General
File fields have security restrictions, not sure if that'll work. Created an HTML page with a file field to poke around, didn't have much luck. Did see something about some workaround using send_keys and ChromeDriver but that didn't seem to work when I tried it (maybe I missed something)

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread &#x27;John Fitisoff' via Watir General
Maybe something like this. First thing to try, anyway. Method may take multiple file args, can't remember offhand  # http://www.rubydoc.info/gems/watir-webdriver/Watir/FileField × ['path/one.txt', 'path/two.txt'].each do |path|  b.file_field(:id, 'some_id').when_present.set(path)end Fr

Re: [wtr-general] Upload multiple files to input element?

2016-05-13 Thread &#x27;John Fitisoff' via Watir General
Hi Jesse, What have you tried, what does the HTML look like and what kind of errors are you getting? It could be many things and that info might narrow down the possibilities a bit. John From: "jherzen...@shastaqa.com" To: Watir General Sent: Thursday, May 12, 2016 7:36 PM Subject: [

Re: [wtr-general] Watir-webdriver throws 'not clickable' error even when element is visible, present

2016-04-19 Thread &#x27;John Fitisoff' via Watir General
Yeah, that's annoying. Think I filed a Webdriver bug a one point (I wasn't the only one) but not sure if they ever did anything with it.  If you don't have to use Chrome, It might be worth trying Firefox. Driver install is not required for that and it's a little less fussy, although think I saw

[wtr-general] Re: Standalone app testing?

2016-03-05 Thread John Fitisoff
Unfortunately, Watir's a browser testing tool. It doesn't work with desktop apps, just browsers. On Saturday, March 5, 2016 at 5:11:29 AM UTC-8, 4xga...@gmail.com wrote: > > I am investigating Watir and would like to know if I can use it to test > standalone apps. (Example: I want to learn by '

Re: [wtr-general] Time out issue in Watir

2016-01-19 Thread &#x27;John Fitisoff' via Watir General
Haven't used watir classic in a long time but think .hover should work. You can always bump up the when_present time, it takes an integer argument. the default if you don't specify a time is 30 seconds, which is a really long time, so itmight not be as simple as that. One thing that really helps

Re: [wtr-general] How can I get all the content in a div element then strip out a table element leaving only what elements I want?

2015-12-07 Thread &#x27;John Fitisoff' via Watir General
Not sure if this fits your problem, but one approach would be to look at the output of b.div(:id, 'contents').text. It may be possible to use regexp matching to get the text leading up to the div and then the text after, without having to worry specifically about what element outside the table t

[wtr-general] Re: how to click on settings [angular code]

2015-11-21 Thread John Fitisoff
This might help for the angular stuff https://github.com/jdenen/watir-ng On Tuesday, November 10, 2015 at 7:50:50 AM UTC-8, christina wrote: > > Hi! > > Can one help me on how to click on the settings icon - is an anguar code: > > [image: Inline image 1] > > Kind regards, > Cristina > -- -- Be

[wtr-general] Re: Run webdriver on IOS devices

2015-11-21 Thread John Fitisoff
Hi Savannah, This should get you most of the way there. Think there's more info on watirwebdriver.com if you want to use an emulator or really need to run things on an actual device. The only drawback to the approach below is that I don't think Safari is supported right now (but see website

[wtr-general] Re: Skip external links

2015-06-30 Thread John Fitisoff
To get the href you can use link.attribute_value(:href) To match against https://mysite.com you could use a regular expression: b.links[0].attribute_value(:href) =~ %r{https://mysite.com.*} which will return a number specifying the match position within the string (if there's a match) or nil (i

Re: [wtr-general] Code suggestions on how to get a guid from an href to be used to append to other hrefs.

2015-06-17 Thread John Fitisoff
Lorraine, Actually, I wrote a page object library that can do this sort of thing. Assuming that you have defined a page object for the Client page, and you are on the page for a particular client, you could just do something like this to get the client guid: site.page.arguments[:client] Libra

Re: [wtr-general] Code suggestions on how to get a guid from an href to be used to append to other hrefs.

2015-06-17 Thread &#x27;John Fitisoff' via Watir General
Use a regular expression. Assuming that the URL is  "http://www.mysite.com/client/abcde012345": browser.url.match(%r{/client/(.*)})[1] => "abcde012345" From: Lorraine Botros To: watir-general@googlegroups.com Sent: Tuesday, June 16, 2015 4:24 PM Subject: [wtr-general] Code suggestions o

Re: [wtr-general] unable to click link

2015-05-26 Thread &#x27;John Fitisoff' via Watir General
Oh, wait! Cancel is a link From: 'John Fitisoff' via Watir General To: "watir-general@googlegroups.com" Sent: Tuesday, May 26, 2015 7:31 AM Subject: Re: [wtr-general] unable to click link I think cancel needs to be in quotes unless that's a variable you

Re: [wtr-general] unable to click link

2015-05-26 Thread &#x27;John Fitisoff' via Watir General
I think cancel needs to be in quotes unless that's a variable you're using but didn't mention. Maybe try going through the parent element to get to the link if that's not it $browser.div(:class, 'container').button(:class, 'cancel').click From: rocky To: watir-general@googlegroups.com

Re: [wtr-general] Re: Did a Firefox update just break Watir Webdriver?

2015-03-04 Thread &#x27;John Fitisoff' via Watir General
v28 has been working well for me. Minor snag closing browser windows manually on OS X but closing programmatically works fine. From: Željko Filipin To: watir Sent: Tuesday, March 3, 2015 1:01 AM Subject: Re: [wtr-general] Re: Did a Firefox update just break Watir Webdriver? On Tue,

[wtr-general] Watir Job in SF

2015-01-28 Thread &#x27;John Fitisoff' via Watir General
Hi all, My company (Recurly) is looking for a QA engineer with Ruby experience to join and help with manual testing and support an existing automation effort. We're using Watir and RSpec. The position will involve a lot of scripting and we'll be looking for someone with good Ruby programming ski

Re: [wtr-general] Re: verify if checkbox is checked

2015-01-28 Thread &#x27;John Fitisoff' via Watir General
Maybe something like this would work in determining the checkbox state b.span(:text, 'Dependent to an existing member?').parent.html =~ /custom-checkbox checked/  From: "jackstaposit...@gmail.com" To: watir-general@googlegroups.com Sent: Tuesday, January 27, 2015 7:02 PM Subject: [wtr-

Re: [wtr-general] Undefined method 'goto' for RSpec::Core::ExampleGroup using Watir-Rspec

2015-01-12 Thread &#x27;John Fitisoff' via Watir General
It's just saying that RSpec doesn't have a goto method. Try calling that on @browser From: trekr5 To: watir-general@googlegroups.com Sent: Monday, January 12, 2015 4:52 AM Subject: [wtr-general] Undefined method 'goto' for RSpec::Core::ExampleGroup using Watir-Rspec Hi, I'm a new u

Re: [wtr-general] Re: Watir - Identifying a Span ID and its Text Element - False

2015-01-02 Thread &#x27;John Fitisoff' via Watir General
Another way of checking for text (when you don't care about which particular element is displaying it) is: @browser.text =~ /Welcome/ From: Super Kevy To: watir-general@googlegroups.com Sent: Friday, January 2, 2015 6:38 AM Subject: [wtr-general] Re: Watir - Identifying a Span ID and

Re: [wtr-general] Problem with Logger and condition if/else Watir | Testwise

2014-12-18 Thread &#x27;John Fitisoff' via Watir General
Think you need this if @browser.text.include?("Signed in!") == true   # Something...elseend Think there's more than one spreadsheet library but you should be able to query the spreadsheet object for the number of of rows that it has (take a look at the rdocs for it.) Then you could do something

Re: [wtr-general] Re: Get the link to the Next Page

2014-10-23 Thread &#x27;John Fitisoff' via Watir General
Something like this should work, although it'd be better to restrict the # of links to be checked rather than iterating through all of them link = b.links.find {|link| link.href =~ /Page\$\d+/}link.href.match(  /Page\$\(d+)/)[1] # assumes link is actually found From: Joe Fleck To: Watir G

Re: [wtr-general] How to handle unknown browser popup with text "Stop running this script?"

2014-05-24 Thread &#x27;John Fitisoff' via Watir General
+1 for treating it as an application bug rather then a problem with Watir. It's likely the reason that browser.alert.exist? isn't working is that the browser isn't responsive. The developers should look at fixing whatever's causing that popup to show up. You might have some luck using a differen

Re: [wtr-general] error with new firefox

2014-05-07 Thread &#x27;John Fitisoff' via Watir General
Someone may have a better idea but I think I've seen something like this in the past and rebooting and/or reinstalling selenium sorted it out. I haven't used FF v29 yet From: gary To: watir-general@googlegroups.com Sent: Wednesday, May 7, 2014 2:43 AM Subject

Re: [wtr-general] Watirwebdriver - Click on drop down value is not visible until I scroll down the list

2014-01-23 Thread John Fitisoff
The hover event? Also you could try using send_keys, which I think lets you simulate a down arrow keypress (:arrow_down). But maybe someone else has a better idea On Thursday, January 23, 2014 7:05 AM, watir webdriver wrote: Hi, I'm using watir-webdriver to automate our functional testi

Re: [wtr-general] Re: script in chrome

2014-01-21 Thread John Fitisoff
The ChromeDriver binary may not be installed. http://code.google.com/p/selenium/wiki/ChromeDriver And Dan pointed out that watir-webdriver needed to be installed. After that, Watir::Browser.new should work fine. On Tuesday, January 21, 2014 6:07 AM, Dan wrote: You have to be more specif

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

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

Re: [wtr-general] Watir &XPATH and sophisticated tags

2013-11-22 Thread John Fitisoff
ль 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' ). >

Re: [wtr-general] Watir &XPATH and sophisticated tags

2013-11-15 Thread John Fitisoff
ialog-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 so

Re: [wtr-general] Watir &XPATH and sophisticated tags

2013-11-14 Thread John Fitisoff
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, Novemb

Re: [wtr-general] Watir &XPATH and sophisticated tags

2013-11-14 Thread John Fitisoff
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)

Re: [wtr-general] How to wait with a collection of elements using watir?

2013-11-13 Thread John Fitisoff
Something like this might work Watir::Wait.until { @browser.links(:class, "more-matches").length >= 5 } @browser.links(:class, "more-matches").each do |d|     d.click     p d.text end If you know what the expected number is you could probably just do d.when_present.click within the each block a

Re: [wtr-general] Watir &XPATH and sophisticated tags

2013-11-13 Thread John Fitisoff
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 f

Re: [wtr-general] Watir not working properly with IE11-Windows 8.1

2013-11-12 Thread John Fitisoff
Could it be a problem with timing? Try: Watir::wait.until(30) { self.text.match(/There is a problem with/) } if(self.text.match(/There is a problem with/)) self.link(:name, 'override').click. end Another thing you can do is install pry ('gem install pry') and then put a breakpoint in front of

Re: [wtr-general] Accessing checkbox using watir webdriver

2013-11-07 Thread John Fitisoff
t i get as output       2       found it       element not visible but it never selects checkbox  On Thu, Nov 7, 2013 at 10:36 AM, John Fitisoff wrote: Maybe try this *right* before the line that fails: > >sleep 30 >puts $browser.checkboxes.length >$browser.checkboxes.each do |cb|

Re: [wtr-general] Accessing checkbox using watir webdriver

2013-11-07 Thread John Fitisoff
e of Jquery  >> >> >> >>On Thu, Nov 7, 2013 at 9:46 AM, anukul wrote: >> >>Looking at your html, can you try the simple option (assuming you are trying >>to set the checkbox): >>> >>>$browser.checkbox(:name, "termsAgree").set >

Re: [wtr-general] Accessing checkbox using watir webdriver

2013-11-06 Thread John Fitisoff
Just for fun: $browser.span(:text=>/I agree to the/).parent.checkboxes[0].set On Wednesday, November 6, 2013 2:15 PM, Ankita wrote: I have experienced too that some times we need to trigger the checkbox event with jquery instead of simple watir methods.. Try this, might work.. $browser

Re: [wtr-general] Re: does watir classic, not webdriver support IE 10 ?

2013-11-01 Thread John Fitisoff
You're on the right track but that error is saying that something is still expecting US_ASCII and failing when it runs into a multibyte character. What is trying to read the string at the point of failure? Do you have a stack trace? On Wednesday, October 30, 2013 1:54 AM, satyendra kumar

Re: [wtr-general] Connecting to Mongo DB using Watir-Webdriver

2013-10-23 Thread John Fitisoff
https://github.com/mongodb/mongo-ruby-driver/wiki/Tutorial On Wednesday, October 23, 2013 2:40 PM, Mihir Dhandhusaria wrote: Is there any way to connect to Mongo DB using Watir-webdriver ? I just want to connect to DB and read from multiple collections  Any help is appreciated Thanks   --

Re: [wtr-general] Watir exits with 0 on failure

2013-10-08 Thread John Fitisoff
I guess Test::Unit is doing that. I think you could parse for that last summary line, Jenkins can do that. Or wrap the call to the Ruby script with another script (even another Ruby script) that parses the test output and returns exit code 1. I'm wondering if something else is eating up exit

Re: [wtr-general] Cucumber and Quality Center

2013-09-19 Thread John Fitisoff
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 obtain

Re: [wtr-general] how do i grab a existing open browser by handle.

2013-09-17 Thread John Fitisoff
Think they still haven't implemented it on webdriver yet: http://code.google.com/p/selenium/issues/detail?id=18 If you know your script is failing at a certain area and want to debug it: -gem install pry -Put a 'binding.pry' statement right before the part that's failing (don't include the sing

Re: [wtr-general] Ruby count rescue attempts

2013-09-11 Thread John Fitisoff
Just taking a quick look (on a conf call) but looks like you want to move @count out of urls.map From: Oscar Rieken To: watir-general@googlegroups.com Sent: Wednesday, September 11, 2013 2:35 PM Subject: Re: [wtr-general] Ruby count rescue attempts What

Re: [wtr-general] Re: Nokogiri + Watir

2013-09-03 Thread John Fitisoff
I really miss lazy init. From: Justin Ko To: watir-general@googlegroups.com Sent: Tuesday, September 3, 2013 9:28 AM Subject: [wtr-general] Re: Nokogiri + Watir On Thursday, August 29, 2013 11:18:59 AM UTC-4, Bashir Osman wrote: Watir processes the DOM to

Re: [wtr-general] Unable to click on a button using css and its name

2013-08-30 Thread John Fitisoff
@browser.button(:text, /Delete account/i).when_present(10).click From: Vamsi Mandapati To: watir-general@googlegroups.com Sent: Friday, August 30, 2013 4:27 AM Subject: [wtr-general] Unable to click on a button using css and its name Here is my snippet 

Re: [wtr-general] Re: Testing Methodology with Watir

2013-08-26 Thread John Fitisoff
esting team to use Watir. Maybe is better suited to development, or big testing teams that have an specialized automation team. Are there testing only teams using Watir? How do they interact with development? On Mon, Aug 26, 2013 at 4:54 PM, John Fitisoff wrote: Jorge, > >If I we

Re: [wtr-general] Re: Testing Methodology with Watir

2013-08-26 Thread John Fitisoff
Jorge, If I were in that situation I'd try to get the developers to write page objects. I'd write some info about what page objects are out there and about how the page objects should be defined, maybe with an example, so that the developers could talk about it come up with a consensus and impl

Re: [wtr-general] [Watir-webdriver] : How to compare to results

2013-08-15 Thread John Fitisoff
Just store everything in strings and then compare by == or a regexp, whichever makes more sense, then print the console output afterward? From: watir webdriver To: watir-general@googlegroups.com Sent: Thursday, August 15, 2013 8:37 AM Subject: [wtr-general]

Re: [wtr-general] Click a particular X and Y co-ordinates in the browser pane by using watir webdriver

2013-08-06 Thread John Fitisoff
Think what you need is here: http://selenium.googlecode.com/svn/trunk/docs/api/rb/Selenium/WebDriver/ActionBuilder.html Watir's browser object has a method to access the driver and page elements have the wd method From: Srinivas Desai To: watir-general@goo

Re: [wtr-general] Re: Help with Javascript encoded ahref

2013-07-24 Thread John Fitisoff
Try browser.link(:text, "Start Browsing").when_present.click browser.a(:title => "$2.52").when_present.click From: Bashir Osman To: watir-general@googlegroups.com Sent: Wednesday, July 24, 2013 9:08 AM Subject: [wtr-general] Re: Help with Javascript encoded

Re: [wtr-general] Intermittent failure of when_present

2013-07-19 Thread John Fitisoff
I think folks are using this: http://watirwebdriver.com/headless/ From: Mont Rothstein To: watir-general@googlegroups.com Cc: John Fitisoff Sent: Friday, July 19, 2013 12:09 PM Subject: Re: [wtr-general] Intermittent failure of when_present John

Re: [wtr-general] what is the main difference at the time of using Ruby and java scripting............

2013-07-19 Thread John Fitisoff
Hi Gopal, You're covering a lot of ground there. The main difference (to my mind) is that you need to write much less code to get things done and you have a lot more freedom to do the things that you need to do. You can do all of the same things in both languages. I think you may want to go to

Re: [wtr-general] Intermittent failure of when_present

2013-07-18 Thread John Fitisoff
Nutty, I know, but try forcing a scroll of the element into the visible portion of the browser before doing the hover. I was doing something similar and noticed I was getting failures when the thing I was trying to interact with was outside of the viewable area or the browser was minimized. This

Re: [wtr-general] [Watir-webdriver] - Drag and drop using watir webdriver

2013-07-14 Thread John Fitisoff
the issue. On Wednesday, July 10, 2013, John Fitisoff wrote: A couple of seconds seems like a long time. Maybe try the action builder 'release' action instead of firing the event? Maybe some javascript event isn't occurring at the right time? One thing that really helps me is to u

Re: [wtr-general] [Watir-WebDriver] Wait until the text-field values are fetched through API

2013-07-12 Thread John Fitisoff
I'm not 100% sure what it's doing but you probably need to poll for some condition after 'lookup' so that it knows lookup is done before continuing. Maybe something like this Watir::Wait.until(60) do   br.text =~ /some regexp check/ end From: maulik goswami

Re: [wtr-general] Re: [Watir-webdriver] - Drag and drop using watir webdriver

2013-07-10 Thread John Fitisoff
A couple of seconds seems like a long time. Maybe try the action builder 'release' action instead of firing the event? Maybe some javascript event isn't occurring at the right time? One thing that really helps me is to use pry to stop the test right at the point that the problem is occurring (ma

Re: [wtr-general] Re: [Watir-webdriver] - Drag and drop using watir webdriver

2013-07-08 Thread John Fitisoff
That seems right. The only other thing I can think of is to break the interaction down further and add pauses between each action (do click_and_hold, move_to and release methods in ActionBuilder). And it probably makes sense to do it manually through a console, using irb or pry. Maybe someone el

Re: [wtr-general] Re: [Watir-webdriver] - Drag and drop using watir webdriver

2013-07-08 Thread John Fitisoff
That's because it's looking for a Selenium::Webdriver::Object and the calls to  @browser.span and @browser.div are returning Watir::Span and Watir::Div objects. Think you just need to use @b.find_element to populate vars a and b and then it should work From

Re: [wtr-general] Re: [Watir-webdriver] - Drag and drop using watir webdriver

2013-07-08 Thread John Fitisoff
Think it just needs to be @browser.driver.action... instead of @browser.action... From: watir webdriver To: watir-general@googlegroups.com Sent: Monday, July 8, 2013 6:53 AM Subject: [wtr-general] Re: [Watir-webdriver] - Drag and drop using watir webdrive

Re: [wtr-general] [Watir-webdriver] - Drag and drop using watir webdriver

2013-07-05 Thread John Fitisoff
I ran into a similar thing recently, haven't had time to circle back and see why, may have been user error. It wasn't working in using the native watir method but I did get things to work by using the webdriver ActionBuilder. At that point I dropped it (so to speak) because drag and drop wasn't

Re: [wtr-general] Can't use = sign in URL.

2013-06-05 Thread John Fitisoff
I used to test a Java app and as part of that I'd read in the app's properties because I used a few of them. It's not too hard to write something once you get comfortable with all of the string parsing methods. I just wrote this: def read_properties(path)   arr = File.read(path).split("\n")   ar

Re: [wtr-general] New at creating test automation using Watir: a few problems I can't solve

2013-03-29 Thread John Fitisoff
Think this will work, although there may be some better way of doing it. I was using watir-webdriver and firefox: b.goto('http://www.proflowers.com') b.text_field(:value => " Keyword / Item #").set "30046508" b.div(:id, 'SearchContainer').image(:class, 'searchSubmit').click b.image(:class, 'calen

Re: [wtr-general] how to call script within script

2013-03-26 Thread John Fitisoff
The previous responder was right, it's important to understand how things are scoped. But you can use a global while you are looking into that. Just replace '@' with  '$'. $browser = Watir::Browser.new:chrome  From: Sohail Mirza To: watir-general@googlegro

Re: [wtr-general] Test::Unit::TestCase

2013-02-01 Thread John Fitisoff
watir-webdriver? What are the available frameworks in watir-webdriver? Is Test::Unit::TestCase is still available and being used? Thanks for your comments. Sohail On Fri, Feb 1, 2013 at 8:31 PM, John Fitisoff wrote: Sure. They are two different things that don't inte

Re: [wtr-general] Test::Unit::TestCase

2013-02-01 Thread John Fitisoff
Sure. They are two different things that don't interact directly with each other. From: Sohail Mirza To: watir-general@googlegroups.com Sent: Friday, February 1, 2013 8:12 AM Subject: [wtr-general] Test::Unit::TestCase Hi, Can i use Test::Unit::TestCase fr

Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved

2013-01-17 Thread John Fitisoff
Awesome! Thanks... From: Dan To: watir-general@googlegroups.com Cc: John Fitisoff Sent: Thursday, January 17, 2013 10:47 AM Subject: Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the

Re: [wtr-general] Re: Watir-webdriver - Screenshots - Browser is minimised before screeshot is taken and only part of the page is saved

2013-01-17 Thread John Fitisoff
One question about the screenshot capability: Is it specific to a certain OS or will it work on Windows, OSX, Linux? From: Evgeny Shavkunov To: watir-general@googlegroups.com Sent: Thursday, January 17, 2013 2:07 AM Subject: [wtr-general] Re: Watir-webdriver

Re: [wtr-general] Using xpath vs span to get elements (one works on IE and Firefox but the other one only in IE)

2012-12-21 Thread John Fitisoff
Do you know why it doesn't work on Firefox? It might be worth rescuing the Firefox errors and then capturing the HTML when it sometimes doesn't work. If the HTML looks OK then maybe it's a timing issue and maybe you just need to wait a bit longer when clicking. If it's different for some reason

Re: [wtr-general] Random numbers

2012-11-02 Thread John Fitisoff
I hven't had any coffee yet but could you use rand?  either directly or to generate a random index for an array From: Adrian Killens To: watir-general@googlegroups.com Sent: Friday, November 2, 2012 3:00 AM Subject: [wtr-general] Random numbers How would

Re: [wtr-general] Using ternary operator with Watir

2012-10-01 Thread John Fitisoff
Here's another way that might work: #This should return either an object or nil result = @browser.table(:index, 3).links.find {|tr| tr.text == link_name} result.click unless result.nil?  From: Joe Fl To: watir-general@googlegroups.com Sent: Monday, Octobe

Re: [wtr-general] Rich Face Testing with Watir

2012-08-08 Thread John Fitisoff
Wednesday, August 8, 2012 11:56 AM Subject: Re: [wtr-general] Rich Face Testing with Watir Got this error, Watir::Exception::UnknownObjectException: Unable to locate element, using {:tag_name=>["body"], :index=>1} On Wed, Aug 8, 2012 at 2:48 PM, John Fitisoff wrote: Sorry, th

Re: [wtr-general] Rich Face Testing with Watir

2012-08-08 Thread John Fitisoff
Sorry, think I should have said 'body' rather than tbody: b.table(:class, 'rich-tree-node').body(: index, 1) .html From: Wind Dive To: watir-general@googlegroups.com Cc: John Fitisoff Sent: Wednesday, August 8, 2012 7:12 AM Subject: Re

Re: [wtr-general] Rich Face Testing with Watir

2012-08-06 Thread John Fitisoff
I think there's a Donald Trump joke in here somewhere. :-) One thing worth trying would be to call .text and .html on the things that you are trying to access just to be sure you're getting what you want. It looks like there's a tbody in the table, it's easy to miss those. If you're not account

Re: [wtr-general] Watir Framework?

2012-07-28 Thread John Fitisoff
It's pretty easy to roll your own. You may not want to or need to. But it's not hard. Here's something that you can experiment with: -Create a directory -Create some script to run your tests called testrunner.rb. Put these two lines in that script: ROOT_DIR = File.expand_path(File.dirname(__FIL

Re: [wtr-general] Error in oracle database connection

2012-07-26 Thread John Fitisoff
rary Initialization Error (OCIError)'. I saw at least one reference to the error you're getting. There may be something there to help move you forward.   From: Pavak Shah To: watir-general@googlegroups.com Cc: John Fitisoff Sent: Thursday, July 26, 2012

Re: [wtr-general] Error in oracle database connection

2012-07-26 Thread John Fitisoff
Think DBI is a sort of normalization layer for different types of databases. You're calling OCI8 directly, maybe bypassing it for debugging purposes? The arguments for creating the OCI8 object seem OK. It seems most likely that there really is some sort of problem with how it's installed. Once

Re: [wtr-general] watir/ruby in Jenkins

2012-07-13 Thread John Fitisoff
Sounds like it might be trying to run something at some place where the upgrade hasn't occurred, or maybe something Jenkins has is outdated/initializing the test incorrectly? From: Ry To: watir-general@googlegroups.com Sent: Friday, July 13, 2012 1:32 PM Subj

Re: [wtr-general] LIBMYSQL.dll error when trying to run watir scripts

2012-06-01 Thread John Fitisoff
FWIW, I think I needed to install devkit when i got this working a while back. If you don't have that then installing devkit followed by a fresh install of the gem may do it From: Joe Fleck To: Watir General Sent: Friday, June 1, 2012 12:08 PM Subject: Re: [

Re: [wtr-general] verify text using OR statement

2012-05-17 Thread John Fitisoff
Not sure what you're using but regular expressions are a really good way to do this sort of thing concisely. This one matches foo or bar anywhere in the text string but you can be as selective as you need to: browser.text =~ /(foo|bar)/ From: Litha K To: Wat

Re: [wtr-general] Re: Watir not able to locate any element on the page

2012-03-16 Thread John Fitisoff
Have you tried using the form method? It's usually less confusing if you start with a broad scope and then narrow it down gradually. Maybe something like these will get you closer: b.divs.each {|d| puts d.html; puts "\n"} puts b.form(:id=>'form1').div(:class=>'form-container').html b.form(:id=

  1   2   >