How can I get <a> element that no having some property?


#1

How can I get <a> element that no having [title property] and no having [css property] with CSS Selector Editor

I want get only (O) <a> element

<a href="abcd"> (O)
<a href="abcd1">(O)
<a href="abcd2" css="acde">(X)
<a href="abcd3" title="cedd">(X)

how can i modify it?
Please help me!

div[id="myid"] > ul> li > div > ul > li > a
 ==> ???

#2

There is no CSS selector that selects for text. It has been a proposal for a while but it has yet to materialize.

You can use:

  1. xpath
  2. The jQuery :contains filter
  3. WebUI.getText

https://api.jquery.com/contains-selector/


#3

Sorry, but My question is how to get a list of elements that do not have [css] attribute and do not have [title] attribute.
can you help me?


#4

There is no such attribute.

I don’t know of any way to use WebUI API to ask for elements without a specific attribute. You could write some JavaScript/jQuery to do it.


#5

This would be really easy to accomplish with xpath:

//a[not(@css) and not(@title)]


#6

Thank you for your help
I got it using Xpath as you explained.