English 中文(简体)
用于 Java 代码的 Xpath 表达式
原标题:Get result with Xpath Expression to be used in java code
I m unsure why I am not receiving a result for the xpath expression in the image below. I am trying to select the tag to execute a test step in my Selenium Java test script. I have tried every identifier in the circle tag and got the same issue. If you try the my xpath expression below again with a different tag, for example
I receive a result. I was expecting to receive a singularly unique expression to select an item on a webpage using Java and Selenium in my automated test. I have tried multiple expression but to no success.
问题回答
Try this instead: //*[local-name()= circle ][@class="sapMRbBOut"] SVG elements are not part of the html namespace and need to be accessed by other means (i.e. using local-name()). If you wish dig deeper to understand more here a good place to start is the html spec on embedded content: here




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...