Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Commit 5301c4a

Browse files
Merge pull request #164 from IBM/development
promote to master
2 parents f7a09c3 + be57166 commit 5301c4a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎scripts/experience_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from selenium import webdriver
33
from selenium.webdriver.chrome.options import Options
44
from selenium.webdriver.common.keys import Keys
5+
from selenium.webdriver.common.by import By
56

67
# Do an action on the app's landing page
78
options = Options()
@@ -13,7 +14,7 @@
1314
time.sleep(3)
1415

1516
# Verify the expected content is present
16-
title_text = driver.find_elements_by_xpath('//h1')[0].text
17+
title_text = driver.find_elements(By.XPATH, '//h1')[0].text
1718
if len(title_text) == 0:
1819
sys.exit("Experience Test Failed: no title texts found")
1920
else:
@@ -23,7 +24,7 @@
2324
else:
2425
sys.exit("Experience Test Failed: unexpected subtitle text {}".format(title_text))
2526

26-
subtitle_text = driver.find_elements_by_xpath('//h2')[0].text
27+
subtitle_text = driver.find_elements(By.XPATH, '//h2')[0].text
2728
if len(subtitle_text) == 0:
2829
sys.exit("Experience Test Failed: no subtitle texts found")
2930
else:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /