Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

How can I use Selenium to scroll within a Javascript applet embedded inside a page with no html-accessible scrollbar?

$
0
0

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 and ENTER in various combinations with partial success on various machines, but nothing reliable.
  • Using Java's Robot to get the mouse to scroll using the mouseWheel() method after moving the cursor to focus over the inner window, with no success.

Any help would be greatly appreciated.

Thank you!


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>