Tag Info

Hot answers tagged

11

You mentioned abstracting your test code from the framework. The page object pattern is one way that this can be done and is fairly common. It is popular with Selenium but can be applied to any UI automation: http://code.google.com/p/selenium/wiki/PageObjects. You can avoid using xpath that contains the entire path (or even part of the path) to the UI ...


8

If you can, try & promote the idea of test first development (aka TDD, BDD, ATDD, Specification By Example) with Continuous Integration (frequent commits to a pipeline such as Hudson or GO from Thoughtworks which continuously runs the automated checks to see if any of them have broken after a recent commit) Before Developers write the code, they write ...


8

These days, I'd say Selenium RC is not worth learning unless you have a specific need for it--for example, to work with legacy test code that uses it. I don't think it will give you a significantly better appreciation of the Selenium architecture. You can get that by exploring the Selenium code base if you have an interest. If you the know WebDriver API ...


7

You've got quite a few questions in your one question, but overall it sounds like what you want answered is: How can I learn to write automation so I can switch from a 100% manual testing role into a role that involves writing automation. I'll get to answering that one, but first... Honestly, if you are already manually testing in your current position, ...


7

Selenium solves a large part of cross browser testing. 90% I would say. Selenium is good for web testing across browsers. For UI related stuff adhoc manual checks are sufficient. I used to do manual checks to verify look and feel of UI (Text Sizes appearing small in a browser, Alignment Issues) Functional UI testing in selenium across browsers verifies Id's ...


6

This is possible with Selenium 2 and WebDriver. I'm not sure if it is with different versions. In Selenium 2 with WebDriver you can call webDriver = new FirefoxDriver() which spawns a browser, and that browser will stay open for the duration of your testing, or you can choose to close it with webDriver.Quit(). I like to close my browser window between tests ...


6

Selenium is mostly a functional testing tool. So any issue that you find using selenium will be across all the browsers No, that's not actually the case. Some functionality can be broken in some browsers while working in others. For example, for one of the apps I test, I've seen significant functionality issues going from IE 6 to IE 7 to IE 8.


6

Automated, parallelized, cross-browser testing is a seductive idea, but in my experience, the cost may not justify the benefit. I do not know whether your customer requests are based on actual experience or the advice of a trusted professional or the unfounded claims of someone in an elevator. You may spend a lot of time maintaining your cross-browser ...


5

Just use Coypu. It is a wrapper for Selenium/Watin etc., so you can easily swap to another framework later on, and it's heavily maintained. I wouldn't use any other layer. Much more maintainable. As it is available via Nuget und references the Nuget Selenium package, you always stay up-to-date via a simple UpdatePackages from within VS. Combine that with ...


5

I am using Selenium 2/Webdriver with Visual Studio and MSTEST. Really MSTEST and NUNIT have pretty much equivalent functionality. Unless you want to really get crazy, either should have everything you need for the purposes of executing your automated tests. MSTEST is the command line version of the built in test harness for visual studio. One limitation ...


5

You want to wait whenever there's a condition that must be satisfied before the test case can proceed. Waiting for a page to load is one such condition; another might be waiting for an AJAX interaction to finish, or for an error message to display. Sticking a wait() after every action is not productive. Sticking a wait before every action that must occur ...


5

IE 7 is expensive to support at my company. It is encouraging to hear that Microsoft will force automatic update users to upgrade to IE 8 or IE 9. If you host your own product, you should be able to analyze your web server's access logs to determine the market share of each browser version. With those numbers in hand, you can evaluate tradeoffs between ...


5

When I'm automating a test, I often make the test wrong in some small but meaningful way, then run it with the expectation that it will fail. For example: If the system is supposed display "42" in the "meaning-of-life" field, I'll change the the test to assert that it displays "43". If the system is supposed to display "42" only when the current user is ...


5

Quite simply No! WebDriver was a project in its own right before it merged with Selenium so looking at the Selenium RC codebase and API is not going to give you any insight as to why certain decisions were made inside WebDriver. Selenium RC is currently deprecated, so if you do start learning it you are learning something that is no longer supported and ...


5

In your comment you mentioned that the element is within a <frameset> \ <frame>. To work with any element within a frame, you need to first switch the context of the driver from the main page to that frame: driver.switchTo().frame("foo"); In this example "foo" would be the name of the iframe. You can also do it by index if the frame has no name ...


5

IMHO, a team lead who is a developer with less knowledge in testing, is the wrong kind of person to be selecting a test tool. Do you have any QA Professionals on your team - perhaps someone with test tool experience? Or, lacking that do you have anyone on the team who will actually be tasked with using a test tool? I would suggest you turn to them. If ...


4

I haven't used it, but possible it may be helpfull for you: FiddlerCore And one more alternative: BrowserMob Proxy


4

It is not necessary to create a new instance of the driver object. You can use JavaScript to open a new window which is a lot faster. To open the window: IJavaScriptExecutor jscript = driver as IJavaScriptExecutor; jscript.ExecuteScript("window.open()"); Then to switch windows, use the window handles: List<string> handles = ...


4

In his own inimitable fashion, QA Hates You posted a blog on this very topic http://qahatesyou.com/wordpress/2011/12/dont-base-your-compatibility-matrix-on-a-press-release/ "Nor will it force updates on consumers who have already declined earlier offers to abandon an older IE"


4

Currently, my setup is Visual Studio 2010, Selenium 2, SpecFlow or StoryQ, and NUnit. Since Visual Studio is what I'm most comfortable in, I wouldn't have it any other way. Selenium/Webdriver's libraries work great in there as well. As far as NUnit within, it also works great. Typically, for simiplicity sake, I create each class as it's on test fixture. ...


4

I'd recommend seriously looking at building a framework that has the absolute minimum of repeated script code - this has the advantage of minimising update work. Similarly, I'd consider data-driven scripts with an object-oriented framwork where you're building your transaction objects to harness the application's features. That way, as the application ...


4

Phrase "sometimes works sometimes not" often means that Selenium tried to make an action when that action was unavailable at that time (the easiest method to check is to make long pauses before each action). In this case I recommend for you to make your own custom method WaitWhileProcessing which commands WebDriver to wait until full page is rendered. How ...


4

Welcome to SQA, Jacob. First of all, it is understandable that a low-wage intern would want to find a higher-wage job. It is certainly possible to make a decent living as a manual tester. You said you are looking for a new job but are having trouble getting calls back. When I graduated from college, I had no idea what was important in a resume. If you ...


4

If I understand correctly, the only thing that makes this scenario a challenge is the use of the "live feed". Thus, stub out the live feed. Replace it with your own "non-live feed" and you end up with predictable states where your expected calculation results are truly predictable. Your "non-live feed" can be generated by hand, or if you are automating ...


4

The main differences between Appium and AndroidDriver/iPhoneDriver are architectural. The AndroidDriver/iPhoneDriver work the same basic way - they are applications you launch on the phone that create a webview that you can remote control with selenium. The limitations to this approach are: No control over hardware/operating system. Webviews are not a ...


4

Webdriver is not only more modern. It is future W3C standard. Being able to click on hidden links seems like a misfeature. I would use old version only if newer version was seriously lacking important features without which I cannot live.


3

I would like to recommend Acceptance Test Driven Development (=Specification by Example) technics. You will be surprised, because acceptance tests will find about 80% of the show stopper bugs (if you have some). The good point to start and listen a real stories from the experience of different agile teams is the (video) Podcasts section on: ...


3

The only sure way is to use virtual machines. Things like IE tester emulate older versions of IE, but they a locked into using the current set of DLL's loaded into windows. You will see errors in the native version of the browser that you do not see in IETester (and things like it). I know this to be a fact because I have previously used IE tester to ...


3

I think you are asking whether you need meta-tests (automated or otherwise). Of course, how do you know that a meta-test is correct? Here is what most developers do: if something feels risky, they test it; otherwise they trust that their code is correct. If something that they trust turns out to have a bug, they try to re-calibrate their judgement. You ...


3

As an alternative to simply making sure the values match completely every time, you may be able to create a little more reliable automation by checking things like certain elements don't intersect or element A is always above element B, etc. This would require creating some additional functions to test these things. This will give you some automated ...



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