Skip to content

TalhaBinAshraf1/seleniumWithCSharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚧 Selenium_With_C#

This Repository is created to automate e-com platform Daraz by using Selenium with C#.

Tech Stack

  • C#
  • .NET(net6.0)
  • Selenium WebDriver
  • NUnit(3.13.3)
  • Extent Report

🔹 Project Structure

  AutomationTask
    │
    ├── Config
    │ └── BaseTest.cs
    │
    ├── Pages
    |  ├── CartPageObjects.cs
    │  ├── LandingPageObjects.cs
    │  ├── LoginPageObjects.cs
    │  ├── ProductObjects.cs
    │  └── RegisterPageObjects.cs
    │
    ├── Suite
    │ └── ValidateUserRegistrationPurchaseFlowTests.cs
    │
    ├── Tests
    │ ├── Language
    | |   |──  LanguageTests.cs
    | |   |__ LanguageActions.cs
    | |
    │ |.....
    |  
    ├── Utility
      ├── TestData.cs
      |── ExtentReporterHelper.cs
      └── UtilityActions.cs

🔹 To run this project, make sure your workstation has:

  1. Should have Visual Studio .NET 6.0 SDK installed

    1.1. To verify use the command >> ' dotnet --list-sdks '

    1.2. If see this >> ' 6.0.xxx ' than you good to go.

  2. Clone the Repository.
  3. Restore Dependencies.
  4. Build the Project.
  5. Run Tests

🔹 Run Commands:

🔹 Run Full End-to-End Suite

 dotnet test --filter Category=E2E

🔹 Run Specific Test Categories

dotnet test --filter Category=LanguageChange
dotnet test --filter Category=Login
dotnet test --filter Category=UserRegistration
dotnet test --filter Category=LoginProductAddToCart
dotnet test --filter Category=LoginAddToCartBuyProduct

🔹 Generate Report

After test execution, perform following command to get the report:

     open bin/Debug/net6.0/Reports/ExtentReport.html

🔹 Notes

  • No real OTP is used.
  • No payment is completed.
  • Login uses predefined test users.
  • Pages contain only locators.
  • Actions contain business logic and assertion.

Attachments:

Test Execution Video:

With Command:

With UI:

Execution.By.Ui.Single.TestFile.2.mp4

Extent Report ScreenShoot:

Extent Report 2 Extent Report 1

About

This is a Showcase Repository for Selenium with C# for e-com platform Daraz.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors