別の要素の後に要素を取得することは可能ですか? (サブエレメントではない)
HTML コード:
<input id="first-input" type="text"/>
<ul>
<li>1</li>
<li>2</li>
</ul>
<input id="second-input" type="text"/>
<ul>
<li>1</li>
<li>2</li>
</ul>
<input id="third-input" type="text"/>
<ul>
<li>1</li>
<li>2</li>
</ul>
どうすればul
次のものを入手できますelement(by.id('second-input'))
か?
これが私の理解です:
element(by.id('second-input')).element(by.tagName('ul')) // This doesn't work because this looks for sub-elements in <input id="second-input">
element.all(by.tagName('ul')).first() // This doesn't work because it gets the 'ul' following <input id="first-input">
element(by.id('second-input')).element.all(by.tagName('ul')) // This doesn't work because this looks for all 'ul' elements as sub-elements of <input id="second-input">
私の場合、これらの「ul」には一意の ID や一意のものはありません。