seleniumbase / SeleniumBase

📊 Python's all-in-one framework for web crawling, scraping, testing, and reporting. Supports pytest. UC Mode provides stealth. Includes many tools.
https://seleniumbase.io
MIT License
4.46k stars 910 forks source link

How to open a file *.html? #2701

Closed manel00 closed 2 months ago

manel00 commented 2 months ago

Hello,

I am trying to access to a file but it is giving me an error:

ERROR - Invalid URL: "/output/html/my_html.html"!

How could I do that? Thank you

mdmintz commented 2 months ago

Pass the file path to the load_html_file() method. See the example: https://github.com/seleniumbase/SeleniumBase/blob/e2c3a5e44285dd5b2bbc90c635d2517e72427ba3/examples/offline_examples/test_demo_page.py#L13

manel00 commented 2 months ago

Thank you so much man! I was looking for it without the proper keywords jajaja

Have a nice day!