#### in this case after `<some-component>` html element is lot of tags inbetween. We skip them by `//li` and search only `<li>` that has a given string `//some-component//li`. For some tags (`span`, `a`, `button`) has direct `text()` working but for `<li>` `text()` returns `undefined`. Two solutions in b) and c)
a) `//some-component/li/span[text() = "' + name + '"];`
b) `//some-component/li[text()[contains(.,"'+ name +'")]];`
c) `//some-component/li[contains(., "'+ name +'")];`
#### if there is more nesting below `<li>` to get text from last `<li>` element we can use:
`//some-component//li[text()[contains(text(), "' + name '")]];`
#### remove unnecesary space in `span`, `a` text element
`//td[@class='score-time status']/a[normalize-space() = '16 : 00']`
#### other search by input value
`//button[@value='press me']`
#### other search by class name
`//div[contains(@class, "' + name + '")];`
#### find parent of element
a) `//div/span[contains(text(), 'XYZ')]/.. //div`
b) `//div/span/li/a/ancestor::div` //more specific
#### find by comments in html with string
`//ul/li/comment()[contains(., 'item in $select.items')]`
#### get div with attribute
`//div/@some-attribute-name` //cannot select more elements after this selection
`//div[@some-attribute-name="value"]//h3/span`
#### select next `div` sibling
`//div[text() = ' Color Digest ']/following-sibling::div`
#### select given element from list
`//ol[contains(@id, "autocomplete-view")][1]` - usually works but if cannot find another than first element use:
`(//ol[contains(@id, "autocomplete-view")])[1]`