-1
http://www.m2sys.com/wp-content/uploads/2014/04/Learn-More-btn-new2.png。我想用selenium python測試這個網站的圖像按鈕,但它失敗了。什麼是圖像源的xpath?selenium python webdriver xpath error
http://www.m2sys.com/wp-content/uploads/2014/04/Learn-More-btn-new2.png。我想用selenium python測試這個網站的圖像按鈕,但它失敗了。什麼是圖像源的xpath?selenium python webdriver xpath error
最簡單的方法是使用xpath的contains
方法。
//img[contains(@src, 'Learn-More-btn-new2.png')]
xpath
爲LEARN MORE
按鈕將是:
//img[@src='http://www.m2sys.com/wp-content/uploads/2014/04/Learn-More-btn-new2.png']