click the print button in the iframe. (selenium)

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
chngrcn
Posts: 190
Joined: 29 Feb 2016, 08:55

click the print button in the iframe. (selenium)

21 Sep 2018, 01:08

Code: Select all

<iframe id="formId:tescilliAracIslemComponent:j_idt704" width="700" height="550" allowfullscreen="" webkitallowfullscreen="" src="/javax.faces.resource/documentviewer/pdfviewer.html.xhtml?ln=primefaces-extensions&v=6.1&v=6.1&file=%2Fjavax.faces.resource%2Fdynamiccontent.properties.xhtml%3Fln%3Dprimefaces%26v%3D6.1%26v%3D6.1%26pfdrid%3D3e9281c9c6a85b92e4e6158a78168a1a%26pfdrt%3Dsc%26pfdrid_c%3Dfalse%26uid%3D8181b897-f697-49e1-a031-3d1de5faff84%26download%3Dnull#locale=tr"></iframe>


<button id="print" class="toolbarButton print hiddenMediumView" title="Yazdır" tabindex="33" data-l10n-id="print">
                  <span data-l10n-id="print_label">Yazdır</span>
                </button>

There is a "print" button in the iframe window. How can I click with selenium java code?
That's the code I used.

Code: Select all

loaded := false
While !loaded
{
    try
    {
             
       if driver.executeScript("return document.parentWindow.frames['formId:tescilliAracIslemComponent:j_idt704'].document.getElementById('print').click()")
          loaded := true
    }
    Sleep 10
}

Where do I make a mistake?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: OrangeCat and 297 guests