Tag Info

Hot answers tagged

6

1 may be necessary, but it's also possible to handle it by executing some javascript. For example, if the ajax page is using the jquery library, you can do this: bool isAjaxFinished = ((IJavaScriptExecutor)webDriver).ExecuteScript("return jQuery.active == 0") 4 and 5 on your list don't seem necessary and may actually be counter-productive. Selenium does ...


3

Use Factory method that return an object instance of type Browser. using System; using System.Collections.Generic; using System.Linq; using System.Text; using WatiN.Core; namespace ConsoleApplication4 { class Program { public static Browser BrowserFactory(bool IWantToUseIEAndOnlyIE) { Browser result; if ...


3

The key question here is, "Why are you using Record and Playback techniques, rather than coding your tests using Page Objects?" I can think of two reasons: Your team lacks the technical skill to code tests in C# without using Record and Playback. You just didn't realize that there are other ways to create automated UI tests that are more robust and much, ...


2

First of all, please take a look on the following great blog post: Keep Your Tests DRY The post refers to the Page Object pattern that helps to make you code clean. I am doing automation on WatiN and using this pattern instead of step by step recording and copy pasting the clicks on the user login screen. IE Developer – that’s all what I need. Of ...


2

Rather than using sleep, you should check for the element in the listbox, you might think this is the slow approach, but you will have a more reliable test, which will save you time in the long run. Just make sure you remember to have a timeout in the loop in case the item for some reason never exists.


2

If you are using SpecFlow look at the Tags Tags description where placing a specific tag before your Scenario allows you to run the specific ones you want. I use @test or @dev for specific User/Functional Tests and when using my NUnit Driver I put in the tag with the /include option. This links in to the SpecFlow feature files such that the following case ...


2

The insertion of Thread.Sleep() is typically indicative of a race condition in your test and your test is running out of sync with the thing is it testing. One suggestion may be to insert a polling loop to wait for the redirect, or an event to indicate the redirect has happened. See http://www.testingmentor.com/imtesty/?p=652 and read the comments for ...


1

Just a comment, no matter how many documents are written for developers about producing testable code, the code will still not be testable, until developer tries to write some automation for his code. IMHO, spending half a day when dev sits side by side with a person who knows how to use one of the UI automation frameworks and trying to write some automation ...


1

Overall best practices for testability is difficult, since that could involve whether the code "hides" defects (e.g. race conditions causing intermittent threading issues or difficult corner case issues). Usually testability goes hand in hand with good development practices: well documented code, following a coherent coding style standard, and good ...


1

No, you do not have to write code. All you need to do is run your TFS in interactive mode, not in service mode because services are not allowed to open windows but watin doesn't work without a window. You'll find the settings on tab build configuration.


1

The selected tests in matching **\test.dll using setting from [where the WatiN tests are stored in Source Control] are going to be executed with MSTest, which is not compatible with watin. You can try to change the build template TFS uses to call your watin runtime instead of MSTest, but you'll have to create code


1

If the automation needs revolve around automation and IE one option is Visual Studio Ultimate, which does have record and playback with some options for coding, so while the Tester gets used to the interface eventually there is the same environment for coding the tests in C# or even using the CodedUI modules to creature reusable functions/modules. You don't ...


1

The major benefit for me is that Specflow compiles feature file into the unit tests. I am using NUnit and with this feature I can run my tests written in “classic” style and GivenWhenThen style in one suite. Some things look very ridiculous when I’ve tried to describe them in Gherkin (Specflow): Scenario: The edit user page should have button Delete ...



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