Hot answers tagged browser-automation
9
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 ...
7
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 ...
6
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, ...
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
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 ...
4
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 ...
4
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 ...
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
I haven't used it, but possible it may be helpfull for you:
FiddlerCore
And one more alternative:
BrowserMob Proxy
3
Maybe this question I asked several months ago on stackoverflow can do some help to you: http://stackoverflow.com/questions/9781940/selenium-vs-webdriver-any-obvious-advantages
Although I said I decided to use RC at that time, I turn to webdriver short after that. Yes, webdriver has problems, but it is upgrading time after time. I would rather try the new ...
3
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 ...
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:
...
2
There are a number of tools that can do everything you want. Do you have a specific language/programming environment you prefer?
I prefer RestSharp and json.net if you've got visual studio and C#, however there's nothing built in to do the performance stuff unless you have visual studio ultimate in which case you can use the load testing tool. As for the ...
2
Yes, many (most? almost all?) test automators learned on their own, although I suppose a quick web search would turn up some training companies in your part of the world.
You've only been testing for 1 year, and are bored already? That's not a good sign, and perhaps this isn't the field for you. Testing/QA/Test automaton - all can indeed be boring at times. ...
1
Currently (to the best of my knowledge), Selenium does not have the ability to do this in the same window as you are already in, it must spawn it's own.
You may want to look into something like WATiR (ruby), WatiN (.NET), or iMacros (firefox) (chrome)
If you just want to be able to run the navigation without the window being visible, try taking a look ...
1
How about learning testing ? Read this blog post from Alan Page for a somewhat different view of automation and testing. ( hint, good automation is not just automating a manual test )
Picking up a copy of Everyday Scripting With Ruby by Bruan Marick for ideas on how automation can be used in a number if ways to help testing.
And try this article from Adam ...
1
If the Java applet is written to be accessible then you can use UIAutomaion (replacement for MSAA since Windows Vista) to automate it. Even if it is not 100% accessible, you may still be able to use UIAutomation. QTP likely uses MSAA or UIAutomation under the hood to drive it's non-web automation. There are a number of other solutions win32 automation ...
1
Building off of @Bruce McLeod's answer with Selenium. Using Selenium WebDriver to do what you want to do isn't terribly hard. Briefly, this is how it could be done.
Typically, web tests built around Selenium WebDriver only open one browser session and perform all operations on that session. However, there's nothing stopping you from opening up two browser ...
1
"I can easily test the scenarios where test passes", my experience shows the opposite. Take for example a test where the return value was initialize to "Pass" at the beginning (really bad practice) and a bug in the test code send it to the end of the test before something was actually tested.
We usually add a set of unit-tests for the core services such as ...
1
My workplace has been able to build flexible and reliable end-to-end automation of user scenarios with the use of user-defined transaction "objects", each of which contains a number of transaction steps (each step is itself an object). All the data lives in CSV files and the scripts are fairly code-intensive.
This approach is pretty much tool-agnostic: our ...
1
I am not a really big fan of automating customer scenarios unless they are only used as baseline to validate a specific scenario works after code churn in the product. Automated tests can be a valuable tool, but they are a poor replacement for emulating actual customer behavior.
That being said, one way to improve test coverage of the various "paths" a ...
1
You can try to use Behavior_Driven_Development BDD for this.
There are different tools to do this in dotnet specflow or ruby cucumber.
Actually you write your tests like this
Scenario 1: Refunded items should be returned to stock
Given a customer previously bought a black sweater from me
and I currently have three black sweaters left in stock
when he ...
Only top voted, non community-wiki answers of a minimum length are eligible
