Tag Info

Hot answers tagged

5

In terms of introductory resources, I'd recommend the book 'Everyday scripting with Ruby' by Brian Marik it's a great into to scripting/programming with ruby, and since everything watir does is powered by ruby, getting a good basic grasp of the language is important. Also the book is very much 'aimed' at testers. The other thing that's essential (for ...


5

The watir.com website is a great collection of resources about Watir. Željko Filipin, Watir community manager, is currently working on a book about Watir (https://github.com/zeljkofilipin/watirbook/). It is currently a work in progress, but I'm sure he would very much be interested in hearing what kind of things someone new to Watir would like to see in the ...


3

This is how I'm doing drag and drop in watir-webdriver. This only works in Firefox: browser.div(:text=>"from_div").wd.drag_and_drop_on(browser.div(:text=>"to_div").wd)


2

create a path provider where you test data is located. in a file create a method that returns expanded path def datapath filename File.expand_path(File.join(File.dirname(__FILE__), filename)) end use it in your test browser.file_field(:name,"the_file").set(datapath(filename))


2

For watir-webdriver there is http://watirwebdriver.com/ site created by Alister Scott.


1

To use Chrome in Webdriver you have to be sure you did two things: chromedriver.exe is on your classpath you have to build a wrapper so the code knows where to find the binary and can start the chromedriverservice. More info can be found here


1

Although I haven't had to do this in a few years, I always found the win32OLE to be my best friend in these cases. Can't seem to find any of my old code samples. Doing a quick search, I came across a fairly good tutorial here by David Sulc with this particular post seeming to cover exactly what you're looking for.


1

If you are using Firefox driver you do not have to go through the additional steps. However, we have to go through the additional steps if we use chromedriver. Did you perform those steps?


1

One approach that my work is to extract paths like this to a config file of some point that could be set depending on where you run the script from. Then you can read the value out of the config at start up. Another approach I have taken in C# is to have a directory that is part of my project that gets built out with the project so if I have dependencies ...


1

I've done something similar using events and/or autoit.. don't recall off the top of my head what the solution was (would need to go back and find that code) I'd recommend asking on the main StackOverflow site and tag the question with Watir and Watir-webdriver.. a lot more of the Watir folks watch that site than this one



Only top voted, non community-wiki answers of a minimum length are eligible