I read similar questions, one was supposed to be the answer, but when I tried it, he gave only a partial solution.
I refer to the question: Disable images in Selenium Python
My problem is that I tried this solution and some of the images are not displayed, but the images that come from:
<img href="www.xxx.png">
Loading. Is there any way to tell firefox / selenium not to get it? If not, is there any way to drop it from the dom element, which I will return, through
self._browser.get(url) content=self._browser.page_source
for example, by doing some replacement on the dom tree?
The browser configuration is the same browser from the previous question:
firefox_profile = webdriver.FirefoxProfile()
------------------------------------- CORRECTION --------- --- -------------------------
I kept digging and I found out that,
If I check a text document that the selenium / firefox host I saw this, it did not bring images and was saved then as links.
But when I did:
self._browser.save_screenshot("info.png")
I have a 24 megabyte file with all the img links loaded.
Can someone explain this question to me?
Thanks
source share