Selenium - AJAX dialog box - how to scroll inside it?
I am using Selenium IDE to t开发者_StackOverflow中文版est a web application. One page creates a simple jQuery Dialog with some extra content in there. The dialog has a fixed height and frequently there is a need to scroll down vertically to show the extra content.
Is there anyway to get Selenium to scroll this dialog box so that a certain element is in view? (scrolling to the bottom of the dialog would also be a solution)
I am using Selenium IDE 1.0.10
Although the selenium test still works without the scrolling, we automatically run the tests as part of our build process. If there's an error we take a screen shot, to aid debugging. If the test could scroll then this would make the screenshot much more valuable.
Have you tried out something along these lines already?:
<tr>
<td>waitForPopUp</td>
<td>popupID</td>
<td></td>
</tr>
<tr>
<td>selectPopUp</td>
<td>popupID</td>
<td></td>
</tr>
<tr>
<td>windowFocus</td>
<td></td>
<td></td>
</tr>
<tr>
<td>runScript</td>
<td></td>
<td>selenium.browserbot.getCurrentWindow().scrollTo(300,200)</td>
</tr>
<tr>
<td>captureEntirePageScreenshot</td>
<td></td>
<td></td>
</tr>
精彩评论