selenium icon indicating copy to clipboard operation
selenium copied to clipboard

Browser interaction not works on print page view

Open mrSingh007 opened this issue 9 years ago • 4 comments

I have one step which click on one button who just bring print view of page. After opening this page, next step is not being executed. Thread waiting somewhere and then it gets time out.

To reproduce issue:

  1. write a step which execute this javaScript --> window.print(); (or just open chrome driver and on console enter window.print(); then a Print view page should open)
  2. write any another step after fist one. Now executor, will execute first step will take too much time (timeout) to another step.

Expected On print view page, all the dom element should be intractable.

Environment OS: Linux version.org.seleniumhq.selenium.selenium-firefox-driver = 3.0.1 version.org.seleniumhq.selenium.selenium-java = 3.0.1 version.org.seleniumhq.selenium.selenium-support = 3.0.1 version.junit.junit = 4.+

I also tested with Image(s): selenium/node-chrome-debug 3.5.3, selenium/hub 3.5.3 Docker Version: 17.07.0-ce OS: Linux seleniumVersion = 2.53.1 htmlUnitDriverVersion = 2.52.0 jUnitVersion = 4.12 serenityVersion = 1.4.1-rc.7 serenityJiraVersion = 1.1.3-rc.5

mrSingh007 avatar Nov 02 '17 11:11 mrSingh007

It might possible that Selenium don't have feature to interact with chrome urls (e.g chrome://print/pdf_preview.html?chrome://print/11/0/print.pdf). Because as you type window.print(); in console, a new popup tab is get opened, which have not only different dom elements as normal page but also different window.location.

mrSingh007 avatar Nov 02 '17 11:11 mrSingh007

Yes. On Chrome when you click on Print, it will open a new tab. Are you switching tabs accordingly in your code?

AdvanceAutomation avatar Nov 07 '17 18:11 AdvanceAutomation

@khalistan Chrome's built in PDF viewer is not supported

lmtierney avatar Nov 07 '17 18:11 lmtierney

Maybe try AutoIt

nilknarf52 avatar Nov 08 '17 12:11 nilknarf52