-1

what is the correct way for me to select "Skip" button or navigate the tooltip element if I have one page that is written with intro.js, http://introjs.com/? I have tried to use following code. but selenium webdrive return exception for overlay.

Modify the question with answer, after changing small text. no probkem for me anymore

from selenium import webdriver
driver = webdriver.Chrome()
driver.get('http://introjs.com')

driver.find_element_by_xpath('//div//i[@id="tour-help-icon"]').click()
driver.find_element_by_xpath('//div//a[.="Skip"]').click()
jacobcan118
  • 7,797
  • 12
  • 50
  • 95

3 Answers3

1

SKIP is case sensitive. Please try to change the case exactly what is there in the application. I am assumming, the skip button is same as in the attached screenshot.

Sample page

The code to click on the skip the buttion is given below.

driver.find_element_by_xpath('//a[.="Skip"]').click
Murthi
  • 5,299
  • 1
  • 10
  • 15
0

I have just checked this page http://introjs.com/. I don't see any SKIP button.

You have given the xpath as:

driver.find_element_by_xpath('//a[.="SKIP"]').click

That means there should be a link on the page with text "SKIP" and on clicking the link, you should be navigated to a path which should be also mentioned in the href attribute of the anchor tag.

It will be great if you can provide the HTML for this element.

Monika
  • 714
  • 1
  • 4
  • 10
0

Don't try to click Skip button directly. First, click the "Demo" button and then " Skip" button.

Unless you click the Demo button, the tooltip buttons for Intro.js will not be visible:

Try this:

driver.find_element_by_xpath("//a[contains(.,'Demo') and @class='button button-primary']").click driver.find_element_by_xpath('//a[.="Skip"]').click

Monika
  • 714
  • 1
  • 4
  • 10