I am not familiar with both HTML and Xpath so I am not sure whether I specified my question correctly. I use Selenium to scrape some data from certain websites (link). I figured out, that for some reason name of the class I interested in differs from page to page, however, this class contains a child node that in its turn contains a button. This button has the same text inside for all pages ("aplikuj"
, since sometimes appear another button with "aplikuj"
inside I decided to add some RegEx "^aplikuj$"
). My question is: How can I find parent class name knowing that its child node contains a button with particular text inside ("^aplikuj$"
). As on the image below, I am looking for the "col-box ego-box-tabs-border box-info"
class name (which will differ from page to page).
Updated: I want to extract text inside of <p>
tags of "col-box ego-box-tabs-border box-info"
class