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:
"//div[@id='instructions']//ol[@id='inst']"
但是,我所拥有的 OL 标签可以是 OL 或 UL。
不知道该怎么做。
您可以使用以下内容同时匹配ul和 ol:
//div[@id='instructions']//ol[@id='inst'] | //div[@id='instructions']//ul[@id='inst']