Hot answers tagged

5

Watir is Object Oriented while capybara is domain specific. Capybara is simple to use, quick to deploy but maintenance will be an issue over time. Watir needs overhead to develop its page abstraction and etc but it pays for its dividend in the future for its maintainability.


4

Like Michael said the Page object pattern makes the finder easier to use. I try to maintain a pattern of having a test only verifying one thing or possibly one screen. In your example I would assume in your first test, you would be testing everything about the post being visible. In your 2nd test, the create a post step is only a setup step so that you have ...


4

I use the page object pattern myself. It addresses two main things: Defines the finder in one place Names the finder with english-like words Good things. However this doesn't address the issue of how to combine series of steps that are then used in multiple places. To do this you can use use functions / procedures / methods in the language you are ...


3

Here some points about sikuli I have discovered: Sikuli can not select by 100% text match. So it is extremely difficult to use it in financial applications cause there are not too many different GUI elements, but lots of similar buttons, lists, tables... So how could you select specific string (by its contents) in table with 1000+ rows (only 25 are in a ...


3

In my experience, as you correctly mentioned, if creation fails, deletion cannot be even tested, so in fact you have just one test with 2 separate test conditions. So far for every separate scenario I have only one test with multiple test conditions. Test starts with preparing system to certain status, which will be irrelevant for other tests. Then all ...


2

I have asked similar question here on watir Github: What are known reasons to use watir not capybara? You may find something useful there.


1

Watir is powered by Selenium WebDriver, which doesn't have a proxy built-in to do this sort of thing. A few suggestions are made over on SO. In the past (working in C#) I was able to use the Fiddler core proxy to inspect traffic after making a response.


1

At the end of each scenario, you should be quitting the driver instance during teardown: $driver.quit


1

Finally I managed to click on it. What happened is that the button wasn't directly visible when it did the click so the error pop up. And with watir alone was extremely dificult but I manage to scroll easier with gem install watir-scroll Then you add to the step file: require 'watir-scroll' And in the code before the click I put this: @browser.element(...


1

You can use xpath to find the element based on the part of the href you know //a[contains(@href,'api/users/confirm-register/')]


1

I'll make the case for Ruby as I'm most familiar with it. Others can vote up/down Ruby is great because you have rspec and capybara which are widely and heavily used. There is a huge community of fellow users. The main issues I encounter today are are about javascript and ajax calls. WebDriver doesn't have 100% answers for some of the issues. I don't ...


1

Maulik, Instead of waiting until a value exists, how about trying something along the following lines: br.wait_until{br.text_field(:id=> 'companyName').text.eql?("") == false}


1

${NeededString}= Fetch From Right ${FullStringWithEQUALSSign} \= Print ${NeededString} This will fetch the string to the right of the equals sign. Assumption here that there is only one Equals sign in the string. Can also use "Split String From Right" keyword?


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