Test that the scrape method works correctly for selenium with firefox backend.
(monkeypatch)
| 648 | |
| 649 | @pytest.mark.asyncio |
| 650 | async def test_scrape_method_selenium_firefox(monkeypatch): |
| 651 | """Test that the scrape method works correctly for selenium with firefox backend.""" |
| 652 | |
| 653 | async def dummy_selenium(url): |
| 654 | return f"<html>dummy selenium firefox content for {url}</html>" |
| 655 | |
| 656 | urls = ["http://example.com"] |
| 657 | loader = ChromiumLoader(urls, backend="selenium") |
| 658 | loader.browser_name = "firefox" |
| 659 | monkeypatch.setattr(loader, "ascrape_undetected_chromedriver", dummy_selenium) |
| 660 | result = await loader.scrape("http://example.com") |
| 661 | assert "dummy selenium firefox content" in result |
| 662 | |
| 663 | |
| 664 | def test_init_with_no_proxy(): |
nothing calls this directly
no test coverage detected