I'm testing a gwt webapp. In the process of making my selenium test as dynamic as possible, I've run into a wall. The element comes from a page which has a popup which also has a popup which has a dropdown that contains the element. The problem is that the element is out of view so I can not click the element.
Not Trying To Scroll The Body Of The Page
I need to scroll the element into view, while some how incorporating this find element by xpath: driver.findElement(By.xpath("//*[contains(text(), 'NO')]")).an_action();
Using "contains" is a very important in making this test dynamic.
Here's the HTML of the part I'm trying to control:
<div id="x-auto-908" class="x-combo-list x-ignore x-component x-border " role="presentation" style="border-width: 1px; z-index: 1565; visibility: visible; height: 298px; width: 104px; left: 670px; top: 94px;">
<div id="x-auto-740" class=" x-view x-combo-list-inner x-component x-unselectable" tabindex="0" hidefocus="true" style="overflow-x: hidden; padding: 0px; border-width: 0px; height: 298px; width: 104px;" unselectable="on">
<div class="x-combo-list-item " role="listitem">--</div>
<div class="x-combo-list-item" role="listitem">AL</div>
<div class="x-combo-list-item " role="listitem">AR</div>
<div class="x-combo-list-item" role="listitem">CO</div>
<div class="x-combo-list-item" role="listitem">FL</div>
<div class="x-combo-list-item " role="listitem">FL</div>
<div class="x-combo-list-item " role="listitem">GA</div>
<div class="x-combo-list-item " role="listitem">HH</div>
<div class="x-combo-list-item" role="listitem">IA</div>
<div class="x-combo-list-item " role="listitem">ID</div>
<div class="x-combo-list-item " role="listitem">IL</div>
<div class="x-combo-list-item " role="listitem">IN</div>
<div class="x-combo-list-item x-view-highlightrow x-combo-selected" role="listitem">KK</div>
<div class="x-combo-list-item" role="listitem">KS</div>
<div class="x-combo-list-item" role="listitem">LA</div>
<div class="x-combo-list-item" role="listitem">LL</div>
<div class="x-combo-list-item" role="listitem">MI</div>
<div class="x-combo-list-item" role="listitem">MM</div>
<div class="x-combo-list-item" role="listitem">MN</div>
<div class="x-combo-list-item" role="listitem">MO</div>
<div class="x-combo-list-item" role="listitem">MS</div>
<div class="x-combo-list-item" role="listitem">MT</div>
<div class="x-combo-list-item" role="listitem">NC</div>
<div class="x-combo-list-item" role="listitem">NE</div>
<div class="x-combo-list-item" role="listitem">NJ</div>
<div class="x-combo-list-item" role="listitem">NM</div>
<div class="x-combo-list-item" role="listitem">NO</div>
<div class="x-combo-list-item" role="listitem">NV</div>
<div class="x-combo-list-item " role="listitem">OH</div>
<div class="x-combo-list-item" role="listitem">OK</div>
<div class="x-combo-list-item" role="listitem">OR</div>
<div class="x-combo-list-item" role="listitem">PA</div>
<div class="x-combo-list-item" role="listitem">SC</div>
<div class="x-combo-list-item" role="listitem">TN</div>
<div class="x-combo-list-item" role="listitem">TX</div>
<div class="x-combo-list-item" role="listitem">VA</div>
<div class="x-combo-list-item" role="listitem">WA</div>
<div class="x-combo-list-item" role="listitem">WI</div>
<div class="x-combo-list-item" role="listitem">WW</div>
<div class="x-combo-list-item" role="listitem">WY</div>
<div class="x-combo-list-item" role="listitem">ZZ</div>
</div>
I believe the problem is gwt using iframe.