I have a trouble finding a solution how to switch from desktop application to PDF which is opened in browser.
Here are the actions that are happening:
I am writing automation for testing Desktop application. At the end of the flow that I am testing, PDF file is generated but is directly opened in browser tab. I am trying the RPA.PDF library but it is giving me error that no PDF file is opened. Did someone got the same issue as me and what is the solution for it?
Thank you in advance,
Mhm, is the file saved to temporary location before opening in browser? RPA.PDF expects file, not browser. If temp location is not available there would also be an option to set up solution > How to use an already running (Chrome) browser for your web automation robots
I tried with this example but I and getting error RPA.core.webdriver has no attribute ‘cache’ so again something is not working as expected. Any ideas?
Hi @lambreva.lora , that
cache error is coming as a leftover from the major upgrade we had to Selenium 4. Using the latest
rpaframework==16.3.0 in your conda.yaml will have that fixed, so please upgrade first!
Here’s the robot example I tested with and it looks like the keyword is working as expected. (video demo)
Make sure you:
- On a Mac for example open Chrome like so:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
a. Ensure you had no Chrome open previously by quitting the app first.
b. Check with
ps aux | grep -i "9222" to see if now the newly opened browser is really on that port.
- In VSCode with Robocorp extension installed, run
Clear Robocorp and press Enter so you clean your env first.
- Same action, but this time select
Run Robot and pick the task you’d like.
Similarly, you can do the same with rcc:
rcc config cleanup --all
rcc run -t <task>
Let us know if you still have problems and good luck with the robot development!