To improve the performance of the automation, trying to disable image loading.
I found a way to do it in Firefox & Chrome (Ref: Selenium WebDriver/Firefox|Chrome/Java How to disable image loading), not Internet Explorer. Please help me out here.
Below is the answer, received from Selenium team.
Ref: https://github.com/SeleniumHQ/selenium/issues/7512
This isn’t possible without changing the browser configuration/profile, and IE does not support profiles outside the currently logged in Windows user account. The driver will not be modified to change the configuration, since there is no guaranteed way to revert the configuration change after the session ends. You can either manually set the browser configuration in the options dialog (if such a setting exists), manipulate the setting programmatically using the Windows registry (assuming such a setting exists for IE), or use a web proxy to block retrieval of images. This is not a feature the driver will be implementing.
To improve the performance of the automated program disableing the image loading within internetexplorer you need to modify the data for the name Display Inline Images within HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main through the Registry Editor as no as follows:
Value name Value data
--------------------- ----------
Display Inline Images No
Snapshot:
To disable the images while browsing on Internet Explorer, you could open the Internet Options and go to the Advanced Tab. Scroll down to Multimedia Section and uncheck Show Pictures check-box, click Apply and Exit.
Related
hi guys I wrote a software that needs to be permanently entered into a website and then perform a browser operation then close and open it again, and each time it opens, the browser profile changes ... but usually after 10 attempts, it seems that the Internet is cut off and the website dont open, but if I create a new tab myself, I can go to the same address manually ... Why does this happen ??... I use Firefox and geockdriver and of course selenium libraries
i created multiple Geockdriver.exe and tried to use each for one profile and also i set port for driver with profile.setPreference(FirefoxProfile.PORT_PREFERENCE, 65535); but still same problem happend
by the way i code in java
selenium-firefox-driver 4.1.3
firefox version 98.0.2
I'm using Edge for automated tests with selenium-webdriver. I have faced an issue which prevents downloading of xml files.
Error message
Do you have any ideas how can I switch off Microsoft Defender SmartScreen when starting Edge browser? For chrome browser it can be done by setting option prefs.put("safebrowsing.enabled", false);. Is there anything similar for Edge?
The error message pop up is not controlled by Microsoft Defender SmartScreen so there's no use to switch it off.
I know that you want to control it with Selenium but there's no Edge option that can override the warning in Selenium. The solutions in other threads are for old versions of browsers. safe browsing is now the default behavior so it won't work either. There's not much Selenium can do with the warning.
If you want to get rid of the warning when downloading xml files, you can only set this group policy first, then use Selenium to automate.
For more information, you can also refer to this thread. In the accepted answer of the thread, it uses PowerShell script to update Windows Registry to set the group policy, you can also use it as a workaround.
I have a selenium (v2.53) test that visits a site containing flash player (I'm testing this player). up until now, everything was working fine, but after I updated chrome to v62, flash is disabled by default.
I can't change manually flash setting since this test is automated and running on remote machines.
I've tried adding some chrome capabilities that should work on previous versions of chrome, but it did not work on chrome 62 version since allowing flash is not enough, now a list of allowed site is also required.
How can I change both the enabled status and the list of sites using selenium?
Also, is there a way to install chrome with a config file that both enables flash and populates the required sites list?
Thanks.
P.S. I'm working with Java 8
Your best bet is to simply use Chrome options. Why do you need a config file? That sounds overly complicated and unnecessary. You can enable it through chrome preferences. Try a fresh install of Chrome too.
Something akin to the likes of:
chromeOptions:{
args: ["--allow-running-insecure-content", "--allow-insecure-websocket-from-https-origin", "allow-outdated-plugins"]
You didn't specify which language so I can't give you a language example.
So as the title suggests, when launching my HTML suite with a custom firefox profile (also with multiwindow), the server is launching two tabs, both trying to execute the test, targetting the same single window the actions are being carried out in. If I close one of the selenium tabs, the test will then complete successfully.
The custom profile is a profile created in firefox 19.0.2 and I am now running it in 20.0
Now If I update up the custom profile to coincide with the latest version of firefox, this fixes the tab issue when launching the test...however my question is....
Does anybody know the cause of this behaviour?
Many thanks,
Joe
I think Firefox opens the second tab because the current milestone of the browser software does not match the value of the setting browser.startup.homepage_override.mstone in prefs.js: The browser tries to show sort of a successful-update-page in a new tab.
According to https://bugzilla.mozilla.org/show_bug.cgi?id=102313
you can suppress this behaviour by manually setting browser.startup.homepage_override.mstone to ignore. For me, this single change in prefs.js did the trick.
halfbit
I am trying to run a Java webstart application which is launched from a html page. While loading I get an alert with the message "Automation server can't create object" a couple of times after which the applications starts and works fine. The alerts come up only on one of the workstations. Any pointers on where I should look?
Regards,
Dutch
try the following IE setting: "Initialize and script ActiveX control not marked as safe."
May or may not apply to your case, but there are reported problems with the JScript Runtime throwing up errors when starting up Applets or Java WebStart applications when you have specific network settings.
Every now and again, there's a Windows Update that generates such a bug and another one that follows to fix it and you'll see some of these errors. Yours might be one of these.
Usually the workaround in-between is to either:
go to IE's Network Settings and uncheck "auto detect settings" or any PAC file setting
or go to the Java control panel's Network Settings and disable "Use browser settings" or other settings to use a direct connection instead.
Obviously, that workaround is only valid if you do not have to go through a proxy...