Selenium is the most popular open source test automation tool especially popular for web based applications and has become backbone for many other platforms.
As we all know that, the future is all about cloud applications which means every application would be web based. Though we have many test automation tools in market considering both paid and open source, a person can create automation assets with the respective tools only if he or she is proficient in the language the tool supports. The biggest advantage about Selenium is, it supports most of the programming languages to create the test automation assets.
Selenium supported scripting languages are
- Java
- Python
- C#
- Ruby
So now a person need not worry about learning a language which is supported by the automation tool.
If we are to know a little bit of history of Selenium, it has first started with Selenium IDE and Remote control concepts, they had to add browser plugins to respective browsers.
Selenium supported browsers are
- IE
- FireFox
- Google Chrome
- Opera
- Safari
So, when the addins been installed, selenium would be able to inject javascript in to web page and perform actions on the UI components and there by used to execute the automation scripts.
Getting started with Selenium IDE once the plugin is installed successfully.
- Open a web browser.
- Click on the selenium IDE icon.
- Click on a record button in the newly opened IDE.
- Navigate to the application which you want to test by providing the url in Browser’s address bar.
- Perform the steps you want to test on the application one time.
Once this is done Selenium IDE provides options to export the script in to your desired language for Remote Control ( RC ) format.
Now using Eclipse and supported Jar files for Selenium Remote Control Server and Selenium Client Drivers for java one should be able to execute the selenium scripts.
To understand more details please refer to articles:
- Recording scripts using Selenium IDE.
- Configuring Selenium Remote Control (RC) using eclipse.
But now the world has moved completely to Selenium Web Driver by looking at the challenges of working with Javascript based engine to record and play back of the scripts.
Getting started with Selenium Web Driver for Test Automation
The basic steps to work with selenium web driver is that, we need to have appropriate JAVA installed, Eclipse IDE and WebDriver Jar files. Once we have all these ready, need to create a java project in Eclipse IDE and add all the jars extracted from Selenium Web Driver files.
For this approach we need not install any Browser plugins and we should be able to create the test automation assets with the desired scripting language. Also, Selenium does not use javascript engine anymore for creating the test automation scripts.
To learn more about how to create test automation scripts using selenium web driver, please follow below articles
- Configuring eclipse to start writing test automation scripts using selenium Web Driver.
- First automation script using Selenium Web Driver.
- What needs to be done to create Selenium Web Driver Scripts that supports different web browsers?
Hi Srinivas ,
Could you elaborate Selenium and also could you give an alternative apart from AUTO IT for automation of window application ?
Could you also include java material as currently this language is mostly used for Automation
Regards,
Akhilesh
Sorry for the delay in Response Akhilesh,
Regarding automation of Windows Applications, the market leader is QTP and there are some options like UI Automation from Microsoft, that is more known to the Microsoft Experts.
Selenium, I would be adding more content from now on 🙂
Regarding java, sure, I would be more than happy to include some articles / tutorials on it. As it is been widely used in test automation.
Thank you so much for your comments.
Hi Friends,
I need small clarification i am testing mobile app while running the script in eclipse i am getting one console as Bsh console “BeanShell 2.0b4 – by Pat Niemeyer (pat@pat.net)
bsh % ” why the system is showing this console can anyone say to me am i need to configure the run setup?
What are your run configurations in Eclipse for this particular program?
Hi Srinivas,
I have got the solution for that actually i have not installed the testng plugin in eclipse that is the reason eclipse have displayed that Bsh console thank you for responding.
Thanks,
Ramesh
Hi Srinivas,
While running appium i have got this error can u give any clarification
” error: Unhandled error: Error: ENOENT, no such file or directory ‘C:\Users\sivaramesh.k\AppData\Local\Android\sdk1\platform-tools;C:\Users\sivaramesh.k\AppData\Local\Android\sdk1\tools;C:\Users\sivaramesh.k\AppData\Local\Android\sdk1;\build-tools'”
Hello Sir,
I need your help in selenium automation test script.
I was trying to do write a test a case for a website that takes in the Java code , compiles it and runs it. However, while writing the test case , the text-area that takes input did not have all the characters. I saw it was missing ‘(‘ and ‘!’. I tried using the uni-code characters as well as ascii characters.
Input String is like this : !isBlank(general22)
In this string “!” and “(“ is not accepting via element.sendKeys
So I get O/p : isBlankgeneral22)
I have tried below code :
String text=!isBlank(general22);
StringBuilder sbr1 = new StringBuilder();
sbr1.append(StringEscapeUtils.unescapeJava(“\\u0021”));
sbr1.append(text.substring(text.lastIndexOf(‘!’)+1,text.lastIndexOf(‘(‘))); sbr1.append(StringEscapeUtils.unescapeJava(“\\u0028”)); sbr1.append(text.substring(text.lastIndexOf(‘(‘)+1,text.lastIndexOf(‘)’))); sbr1.append(StringEscapeUtils.unescapeJava(“\\u0029”));
But still, it doesn’t work.
Please suggest me proper answer regarding this problem.
Would it be possible for you to share the website where you are trying to execute this automation?
No, Sir. Website URL is working only is our organisation LAN.
But, I can share screenshot of that issue.
Hi Zarana,
I am really sorry for the delay… was little tied up.
Just couple minutes back I tried to automate a scenario similar to what you said and I had no issues with normal code it self.
I was using Selenium-java-3.1.0 and here goes the code:
Thank You Sir. Its working fine with Selenium-java-3.1.0
Hi Zarana,
That’s great to know.. I am happy that your issue is resolved.
I am getting the ” Bsh Console popup ” with message ”Beanshell11 1.3.0 by pat Niemyer’ at the time of runing the java script in Eclipse. pls share your thought to sort it out.
Kindly, share the code, it would be a good reference to debug and analyse..
Hi Srinivas
Suggest best Selenium Training institute for Real time scenarios explanation.
Thanks,
Narendra Reddy
I don’t think there would be any institute which teaches real time scenarios, but i think there are some who would guide you through a path which will make you gain real time experience. But i am not aware of any institutes as such, as i mostly do things online.