Today, when I was working on an automated office program, I found a problem. I want to query [sender city] and [recipient city] under a certain website of the company, but there may be one page or multiple pages. I want to locate The first one, and get the second [span] under the node at the same level, as shown in the figure below.
So I used keywords to locate elements, and it worked!
(//div//span[contains(text(),"寄方城市")])
Then I succeeded in positioning, but I want to get the second span under the node of the same level