Automation Testing Using Selenium
Automation Testing Using Selenium
Name Roll. No
Abhishek Kawade 22203B0003
Shirish Pawar 22203B0014
(Affiliated to MSBTE)
2024-2025
Department of Computer Engineering
Part-A
Format for Micro-Project Proposal
For 1st to 5th Semester
3.0 Action Plan (Sequence and time required for major activities for 8 weeks)
4.0 Resources Required (Such as raw material, some machining facility, software etc.)
Sr. Name of Resource/Material Specifications Qty Remarks
No.
1 Firefox browser 1
2 www.mumbaicityfc.com 1
3 Selenium WebDriver 1
4 Eclipse IDE 1
5 Mobile Devices 1
6 Desktop Platforms 1
Department of Computer Engineering
PART-B (Outcomes after Execution and Format for Micro-Project Report, About 6-10 Pages)
For 1st to 5th Semester
1.0 Brief Description: (Importance of the project, in about 100 to 200 words):
Automation testing for the Mumbai City FC website focuses on using Selenium WebDriver with
Firefox to thoroughly test a range of user interactions across the site. The primary objective is to
automate the testing process for important features such as page navigation, user registration,
login functionality, and critical actions like clicking the "Buy Tickets" link. By implementing
automation, the testing becomes more efficient, reducing the need for repetitive manual tests and
providing faster feedback on the website’s functionality. The automated tests simulate real user
behaviour, ensuring that the website responds correctly under different conditions. These tests
cover end-to-end scenarios, including tasks like clicking links, validating whether the page
navigates correctly, and checking form submissions and button clicks. They also handle interactions
with elements such as images, ensuring proper functionality and visual stability.
3.0 Course Outcomes Integrated (Add to the earlier list if more CO’s are addressed)
b. Prepare test cases for different types and levels of testing.
c. Prepare test plan for an application.
e. Test software for performance measures using automated testing tools.
3 Selenium WebDriver 1
4 Eclipse IDE 1
5 Mobile Devices 1
6 Desktop Platforms 1
b. Code:
package tumb;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
WebElement usernameField =
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("loginEmail")));
usernameField.sendKeys("[email protected]");
WebElement passwordField = driver.findElement(By.id("loginPassword"));
passwordField.sendKeys("abhishek11");
WebElement loginButton = driver.findElement(By.xpath("//button[@class='btn-site btn-
login']"));
loginButton.click();
Thread.sleep(5000);
String currentUrl = driver.getCurrentUrl();
if (currentUrl.contains("mumbaicityfc ")) {
System.out.println("Successfully logged in.");
} else {
System.out.println("Login failed, incorrect credentials.");
}
} catch (Exception e) {
System.out.println("An error occurred: " + e.getMessage());
} finally {
driver.quit();
}
}
}
c. Output:
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
} catch (Exception e) {
System.out.println("An error occurred: " + e.getMessage());
}
}
}
c. Output:
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
if (!getOtpButton.getAttribute("class").contains("btn-disabled")) {
getOtpButton.click();
Thread.sleep(5000);
String currentUrl = driver.getCurrentUrl();
if (currentUrl.contains("mumbai")) {
System.out.println("Successfully navigated to OTP step.");
} else {
System.out.println("Password does not match.");
}
} else {
System.out.println("Password does not match.");
}
} catch (Exception e) {
System.out.println("An error occurred: " + e.getMessage());
} finally {
driver.quit();
}
}
}
c. Output:
V. Signup Functionality
a. Test-Case:
Test Test Case User Input Expected Actual Result Status
Case Objective Result
ID
Department of Computer Engineering
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
if (currentUrl.contains("login")) {
System.out.println("Successfully navigated to OTP step.");
} else {
System.out.println("OTP request failed.");
}
} catch (Exception e) {
System.out.println("An error occurred: " + e.getMessage());
}
}
}
c. Output:
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
a. Test-Case:
Test Test Case User Input Expected Result Actual Result Status
Case Objective
ID
TC8 Navigation Navigate to the Mumbai Should navigate to the external Successfully Pass
to the City FC website and click DreamSetGo tickets page: navigated to
Tickets page the 'Tickets' link dreamsetgo.com/sports- DreamSetGo
travel/mumbaicityfc/packages tickets page
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
}
c. Output:
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.time.Duration;
b. Code:
package tumb;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;
Test Case:
Test Test Case User Input Expected Result Actual Result Status
Case ID Objective
TC11 Verify Website Should redirect to Pass
Redirected to the
logo Click on Mumbai City Fc the website’s home
website’s home
logo page
page successfully
TC12 Social media Click on the share link should navigate Pass
Navigated to the
Sharing button for sharing the to the
www.facebook.co
Functionality news article on www.facebook.com
m page
www.facebook.com page
TC13 Click on the "Fast&Up" Should redirect to redirected to
Verify Sponsor
logo on sponsors page Fast&Up’s official Fast&Up’s official Pass
Logos
page page successfully
TC14 Achievements Achievements are
Check Team Navigate to the
should be displayed displayed Pass
Achievements Achievements page
accurately. correctly.
TC15 Login, navigate to user User profile should User profile
User Profile
profile, update details, be updated updated Pass
Update
and save successfully successfully
TC16 Check Page should refresh Page refreshed
Language Click on “Marathi” and display in the and displayed in Pass
Selector selected language selected language
TC17 Success message
Enter Success message for
Verify Email appears
“abhishekkawade9a35 subscription should Pass
Subscription confirming
@gmail.com” appear
subscription
TC18 Check User User should be
Click on the logout User logged out
Logout logged out Pass
button after logging in successfully
Functionality successfully
TC19 Video should play Video played
Test Video Click on a video in the
without buffering or without issues Pass
Playback media section
errors successfully
TC20 Verify Live Check live match Live score and Live updates
Match updates feature during updates should displayed in real- Pass
Updates a match appear in real-time time successfully
Department of Computer Engineering
Test Plan:
2 Introduction The purpose of this document is to create a test plan for the Mumbai
City FC website. The purpose of testing this website is to verify the
functionality of features such as navigation, login, signup, ticket booking,
and match updates.
6 Item Pass/Fail Criteria All test cases with high priority are closed with the result - pass.
The test coverage is checked and sufficient, where the criterion of
sufficiency is not less than 99% of the coverage of requirements by tests.
7 Suspension Criteria: The appearance and entering the bug-tracking system of blocking bugs.
Environmental
10 needs - Firefox browser
- Mobile devices (iOS and Android)
- Desktop platforms (Windows, macOS, Linux)
- Stable internet connection
13 Schedule
The deadline for completion of all works and delivery of the project is
30/10/2024 by 5.00pm
14 Risks and Contingencies - Insufficient human resources for testing the application in deadlines.
during testing - Changes in website requirements or functionality during testing.
- Third-party integration issues.
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------
Signature: