Selenium 25: Write first Selenium Test Case and Execute

preview_player
Показать описание
Selenium WebDriver Environment Setup and Write first Selenium Test Case & Execute. Writing selenium WebDriver Test Case using Element Locators, Selenium WebDriver API Commands, and Java Programming Logic. Derive manual Test Cases from Test Requirements then Automate those Test cases using Selenium WebDriver, and Java Programming.
Рекомендации по теме
Комментарии
Автор

Class Notes...
Selenium Class 25: Write first Selenium Test Case and Execute

Manual Test Case:

Test Case ID: gcrshop_admin_TC001

Test Case Name: Verify Admin Login in GCR Shop web portal.

Test Steps:
i) Launch the Browser
iii) Enter "Username"
iv) Enter "Password"
v) Click "Login" Button

Input Data / Test Data

Username = "admin"

Verification Point:
Capture the URL after Login and compare with expected


Actual:

Rest Result: Pass/Fail

Selenium WebDriver Test Case,

Download Browser driver (Mozilla Firefox)- gecko driver and extract

Gecko is a web browser engine used in many application developed by Mozilla Foundation,
and the Mozilla Corporation.

Gecko driver is the link between our Test Cases in Selenium and the Firefox browser,

Note: In previous versions of WebDriver, no Gecko Driver, Firefox Browser is the default Browser.
But in selenium 3.0, no default browser, we need ti instantiate and create the Browser driver (Any browser),

Admin Login to GCR Shop Admin Interface

Elements in this Navigation:

i) Username - Edit box - name - username
ii) Password - Edit box - name - password
iii) Login - Button - id - tdb1

If It is Mozilla Firefox Browser then we can use,
Built-in Feature - Page Inspector
Or
Download and Add Plug ins in Mozilla Firefox Browser...
Firebug, Firepath

Selenium was developed in Java,
UFT/QTP was developed in VC++.NET

WebDriver Test case

WebDriver driver = new FirefoxDriver()

public class AdminLogin {

public static void main(String[] args) {
//Instantiate Gecko driver (It provides link between Selenium Test Case and Mozilla Firefox Browser)
//System.setProperty("webdriver.gecko.driver", "D:/geckodriver.exe");
//Create Firefox browser driver in Selenium WebDriver interface...
WebDriver driver = new FirefoxDriver();//It launches Firefox browser with blank url



String URL = driver.getCurrentUrl();

System.out.println("Admin Login Successful - Passed");
}
else {
System.out.println("Admin Login Unsuccessful - Failed");
}
driver.close();
}
}

Web Elements and Operations on the Elements

gcreddy
Автор

Im new to selenium, your tutorials are powerful Sir

andilemangqasana
Автор

Thank you so much sir...These videos are very helpful.

davidprasad
Автор

Dear Sir, I am following your classes and learning. Thx for the videos. I just wanted to add something for fellow learners:
From version 52.0 onwards Firefox is not accepting non secure http:// URL's hence the Admin Login script is failing for www.gcrit.com. To Bypass this type about:config and press enter in firefox, choose accept risk then set the value of to false. Now the script mentioned in the video will run without fail.

magma
Автор

hello sir,

it's a request to add videos on frameworks like datadriven, pom, bdd-cucumber, keydriven, hybrid framework it will be great help

gandharavkatyal
Автор

Hi sir,

I have installed latest version of Firefox, in latest version it does not support firebug and firepath
Please suggest which add on I should use

Thanks,
Rajinder kaur

rajinderkaur
Автор

chrome driver for windows 64bit is not available. what is the solution?

sadiaaslam
Автор

I am. Getting connection refused exception.. Plz help

shrutinikhar
Автор

Sir, could you please give me Selenium eBook?
Thanks in advance

MuhammadWaseem-whvy
Автор

you could be best tutor if you improve your accent. please stop repeating your students name, it is getting annoying..

davidvilla