I'm running a code that navigates through folders, arrives at a destination and downloads the file by simply clicking on it. For example, to find a folder, I'm using the below code:
find_element_by_link_text("Pricing and Catalogs")
The problem is that the folder sometimes isn't written exactly like that. For example, it has double spaces. So, i'm wondering if its possible to find an element by text that contains certain words? Something like below code:
find_element_by_link_text(containing "Pricing" and "Catalogs")
This is the html code:
<td class="ms-tv-item ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView_2" style="white-space:nowrap;"><a class="ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView_0 ms-tv-item ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeView_1" href="javascript:_spNavigateHierarchy(this,'','TAKES YOU TO SOME PAGE',false,'FolderNode', '')" title="Pricing and Catalogues" id="ctl00_PlaceHolderLeftNavBar_ctl02_WebTreeViewt223" style="border-style:none;font-size:1em;">Pricing and Catalogues</a></td>