Relative Content

Tag Archive for pythonplaywright

Top of page missing when PDF created using Python Playwright

I am using the following Python code to capture a web page as a PDF. The page in question (https://www.haywood.edu/about-hcc/college-leadership.php) looks like the following, after you click on the word “Accreditation”. The page lands on “Our President” by default.

Python Playwright automation with tables

I can’t figure out how to get this code to work. The unique locator (using letxpath) is table[contains(@class, ‘whole data-table’)] the CSS path is tr#whole.detail.information>td:nth-of-type(3)>div

Copying a value in a table in playwright

I need to create a python script using playwright that will grab a dynamic value from a table and save it as a variable for future use in the program. If you can use the link below and create a mock up using those numbers that would be great.

Playwright Python: ‘retain-on-failure’

For Node.js it’s mentioned option ‘retain-on-failure’ (https://playwright.dev/docs/videos) to preserve only videos for failed tests. Nothing similar for the Python. How can it be solved (delete videos for passed tests)? Thanks