Learning Selenium WebDriver and Java is rarely as easy as people says that it is.
It is not easy.
It is not difficult.
It is challenging.
If test automation is easy, all testers would know it.
And this article would not exist.
Before we continue, think about how many testers you know who had success learning Selenium by themselves without knowing Java first.
Do you know many?
What is test automation about?
- Creating Test Scripts using
- A Programming Language Like Java for
- Automating User Scenarios by
- Interacting With The Application through
- A Test Automation Library Like Selenium WebDriver
Programming languages come from math and include lots of abstractions that are not always intuitive.
What else is involved in test automation?
Test automation with Selenium WebDriver means more than programming with Java.
- Unit testing framework
- annotations
- test runner
- assertions
- test suites
- test fixtures
- Locators of site elements
- clicking them
- typing text in them
- getting element status (is displayed, is selected, is enabled)
- getting element information (value, attributes values, css info)
- Organize the code with object oriented programming
- Use external frameworks
The test automation scripts need to be short and independent.
This is achieved through unit testing frameworks such as JUNIT or TEST NG.
Key unit testing concepts for test automation are
Each test automation script interacts with various site elements by
Before interacting with a site element, this element has to be found.
If the element has an id or name, finding it is very easy.
Otherwise, an expression called element locator has to be created using languages such as CSS and XPATH.
It is not sufficient to create test automation scripts that work.
The test scripts should also be clear, easy to change and maintain.
This is accomplished through models such as Page Objects which require knowledge of object oriented concepts like classes and inheritance.
When working on test automation scripts, it is important to think also about reporting, taking screenshots, running scripts in parallel, logging.
Many of these functionalities are provided by 3rd party libraries.
How challenging is to learn Selenium?
How you learn Selenium determines how big the challenge is.
Learning by yourself makes it very challenging.
It is free as it does not cost any money.
It will cost you, however, lots of time, frustration and effort.
The chances of not succeeding are high.
If you have time to spare, learning by yourself may be an option.
But it is not the best option if you need results fast.
When learning by yourself, there are multiple challenges that you need to manage.
There is a huge amount of Selenium and Java study materials available for beginners.
Blogs, books, online courses.
Some of them are good and adequate for a beginner, others are not.
The challenge is selecting the good ones.
Also, after a while, your level of knowledge changes from beginner to intermediate.
For testers with intermediate level for Selenium and Java, there are less study materials available.
The same challenge remains but it becomes more evident.
How will you find study materials that take you forward instead of being just confusing?
Test automation requires multiple skills as explained above.
The order that these skills are learned is important.
In other words, what will you learn first?
The programming language?
XPATH?
Browser concepts?
Unit testing?
Page object model?
CSS?
The same question applies to learning each individual skill.
Where will you start, what will be the next step, and the step after, etc?
Without a clear learning map and a good compass to navigate it, learning Selenium may be very challenging.
Each skill required for test automation is vast.
Learning it fully takes a very long time and is usually not necessary for working on test automation.
The challenge is to know how much of each skill is needed for starting test automation in the shortest time possible.
One thing happens for sure when learning test automation.
You run into issues and problems about a specific element or about how different elements work together.
And you dont know how to solve the issue and have no idea how to find information or help.
Without a support system that helps you in difficult situations, your learning may be stuck or stopped.
Incorrect expectations are that learning will be easy and fast and that there is a limited number of things to learn.
There are always more things to learn than you expected.
And no, learning will not be easy and will not be fast.
The opposite is true.
How you define your goals increases or decreases the chance of failing.
A goal like "I will become a test automation expert in 3 months" is unrealistic.
A much better goal is "In 3 months, I will be able to create simple test automation scripts for the www.abc.com site".
Starting small and learning continuously new skills increase the chances to success.
It will not happen in a week or a month.
Each individual skill needs to be learned separately.
Then, you should learn how to use them together.
In time, without focus and perseverance, boredom or frustration can happen which may bring your learning to a halt.
I want to be clear.
It is not impossible to learn Selenium and Java by yourself.
It can be done.
But there are better and easier ways of doing it than by yourself.
Is there a less challenging way of learning Selenium?
Learning Selenium does not have to be this challenging.
Being trained by someone else is easier, less challenging and gets started in a relative short time.
It is not free but it saves lots of time and lots of effort.
This is because the trainer
- has the resources that you need
- has past experience training people like you
- has the answers for your questions
- knows the easiest and shortest way to take to your goal
- has the map of how your learning should happen
- he is there for you when you need help
- he keeps you focused
The decision about how to learn is yours.
What will you do?
An excellent breakdown of how to approach learning Selenium and the advantages of doing so.
ReplyDeleteThanks for sharing this Information, Got to learn new things from your Blog on selenium.
ReplyDeletehttp://thecreatingexperts.com/software-testing-training-in-chennai/selenium-training-in-chennai/
thanks
DeleteThus i am working, how can i learn those things, important facts of selenium which will improve my knowledge.
ReplyDeleteSelenium Training in Chennai
wow good blog to read really wrote well very interesting to read about Selenium here thanks a lot for sharing
ReplyDeleteSelenium Training in Chennai
Very wonderful blog. iam really appreciate your writing skill. writing more contant. keep sharing this type of contants. Thanks for sharing
ReplyDeleteselenium Training in chennai
I am getting this error. Please help me. How can I sort out this
ReplyDeleteException in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: WIN8
Build info: version: '2.31.0', revision: '1bd294d185a80fa4206dfeab80ba773c04ac33c0', time: '2013-02-27 13:51:26'
System info: os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_102'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.Executable.(Executable.java:69)
at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:59)
at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:55)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:92)
at LaunchFirefox.FirefoxLaunch.main(FirefoxLaunch.java:9)