Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# selenium
# Selenium_Automation_Group82
This project focuses on web automation testing using Selenium WebDriver and Python. It demonstrates automated testing of web applications, including interacting with web elements such as text fields, buttons, radio buttons, dropdowns, and other UI components.

# Selenium Automation Testing

## Group Members

| Name | Roll No. | Section |
|------|----------|---------|
| Sheefa Hussain | 12023002023039 | CSIT A |
| Aishwarya Banerjee | 12023002023004 | CSIT A |
| Debapriya Roy | 12023002022030 | CST A |
| Somyadeeo Adhikari | 12023002023053 | CSIT A |

## Description

This submission contains the work completed for Selenium Automation Testing using Python and Selenium WebDriver.

The assignments cover Selenium installation and troubleshooting, web element identification, multiple element identification, CSS selectors, and child/nested element identification.

## Assignments

Selenium Installment and troubleshooting : [ Click Here⬈](https://drive.google.com/file/d/1EzHeOPSG0tosbtQ2L5OeBeWiV4UYHfiK/view?usp=drivesdk)

### Assignment 1: Web Element Identification [ Click Here⬈](https://drive.google.com/file/d/1w64CM8OtncPNQJo5ZQpEsuYCZmTfRd8U/view?usp=drivesdk)

Identify and locate different web elements using:

- `By.ID`
- `By.NAME`
- `By.TAG_NAME`
- `By.LINK_TEXT`
- `By.CLASS_NAME`

### Assignment 2: Multiple Element Identification [ Click Here⬈](https://drive.google.com/file/d/1PBBvmZy0pBJ1CZwcHdZKrlA4aO_AU_cL/view)

Identify multiple elements on a webpage using Selenium and work with the list of elements.

### Assignment 3: CSS Selector Challenge [ Click Here⬈](https://drive.google.com/file/d/1WmQFR-dZCJuMQrCrPlGnKB1oy1-tP28g/view?usp=drivesdk)

Locate web elements using CSS selectors, including wildcard selectors for elements with varying or dynamic attribute values.

### Assignment 4: Child Nodes Using CSS [ Click Here⬈](https://drive.google.com/file/d/1L0KeEeQWG4EEIOhxA1yeoZqLyalcZ1VA/view?usp=drivesdk)
Identify and locate child/nested web elements using CSS selectors and interact with the required elements.

## Reference

**Reference/Video Link:**
[https://youtube.com/watch?v=v-l05NiSYcg&si=VrDme6znhbRZ_Dun]

48 changes: 48 additions & 0 deletions Selenium_Automation_Group82-main/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Selenium_Automation_Group82
This project focuses on web automation testing using Selenium WebDriver and Python. It demonstrates automated testing of web applications, including interacting with web elements such as text fields, buttons, radio buttons, dropdowns, and other UI components.

# Selenium Automation Testing

## Group Members

| Name | Roll No. | Section |
|------|----------|---------|
| Sheefa Hussain | 12023002023039 | CSIT A |
| Aishwarya Banerjee | 12023002023004 | CSIT A |
| Debapriya Roy | 12023002022030 | CST A |
| Somyadeeo Adhikari | 12023002023053 | CSIT A |

## Description

This submission contains the work completed for Selenium Automation Testing using Python and Selenium WebDriver.

The assignments cover Selenium installation and troubleshooting, web element identification, multiple element identification, CSS selectors, and child/nested element identification.

## Assignments

### Assignment 1: Web Element Identification

Identify and locate different web elements using:

- `By.ID`
- `By.NAME`
- `By.TAG_NAME`
- `By.LINK_TEXT`
- `By.CLASS_NAME`

### Assignment 2: Multiple Element Identification

Identify multiple elements on a webpage using Selenium and work with the list of elements.

### Assignment 3: CSS Selector Challenge

Locate web elements using CSS selectors, including wildcard selectors for elements with varying or dynamic attribute values.

### Assignment 4: Child Nodes Using CSS

Identify and locate child/nested web elements using CSS selectors and interact with the required elements.

## Reference

**Reference/Video Link:**
[https://youtube.com/watch?v=v-l05NiSYcg&si=VrDme6znhbRZ_Dun]
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()

driver.get("https://www.google.com")

links = driver.find_elements(By.TAG_NAME, "a")

print(f"Total links found on the page: {len(links)}")
print("-" * 30)

for link in links:
link_text = link.text
if link_text.strip():
print(link_text)

driver.quit()
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from selenium import webdriver
from selenium.webdriver.common.by import By

# Open Chrome
driver = webdriver.Chrome()

# Open the login webpage
driver.get("https://the-internet.herokuapp.com/login")

# 1. Locate Username using ID
username = driver.find_element(By.ID, "username")
print("Username field found:", username)

# 2. Locate Password using NAME
password = driver.find_element(By.NAME, "password")
print("Password field found:", password)

# 3. Locate an input element using TAG_NAME
input_element = driver.find_element(By.TAG_NAME, "input")
print("Input element found:", input_element)

# 4. Locate Elemental Selenium link using LINK_TEXT
link = driver.find_element(By.LINK_TEXT, "Elemental Selenium")
print("Link text:", link.text)

# 5. Locate Login button using CLASS_NAME
login_button = driver.find_element(By.CLASS_NAME, "radius")
print("Login button text:", login_button.text)

# Close the browser
driver.quit()
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
from selenium import webdriver
from selenium.webdriver.common.by import By
import time

driver = webdriver.Chrome()

url = "https://the-internet.herokuapp.com/login"
driver.get(url)

print(f"Navigated to: {url}")
print("-" * 30)

#ASSIGNMENT 3: CSS Selector Challenge (Wildcards)

print("Executing Assignment 3: Wildcard CSS Selectors...")

username_field = driver.find_element(By.CSS_SELECTOR, "input[id^='user']")
username_field.send_keys("Sheefa")
print("Found the Username field using [id^='user'] and typed the username.")

password_field = driver.find_element(By.CSS_SELECTOR, "input[id*='pass']")
password_field.send_keys("SuperSecretPassword!")
print("Found the Password field using [id*='pass'] and typed the password.")

print("-" * 30)

# ASSIGNMENT 4: Child Nodes Using CSS

print("Executing Assignment 4: Child Node CSS Selectors...")

# Locate the Login button nested inside the form using a descendant selector
# The form has id="login", and the button is a child inside it.
nested_button = driver.find_element(By.CSS_SELECTOR, "form label")
nested_button.click()

#direct_child_button = driver.find_element(By.CSS_SELECTOR, "button > i")
#direct_child_button.click()
print("Clicked the Login button using the 'form button' child selector.")

print("-" * 30)

time.sleep(3)

print("Test finished successfully! Browser closed.")
driver.quit()
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
attrs==26.1.0
certifi==2026.7.22
cffi==2.1.1
h11==0.16.0
idna==3.19
outcome==1.3.0.post0
pycparser==3.0
PySocks==1.7.1
selenium==4.47.0
sniffio==1.3.1
sortedcontainers==2.4.0
trio==0.34.0
trio-websocket==0.12.2
typing_extensions==4.16.0
urllib3==2.7.0
websocket-client==1.9.0
wsproto==1.3.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## **Selenium Installment and Troubleshooting**
[ Click Here⬈](https://drive.google.com/file/d/1EzHeOPSG0tosbtQ2L5OeBeWiV4UYHfiK/view?usp=drivesdk)

## **Assignment 1**
[ Click Here⬈](https://drive.google.com/file/d/1w64CM8OtncPNQJo5ZQpEsuYCZmTfRd8U/view?usp=drivesdk)

## **Assignment 2**
[ Click Here⬈](https://drive.google.com/file/d/1PBBvmZy0pBJ1CZwcHdZKrlA4aO_AU_cL/view)

## **Assignment 3**
[ Click Here⬈](https://drive.google.com/file/d/1WmQFR-dZCJuMQrCrPlGnKB1oy1-tP28g/view?usp=drivesdk)

## **Assignment 4**
[ Click Here⬈](https://drive.google.com/file/d/1L0KeEeQWG4EEIOhxA1yeoZqLyalcZ1VA/view?usp=drivesdk)