Reading title tag in svg?
问题 How do I read the text in below? svg seems to be a special case. Tried the below, but of no help //*[name()='svg']/title //*[name()='svg' and @title='Test'] //*[name()='svg' and contains(@title,'Test')] <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 137 125" version="1.1"> <title>Test</title> <desc>Created with Sketch.</desc> 回答1: To extract the text from the <title> tag within the svg WebElement you can use either of the following Locator Strategies: Using