Skip to content

OmarAbdElNasser260/Automation-task-using-Selenium-Java-Python-scripting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Automation task using Selenium/Java & Python scripting

Update V2

I optimized the code by improving algorithm efficiency and memory management, ensuring better performance and resource usage. Additionally, I enhanced adherence to OOP principles, implementing design patterns and improving encapsulation for better modularity. In Task 1, I noted that changes to the Amazon website now prevent using multiple filters simultaneously, which impacts our approach. I also developed detailed test cases, focusing on edge scenarios to ensure robustness and reliability, leading to a more maintainable and scalable codebase.

Description

This Selenium automation tasks utilize the Page Object Model (POM) design pattern to streamline the testing process. By encapsulating web elements and their related functionality into separate classes, the code becomes modular and easier to maintain. With POM, each page or component has its own corresponding class, enhancing code reusability and readability. Selenium's powerful features are leveraged to interact with web elements and simulate user actions such as clicking buttons and entering text, ensuring a robust and efficient testing framework. Meanwhile, automate data extraction from a CSV file and perform statistical analysis using Python, leveraging libraries like pandas. This streamlines data processing, reducing error margins and manual intervention. Python's scripting capabilities facilitate quick and accurate data insights, paving the way for more complex analysis pipelines. These automation tasks enhance productivity, ensuring seamless execution and informed decision-making.

Task 1

Very Important Note

In this task, the website that was used is https://www.amazon.eg/ instead of https://www.amazon.com/ because this website needs human interaction for authentication, and this will force us to have a manual part in this automated task.

Steps

  • Scenario 1
    1. Open amazon link “https://www.amazon.eg/” then type " car accessories"
    2. Select the first Item
    3. Add item to the cart
    4. Go to the cart and check that item is added successfully
  • Scenario 2
  • In this scenario, in the 2nd step, there was no filter for "Headphones" so instead of using Headphones as a filter, we used "Electronics" and there was no force page; we chose the 2nd page

    1. Open today's deals
    2. from the left side filters select "grocery"
    3. from the discount part choose "10% off or more"
    4. go to the fourth page then select any item and add it to the cart

Task 2

Steps

  1. Open this website: “https://ksrtc.in/oprs-web/guest/home.do?h=1”
  2. Choose the following ((from "CHIKKAMAGALURU" to "BENGALURU”)) from the popular routes
  3. Click “Search for bus”
  4. Select a seat
  5. Choose the boarding point and dropping point
  6. Fill the “Customer” and “Passenger” details (Note: you can use this phone number: 6789125987)
  7. Click on “make payment” and fill all the fields without submitting the payment

Task 3

Steps

  1. Remove any duplicates in the table
  2. Remove any decimal places in the Age column
  3. Convert the USD salary to EGP
  4. Print in the console some stats like:
    • Average age
    • Median Salaries
    • Ration between males and female employees
  5. write the data in a new CSV file

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published