Posts

Assignment 1: Automate Your First Selenium Webdriver Script using Browser Commands

Automate using Browser Selenium Commands - Launch browser, maximize, validate page title and close browser. It should be your first webdriver script.

Assignment Level - Beginner

Steps to Automate:


1. Open this link - https://www.techlistic.com/

2. Launch Firefox browser. (You can choose browser of your choice).
3. Maximize or set size of browser window.
4. Get Title of page and validate it with expected value.
5. Get URL of current page and validate it with expected value.
6. Get Page source of web page.
7. And Validate that page title is present in page source.
8. Close browser.
Try writing program for these steps and execute. You can refer following link for help.



Reference for Solution Selenium Webdriver Browser Commands
ReferSelenium Webdriver Tutorials Series
Author: Vaneesh Behl Subscribe FB GroupTechlistic.com Join Telegram channel at https://t.me/techlistic Feel free to ask queries or share your thoughts in comments or email me.

Assignment 3 - Automate demo 'About Me' form using Selenium with Java

Image
Automate a demo About Me form. Form contains all the basic web elements so it will cover all basic webdriver commands. Steps to automate: Open this link - https://www.techlistic.com/p/selenium-practice-form.htmlEnter first and last name (textbox).Select gender (radio button).Select years of experience (radio button).Enter date.Select Profession (Checkbox).Select Automation tools you are familiar with (multiple checkboxes).Select Continent (Select box).Select multiple commands from a multi select box.If you can handle Upload image then try it or leave this step.Click on Download file link and handle the download file pop-up (leave it if you are beginner).Click on Submit button.First try your own logic and automate it without any help. If you still find it difficult to automate then refer the solution below.


Solution: First Selenium Webdriver script which covers all basic commands

ReferSelenium Webdriver Tutorials Series

Top 10 Demo Websites to Practice Selenium Webdriver Online

Image
In this post I’m going to share links of some demo websites/pages which Selenium beginners can use for practice purpose. Here is the list of demo websites:
1. AUTOMATION PRACTICE FORM Level - BeginnerAbout - This form contains all the important form elements which we come across daily like text box, radio button, check box, select drop downs, multi-select box, button, links, File Upload, Download link.URL -https://www.techlistic.com/p/selenium-practice-form.html
2. AUTOMATION PRACTICE TABLE
Level - IntermediateAbout - This web page contains table data. You can test your Selenium and Java skills. It would require Selenium commands and java loops, conditions to read table data. URLhttps://www.techlistic.com/p/demo-selenium-practice.html
3. PRACTICE WINDOWS & ALERTS Level - IntermediateAbout - This web page contains buttons/ links which produces new web windows, javascript alerts etc. You can practice selenium commands to handle windows/alerts on this page.
4. E-Commerce Practice Website

Selenium IDE Sample Script With Most Commonly Used Commands

Image
In this post, I've tried to cover the most common actions that a QA performed so often while Web testing. General actions are: type, click on links, select dropdown option, multi-select, checking radio buttons and check boxes, uploading files and clicking on buttons, moving backward and scrolling. Above mentioned actions cover 90% of our testing. And it's fortunate to have Selenium IDE supports all these actions.



Here is a description of the most commonly used commands for Selenium IDE:

CommandsDescription openTo open URLsetTimeoutSetting Timeout LimitwindowMaximizeFor Window MaximizingstoreStoring value in variableechoTo print/log custom messages in consoleclickAndWaitClicking on linkgoBackAndWaitTo navigate backwardstypeTo enter values in a text fieldstoreEvalExecuting Javascript / Scroll clickChecking Radio Button / Check boxselectTo Select dropdown option

Selenium WebDriver - Form Commands: Enter and Get Text, Click & Select Dropdowns

Form commands are the most basic commands, which we use most of the time. These commands are used to enter text, click on links, click on buttons, selecting dropdowns, select radio buttons, select checkboxes, select date from date picker etc.
Form Commands - SendKeys, Clear, GetText & Click:Sendkeys - You can enter text in any text box using this command like., username, password, description etc./* sendKeys() * This command is used for entering value in a Text box */ driver.findElement(By.xpath("/some/xpath")).sendKeys("Some Value"); // OR// Implementation with Webelement WebElement FIRSTNAME = driver.findElement(By.xpath("/some/xpath")); FIRSTNAME.sendKeys("Any Text value");

Clear - This command is used to clear the text from the text box. This command is generally used to clear pre-filled text values from text boxes.// Clear Command - to clear the already filled data in text box driver.findElement(By.xpath("/some/xpath")).cle…