Skip to content

Commit

Permalink
Added crossbrowser testing tutorial link in readme and minor changes …
Browse files Browse the repository at this point in the history
…made to the repo (#134)

* added tutorial blog link and video in readme

* updated dependency versions in pom.xml

* updated versions of dependencies in pom.xml, disabled lambdatest ecommerce website tests as product is not available, added edge browser block on selenium grid file
  • Loading branch information
mfaisalkhatri authored Mar 24, 2024
1 parent 97c5bda commit 230961d
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- This repo has example codes with Selenium 4 features.
- Websites used for testing are: [automationpractice.com](http://automationpractice.com/index.php), [saucedemo.com](https://www.saucedemo.com),
[the-internet](http://the-internet.herokuapp.com/) [owasp-juice-shop](https://github.com/juice-shop/juice-shop)
and [LambdaTest E-Commerce Playground](https://ecommerce-playground.lambdatest.io/)
and [LambdaTest e-commerce Playground](https://ecommerce-playground.lambdatest.io/)
- This repo uses `Maven` as build tool and `TestNG` testing framework to run the tests.

## Talking more about the Scenarios Covered in this project:
Expand All @@ -36,6 +36,9 @@

- [Selenium 4 WebDriver Hierarchy: A Detailed Explanation](https://medium.com/@iamfaisalkhatri/selenium-4-webdriver-hierarchy-a-detailed-explanation-lambdatest-18771c5fd3e9)
- [Selenium Manager in Selenium 4.11.0: New Features and Improvements](https://medium.com/@iamfaisalkhatri/selenium-manager-in-selenium-4-11-0-new-features-and-improvements-lambdatest-761593a7f009)
- [Different Types of Locators in Selenium WebDriver](https://www.lambdatest.com/blog/locators-in-selenium-webdriver-with-examples/)
- [How to Locate Elements Using CSS Selectors in Selenium](https://www.lambdatest.com/learning-hub/css-selectors)
- [How to Use @FindBy Annotation in Selenium Java](https://www.lambdatest.com/blog/findby-annotation-selenium-java/)
- [Understanding CSS Selectors in Selenium](https://medium.com/@iamfaisalkhatri/understanding-css-selectors-in-selenium-pcloudy-blog-3e4b09672264)
- [End to End testing using Selenium WebDriver and Java](https://medium.com/@iamfaisalkhatri/end-to-end-testing-using-selenium-webdriver-and-java-4ff8667716ca)
- [Writing Selenium Web Automation tests in Fluent way!](https://medium.com/@iamfaisalkhatri/writing-selenium-web-automation-tests-in-fluent-way-864db95ee67a)
Expand All @@ -44,15 +47,16 @@
- [How to Automate ServiceNow with Selenium](https://medium.com/@iamfaisalkhatri/how-to-automate-servicenow-with-selenium-511e41172161)
- [Cross browser testing in Selenium WebDriver](https://medium.com/@iamfaisalkhatri/cross-browser-testing-in-selenium-webdriver-pcloudy-blog-46e9d70fa13a)
- [How to Handle ElementClickInterceptedException in Selenium Java](https://www.lambdatest.com/blog/elementclickinterceptedexception-in-selenium-java/)
- [How to Use @FindBy Annotation in Selenium Java](https://www.lambdatest.com/blog/findby-annotation-selenium-java/)

## :movie_camera: Tutorial Videos

[![Watch the video](https://img.youtube.com/vi/bhZX7apMqR8/hqdefault.jpg)]( https://www.youtube.com/live/bhZX7apMqR8?si=4n0u5YiMuz5vTiHd)
[![Watch the video](https://img.youtube.com/vi/uHLYoJmZxWc/hqdefault.jpg)](https://youtu.be/uHLYoJmZxWc?si=3nevAn0Z3QZycdG8)
[![Watch the video](https://img.youtube.com/vi/_hlXjVTa-jo/hqdefault.jpg)](https://youtu.be/_hlXjVTa-jo?si=PfOfU7ihb8eEgduh)
[![Watch the video](https://img.youtube.com/vi/sVBgpz1z9Ts/hqdefault.jpg)]( https://youtu.be/sVBgpz1z9Ts?si=azE1_vquOwT9jFT1d)



## End-to-End Tests for OWASP-Juice-Shop

- End-to-End tests for Juice Shop Website are running on `http://localhost:3000` inside the container in GitHub actions.
Expand Down
13 changes: 13 additions & 0 deletions docker-compose-v3-seleniumgrid-m2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ services:
- SE_NODE_MAX_SESSIONS=1
# - SE_NODE_SESSION_TIMEOUT=180

edge:
image: selenium/node-edge:latest
shm_size: 2gb
depends_on:
- selenium-hub
environment:
- SE_EVENT_BUS_HOST=selenium-hub
- SE_EVENT_BUS_PUBLISH_PORT=4442
- SE_EVENT_BUS_SUBSCRIBE_PORT=4443
- SE_NODE_MAX_INSTANCES=1
- SE_NODE_MAX_SESSIONS=1
# - SE_NODE_SESSION_TIMEOUT=180

selenium-hub:
image: seleniarm/hub:latest
container_name: selenium-hub
Expand Down
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.java.version>4.17.0</selenium.java.version>
<selenium.java.version>4.18.1</selenium.java.version>
<testng.version>7.9.0</testng.version>
<webdrivermanager.version>5.6.3</webdrivermanager.version>
<webdrivermanager.version>5.7.0</webdrivermanager.version>
<commons-io.version>2.15.1</commons-io.version>
<log4jcore.version>2.20.0</log4jcore.version>
<log4japi.version>2.20.0</log4japi.version>
<orgjson.version>20240205</orgjson.version>
<seleniumdevtools.version>4.17.0</seleniumdevtools.version>
<lombok.version>1.18.30</lombok.version>
<log4jcore.version>2.23.1</log4jcore.version>
<log4japi.version>2.23.1</log4japi.version>
<orgjson.version>20240303</orgjson.version>
<seleniumdevtools.version>4.18.1</seleniumdevtools.version>
<lombok.version>1.18.32</lombok.version>
<datafaker.version>2.1.0</datafaker.version>
<maven-enforcer-plugin.version>3.4.1</maven-enforcer-plugin.version>
<maven.compiler.version>3.12.1</maven.compiler.version>
<maven.compiler.version>3.13.0</maven.compiler.version>
<surefire-version>3.2.5</surefire-version>
<java.release.version>17</java.release.version>
<maven.source.encoding>UTF-8</maven.source.encoding>
Expand All @@ -37,7 +37,7 @@
<sonar.java.libraries>target/classes/**</sonar.java.libraries>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/target/site/jacoco/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
<sonar.java.source>15</sonar.java.source>
<sonar.java.source>17</sonar.java.source>
<jacoco.version>0.8.11</jacoco.version>
<sonarjacocolistener.version>5.14.0.18788</sonarjacocolistener.version>
<sonarmavenplugin.version>3.10.0.2594</sonarmavenplugin.version>
Expand Down
2 changes: 1 addition & 1 deletion test-suite/testng.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<suite-file path="testng-saucedemo.xml"/>
<suite-file path="testng-theinternet.xml"/>
<suite-file path="testng-juice-shop.xml"/>
<suite-file path="testng-lambdatestecommerce.xml"/>
<suite-file path="testng-seleniumgrid-theinternet.xml"/>
<suite-file path="testng-lambdatest-selenium-playground.xml"/>
<!-- <suite-file path="testng-seleniumgrid-juiceshop.xml"/>-->
<!-- <suite-file path="testng-lambdatestecommerce.xml"/>-->
</suite-files>
</suite> <!-- Suite -->

0 comments on commit 230961d

Please sign in to comment.