Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
クラスとテキストで xpath 内のすべての要素を検索したい。私はこれを試しましたが、うまくいきません。
//*[contains(@class, 'myclass')]//*[text() = 'qwerty']
「myclass」のクラスを持ち、テキストが「qwert」であるすべての要素を見つけようとしています (これらはスパン要素になります)
//span[contains(@class, 'myclass') and text() = 'qwerty']
また
//span[contains(@class, 'myclass') and normalize-space(text()) = 'qwerty']