Save As PDF Chrome using selenium -
i looking automate "save pdf" of chrome using selenium. afaik not supported selenium out of box. therefore, trying write own. having issue. clicking on print button in webpage opens new window printable area. trying switch window using switchto. timing out always.
you try disable chrome pdf plugin , download promt window desired capabilities. this:
desiredcapabilities cap = desiredcapabilities.chrome(); cap.setcapability("download.default_directory","c:"); cap.setcapability("download.prompt_for_download","false"); cap.setcapability("directory_upgrade","true"); cap.setcapability("plugins.plugins_disabled","chrome pdf viewer"); webdriver driver = new chromedriver(cap);
Comments
Post a Comment