Do not want the Images to load and CSS to render on Firefox in Selenium WebDriver – Python

I have figured out a way to prevent Firefox from loading CSS, images and Flash. from selenium.webdriver.firefox.firefox_profile import FirefoxProfile def disableImages(self): ## get the Firefox profile object firefoxProfile = FirefoxProfile() ## Disable CSS firefoxProfile.set_preference(‘permissions.default.stylesheet’, 2) ## Disable images firefoxProfile.set_preference(‘permissions.default.image’, 2) ## Disable Flash firefoxProfile.set_preference(‘dom.ipc.plugins.enabled.libflashplayer.so’, ‘false’) ## Set the modified profile while creating the browser object … Read more

style.display=’none’ doesn’t work on option tags in chrome, but it does in firefox

The workaround is to remove the option elements in response to your event and add them back if and when they are needed. IIRC, IE will not allow you to set the display to none on option elements. I would advise storing the removed elements in an array so that you can easily add them … Read more

Flex basis 100% in column flexbox: full height in Firefox, not in Chrome

This seems to be a bug with Chrome. Similar to the ones reported here (issue 428049) and perhaps related to (issue 346275). This says: – Browsers are supposed to resolve percentages on the flex item’s child, *if* its flex-basis is definite. – Gecko is *always* resolving percentages regardless of the flex-basis. – Chrome is *never* … Read more

Firefox Links to local or network pages do not work

This is the default Firefox behavior designed for security .The assumption is probably that most web sites don’t know what and where are you local files (including UNC paths). This could be turned off in firefox: type “about:config” in the address bar and accept “i’ll be careful” find “security.checkloaduri” in older versions or “security.fileuri.strict_origin_policy” in … Read more