See screenshot to understand the context.
Dear smart humans,
I am attempting to get Selenium to select a series of 15 checkboxes, however, only the first eight are visible before scrolling is necessary.
I am trying with no luck to get Selenium to scroll within this dynamically generated JavaScript window embedded into a webpage. The problem is that the inner window's scrollbar doesn't have any html representation, because it is an object within an embedded applet.
No scrollIntoView()
type solution has worked, because the checkboxes don't exist before they are dynamically loaded once scrolling happens.
The way that a human user would scroll the inner window would be either by:
- Focusing the cursor in the inner window and scrolling the mouse wheel down
- Clicking and holding on the down arrow in the embedded scrollbar (which has no html representation)
- Dragging the embedded scrollbar (which has no html representation) downwards
I have tried using JavascriptExecutor
solutions such as scrollTo
and scrollTop
with no luck.
I have tried workarounds such as:
- Invoking keypresses such as
ARROW_DOWN
,PAGE_DOWN
andENTER
in various combinations with partial success on various machines, but nothing reliable. - Using Java's
Robot
to get the mouse to scroll using themouseWheel()
method after moving the cursor to focus over the inner window, with no success.
Any help would be greatly appreciated.
Thank you!