how to handle dropdown wrapper instead of real dropdown element?

12 views
Skip to first unread message

medv...@gmail.com

unread,
Sep 21, 2017, 7:05:47 AM9/21/17
to Geb User Mailing List
hi,
can please anybody give me a hint how to select any item from this dropdown wrapper?

<div class="dropdown-wrapper">
<div class="dropdown-container js-init-dropdown-cont dropdown-container--state-activedata-filter-id="">
<div class="drop-initial">Hersteller</div>
<div class="down-icon"/>
<div class="drop-content">
<ul>
<li>Hersteller</li>
<li class="js-select-filter select-buttondata-filter-url="/shop/hardware/komponenten/speicher--10002008--c/Verbatim">Verbatim</li>
<li class="js-select-filter select-buttondata-filter-url="/shop/hardware/komponenten/speicher--10002008--c/Sony">Sony</li>
<li class="js-select-filter select-buttondata-filter-url="/shop/hardware/komponenten/speicher--10002008--c/SanDisk">SanDisk</li>
<li class="js-select-filter select-buttondata-filter-url="/shop/hardware/komponenten/speicher--10002008--c/Lenovo">Lenovo</li>
<li class="js-select-filter select-buttondata-filter-url="/shop/hardware/komponenten/speicher--10002008--c/Kingston">Kingston</li>

it is no real dropdown element with the usual option value.

somehow I cannot access or click
$("li", 'data-filter-url':"/shop/hardware/komponenten/speichermedien--10002009--c/Kingston")
 
thank you very much for any hint!

David Lumpkin

unread,
Sep 22, 2017, 11:43:43 AM9/22/17
to Geb User Mailing List
Without knowing more about the javascript and CSS on the page it's hard to say, but you may have to click the dropdown-container before the individual li elements are clickable. You could also try using a javascript click with code like this:

js.exec( "$('[data-filter-url=/shop/hardware/komponenten/speicher--10002008--c/Kingston').click()" )
Reply all
Reply to author
Forward
0 new messages