But issue is that if am using the above code, a save as dialogue box
will open (please see the attachment image). But after that i dont know
which is the ruby code for clicking the save button in this window. so
please anybody give me a better solution.
There’s nothing built into webdriver that I know of able to handle
chrome’s print to PDF. You’ll need to find a chrome extension with an
API that can do this, save the HTML as shown above and then convert to
PDF, or manually send keypresses (although the latter is usually
unstable and considered bad coding).
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.