1

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%')]
1
  • Are you sure that your HTML looks like that? I don't see the closing tags (</table-row >) Commented Nov 11, 2020 at 8:35

1 Answer 1

1

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

//table-row[not(contains(@style,'display:none;'))]
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for the response. It has resolved my query. There was a space , i just removed it and it worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.