Skip to content

Commit 1c88e8f

Browse files
committed
Update SeleniumBase tour_helper
1 parent 7b2a0e6 commit 1c88e8f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

seleniumbase/core/tour_helper.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def play_hopscotch_tour(
486486
now_ms = time.time() * 1000.0
487487
if now_ms >= stop_ms:
488488
if current_step == latest_step:
489-
driver.execute_script("return $tour.nextStep()")
489+
driver.execute_script("$tour.nextStep()")
490490
try:
491491
latest_step = driver.execute_script(
492492
"return $tour.getCurrStepNum()")
@@ -604,7 +604,10 @@ def play_introjs_tour(
604604
now_ms = time.time() * 1000.0
605605
if now_ms >= stop_ms:
606606
if current_step == latest_step:
607-
driver.execute_script("return $tour.nextStep()")
607+
try:
608+
driver.execute_script("$tour.nextStep()")
609+
except Exception:
610+
driver.execute_script("$tour.exit()")
608611
try:
609612
latest_step = driver.execute_script(
610613
"return $tour._currentStep")

0 commit comments

Comments
 (0)