0

I'm trying to automate testing of the built-in Chrome PDF viewer, specifically, accessing the Download button on the PDF viewer toolbar. The crux of the problem is accessing the correct DOM. I've identified 2 different DOMs.

When I'm on the opened PDF tab and click the 3 dots at the top of the browser, then More Tools > Developer Tools, dev tools comes up in the side panel with a DOM similar to this:

<body style="height: 100%; width: 100%; overflow: hidden; margin:0px; background-color: rgb(82, 86, 89);">
  <embed name="7AC33340D20DFBA6C79709A5C2767923" style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="about:blank" type="application/pdf" internalid="7AC33340D20DFBA6C79709A5C2767923" />
</body>

When I right click anywhere in the rendered PDF or chrome of the viewer itself (left navigation panel, toolbar) and choose Inspect, dev tools is opened in a separate window with a different DOM that includes all of the chrome elements (nav, toolbar), as well as the embedded PDF file.

When I try to access the chrome using WebDriver IO, I can only see the "outer" DOM, not the full PDF viewer UI. Is there a way to get to that?

1
  • @KJ, thanks for the insights, but it still seems like there should be a way to get to that nested DOM. Commented Jan 8 at 17:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.