From 0fe1f8f93c0484b0c49babfea0a2ae477d7d5d49 Mon Sep 17 00:00:00 2001 From: aryanc Date: Mon, 27 Oct 2025 18:53:10 +0530 Subject: [PATCH 1/3] Updated the selenium and urllib3 version to latest and checked the url in selenium 3 lamdatest.py file --- requirements.txt | 4 ++-- selenium-3/lambdatest.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.txt b/requirements.txt index 34a53b7..c5e072c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ -urllib3==1.26.5 -selenium==4.25.0 \ No newline at end of file +urllib3==2.5.0 +selenium==4.38.0 \ No newline at end of file diff --git a/selenium-3/lambdatest.py b/selenium-3/lambdatest.py index cdd8558..e712442 100644 --- a/selenium-3/lambdatest.py +++ b/selenium-3/lambdatest.py @@ -49,7 +49,7 @@ def test_demo_site(self): # Url print("Loading URL") driver.get( - "https://lambdatest.github.io/sample-todo-app/" + "https://stage-lambda-devops-use-only.lambdatestinternal.com/To-do-app/index.html" ) # Let's click on a element From 9ec35a5f1d323478c9b725d03c3866bf460c1d73 Mon Sep 17 00:00:00 2001 From: aryanc Date: Mon, 27 Oct 2025 18:56:53 +0530 Subject: [PATCH 2/3] Updated the selenium and urllib3 version to latest and checked the url in selenium 3 lamdatest.py file --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2100098 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +venv +.idea +DS_Store From 24bf93045d4c5c13f183ad566a9a2381ff37e299 Mon Sep 17 00:00:00 2001 From: aryanc Date: Tue, 28 Oct 2025 15:30:37 +0530 Subject: [PATCH 3/3] Updated the url to prod and changed the locator --- lambdatest.py | 7 +++---- selenium-3/lambdatest.py | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lambdatest.py b/lambdatest.py index b6dfaf2..1118884 100644 --- a/lambdatest.py +++ b/lambdatest.py @@ -57,7 +57,7 @@ def test_demo_site(self): # Url print("Loading URL") driver.get( - "https://stage-lambda-devops-use-only.lambdatestinternal.com/To-do-app/index.html" + "https://lambdatest.github.io/sample-todo-app/" ) # Let's click on a element @@ -76,14 +76,13 @@ def test_demo_site(self): print("Added LambdaTest checkbox") # print the heading - search = driver.find_element(By.CSS_SELECTOR, ".container h2") + search = driver.find_element(By.XPATH, "//h1[contains(@class,'font-bold')]") assert search.is_displayed(), "heading is not displayed" print(search.text) search.click() driver.implicitly_wait(3) - # Let's download the invoice - heading = driver.find_element(By.CSS_SELECTOR, ".container h2") + heading = driver.find_element(By.XPATH, "//h1[contains(@class,'font-bold')]") if heading.is_displayed(): heading.click() driver.execute_script("lambda-status=passed") diff --git a/selenium-3/lambdatest.py b/selenium-3/lambdatest.py index e712442..876dd73 100644 --- a/selenium-3/lambdatest.py +++ b/selenium-3/lambdatest.py @@ -49,7 +49,7 @@ def test_demo_site(self): # Url print("Loading URL") driver.get( - "https://stage-lambda-devops-use-only.lambdatestinternal.com/To-do-app/index.html" + "https://lambdatest.github.io/sample-todo-app/" ) # Let's click on a element @@ -65,14 +65,13 @@ def test_demo_site(self): print("Added LambdaTest checkbox") # print the heading - search = driver.find_element(By.CSS_SELECTOR, ".container h2") + search = driver.find_element(By.XPATH, "//h1[contains(@class,'font-bold')]") assert search.is_displayed(), "heading is not displayed" print(search.text) search.click() driver.implicitly_wait(3) - # Let's download the invoice - heading = driver.find_element(By.CSS_SELECTOR, ".container h2") + heading = driver.find_element(By.XPATH, "//h1[contains(@class,'font-bold')]") if heading.is_displayed(): heading.click() driver.execute_script("lambda-status=passed")