I wanna know is it possible to find element using xpath for part of class name value? I mean sometimes one element have many classes like below:
<p class="SnippetBodyStyles__MainInfo-sc-1asbgpf-4 fBmSdW">bla bla bla</p>
and i want to find element by one of this class.
So tag p relate to two classes:
Is it possible to find p tag using this xpath like text contains:
p[@class[text(),[contains(,"fBmSdW")]]]
?
Yes, try the below xpath expression
//p[contains(@class,"fBmSdW")]