Gaurav
Gaurav

Reputation: 111

Need to select rows from Web Table

I have a web table, which is showing some data based on some search filter criteria. So in actual we have total-50 rows. But after applying filter only 1 is visible on the table. Here the problem is, in DOM it's showing all 50 rows including that 1 which is visible.

<table-row style="height: 32px; line-height: 32px; transform: translateY(0px);">
<table-row style="height: 12px; line-height: 12px; transform: translateY(32px); display:none;">
<table-row style="height: 12px; line-height: 12px; transform: translateY(38px); display:none;">
<table-row style="height: 12px; line-height: 12px; transform: translateY(41px); display:none;">

Now the only option i have is to use this display part of attribute-"style"I As i want only those rows, which doesn't contain this display option none in their style attribute am trying a xpath like- below but it's not working`

//table-row[not(contains(@style,'%display: none%')]

Upvotes: 1

Views: 117

Answers (1)

JaSON
JaSON

Reputation: 4869

You need to remove those leading and trailing % symbols and add closing bracket:

//table-row[not(contains(@style,'display:none;'))]

Upvotes: 1

Related Questions