16

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 ...


14

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 ...


11

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, ...


10

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 ...


10

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 "...


10

Short answer: Yes it is a bad practise, unless you have a very very very good reason, do not use implicit wait. This Stack Overflow answers really puts the difference in great detail. (read this!) I once had someone on my team who thought it was a good idea, until I started researching why all our tests had such a long starting time. Somewhere in our setup ...


9

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 = driver.WindowHandles....


9

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 ...


9

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 ...


9

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 real ...


9

You can try setting implicit wait time. (Documentation) // 5 seconds implicit wait (C# code) IWebDriver driver = new FirefoxDriver(); driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));


9

This is how I would debug a Selenium session to find out what is happening: Step-by-step debugging: Most IDE's allow you todo step-by-step debugging, you could set a break point just before the point you want to investigate. This will pause the execution of the test and lets you examine the browser with its own tools. You can step thru each line of code one ...


7

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.


7

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 ...


7

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 ...


7

According to The WebDriver Sampler: Your Top 10 Questions Answered article the information can be obtained from Selenium Changelog, for instance for Java client libraries: v2.52.0 ======= Firefox: Weakening platform restriction to enable 64-bit support Fixing closed window handling in FF45 So my expectation is that version 2.52 and ...


6

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


6

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 ...


6

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 not ...


6

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 ...


6

We have found that dealing with third party software in CI/dev environments was a great source of intermittency/failure and pain. So in our CI environments, we always create stub services for third parties. A stub service is basically a fake API service that you control, that behaves the same (or similar) to how the real service does. I would recommend ...


6

Selenium webdriver is W3C standard for browser automation, so any "better alternative" is a niche solution. "Record and play" tools may generate "tests" for you. Of course you will lose all the benefits of concise solution which you can get by using real programming language. Script may for example set up correct date (say, 1 hour from now), can wait in ...


5

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 ...


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

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 ...


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

What type of machine are you running it on? Most likely it has nothing to do with TestNG having any type of thread limits (I couldn't find anything saying there were in fact limits) but rather your local box. Thread count limits on Windows or Linux are determined by the stack space. Explanations can be found here and here. On Windows the default stack size ...


5

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 ...


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 ...


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