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 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/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..876dd73 100644 --- a/selenium-3/lambdatest.py +++ b/selenium-3/lambdatest.py @@ -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")