Closed Skeo220 closed 6 months ago
Hello, this downloads the PDF of the first chart displayed:
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class TableauTest(BaseCase):
def test_tableau_pdf_download(self):
self.open("https://public.tableau.com/app/discover/viz-of-the-day")
self.click('img[alt="Workbook thumbnail"]')
self.sleep(4)
self.click('button[data-tip="Download"]')
self.sleep(1)
self.switch_to_frame('iframe[title="Data Visualization"]')
self.click('button[data-tb-test-id="DownloadPdf-Button"]')
self.click('button[data-tb-test-id="export-pdf-export-Button"]')
breakpoint()
There's a breakpoint()
at the end to pause the script with the browser window still open. Type c
and press Enter
to continue from the breakpoint. Adjust timing as needed. This should be enough to get you started on the right path.
It worked, thank you so much for your help!
On Thu, Feb 29, 2024 at 9:08 AM Michael Mintz @.***> wrote:
Hello, this downloads the PDF of the first chart displayed:
from seleniumbase import BaseCaseBaseCase.main(name, file) class TableauTest(BaseCase): def test_tableau_pdf_download(self): self.open("https://public.tableau.com/app/discover/viz-of-the-day") self.click('img[alt="Workbook thumbnail"]') self.sleep(4) self.click('button[data-tip="Download"]') self.sleep(1) self.switch_to_frame('iframe[title="Data Visualization"]') self.click('button[data-tb-test-id="DownloadPdf-Button"]') self.click('button[data-tb-test-id="export-pdf-export-Button"]')
breakpoint()
There's a breakpoint() at the end to pause the script with the browser window still open. Type c and press Enter to continue from the breakpoint. Adjust timing as needed. This should be enough to get you started on the right path.
— Reply to this email directly, view it on GitHub https://github.com/seleniumbase/SeleniumBase/issues/2548#issuecomment-1971465398, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3FLG5CA7YJIO4LEHS4JB7DYV5I6VAVCNFSM6AAAAABD7NJDL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZRGQ3DKMZZHA . You are receiving this because you authored the thread.Message ID: @.***>
Hello,
I am trying to create a script that downloads my tableau public viz and sends it to me. It is for a project. I keep running into problems after I click on the download button
This works but it only allows me to download the dashboard as a png. I tried using the code below to help going down to the pdf but it doesn't work.
I have tried many other things but nothing works. If anyone can help that would be amazing. Thanks