-1

So I'm writing a watir-webdriver test script, and my webpage is using javascript:window.print to present a modal window that I want to interact with. When I click the link that presents the modal window, watir-webdriver just sits there until eventually it times out and i see a Timeout::Error on the console window. This is before attempting to interact with the new window at all. how do I tell it to move on without waiting?

After that whole execution is not responsive. Its not proceeding with next execution it gets struck there. tried the below solution too

element.focus element.send_keys :return

but no luck, Could anyone know how to resolve this modal dialogbox from webpage.

Thanks get

Geet
  • 1
  • I am using Firefox with Watir-webdriver. browser.a:(:href => 'javascript:window.print()').click this opens the Print dialog box. Which is the normal print dialog box from teh Firefox browser. It just waits here and doesn't execute anything after that till i click manually or it timesout. – Geet Nov 10 '14 at 17:10
  • Handling of the print dialog is not possible with Selenium as mentioned in this other question [How to handle print dialog in Selenium?](http://stackoverflow.com/questions/11537103/how-to-handle-print-dialog-in-selenium). – Justin Ko Nov 10 '14 at 17:23
  • I am not using selenium i am using Ruby with Watir webdriver – Geet Nov 12 '14 at 18:13
  • 1
    Watir-WebDriver interacts with browsers by using Selenium-WebDriver. As a result, Watir-WebDriver's functionality is basically limited to what Selenium-WebDriver can do. – Justin Ko Nov 12 '14 at 18:17
  • Thanks Justin, Could also let me know how can i handle this dialog box then. – Geet Nov 14 '14 at 17:15
  • If you are on Windows, you could use something like [RAutomation](https://github.com/jarmo/RAutomation). – Justin Ko Nov 14 '14 at 17:38

1 Answers1

0

I am using Firefox with Watir-webdriver.

browser.a:(:href => 'javascript:window.print()').click

this opens the Print dialog box. Which is the normal print dialog box from teh Firefox browser.

It just waits here and doesn't execute anything after that till i click manually or it timesout.

everton
  • 7,579
  • 2
  • 29
  • 42
Geet
  • 1