0

I'm trying to identify the following div in a Liferay website. Liferay/primefaces dynamically changes the ID elements so we selenium testers cannot use them for our webdriver scripts.

I'm trying to find a cssSelector to identify this specific div:

<div class="ui-cell-editor-output" id="aui_3_4_0_1_1574">Test Org</div>

This css statement

div.ui-cell-editor-output

yields too many other hits to be usful.

Arun Bertil
  • 4,598
  • 4
  • 33
  • 59
Ralph737
  • 11
  • 4
  • try to use contextual information like `nth-child`, sibling selector adjacent selector and so on, it should be done – Nikos M. May 18 '15 at 23:04
  • Or you could just add an extra class to the elements you wish to select: `class="ui-cell-editor-output MyVeryOwnSelectorClass"` – icecub May 18 '15 at 23:07
  • I'm QA not development so I can't add anything to the code :-( – Ralph737 May 18 '15 at 23:31
  • @Nikos M I can go the nth-child method, but the list has about 50 names and they change often, so grabbing the name I want by index will eventually break when the list changes again...but maybe I have no other choice? – Ralph737 May 18 '15 at 23:34
  • You most likely need javascript or jquery to achieve this, so I changed the tags for you – Kukeltje May 19 '15 at 05:24

0 Answers0