Reg-Key for PageSetup on IE11 - internet-explorer-11

I want to change the Pagesetup on IE11 with a Regkey entry via GPO.
On a previous version from IE I have added the key via GPO to:
"HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\PageSetup"
When I set the Regkey for IE11 on the same Registryfolder this has no effect.
In which Reg folder does IE11 save the PageSetup?

Related

How do I set Chrome upload directory with Selenium & VBA

How do i set default upload path with selinium and chrome. eg going to a webpage, and upload. this opens a fileexploere, but it always opens c:\users[me]
I want to be able to set anoter default path.
i have seen this to set download path
driver.SetPreference "download.default_directory", "c:\temp"
and i tried to alter it
driver.SetPreference "upload.default_directory", "c:\temp"
but it dosnt work.
Chrome Version 102.0.5005.115 - win10
Found it
from this helpfull link
Where can I find a list of all available ChromeOption arguments?
theres a link to "List of preferences:"
in here i found
selectfile.last_directory
So i set
driver.SetPreference "selectfile.last_directory", "c:\temp" or what you want

CanĀ“t use selenium on vba

I'm used to running a script on vba using selenium in windows 7 with no problem, and since I installed Windows 10 a just can not open the Google Chrome automated window.
Already installed google chromedriver and the selenium library
Put the C:\....\AppData\Local\SeleniumBasic on the environmental path
The Google Chrome is version 78.0.3904.108 and the chromedriver 78.0.3904.105, and people don't seem to have problems with that...
This is the start of the code, where crashes...
Dim bot As New Selenium.ChromeDriver, posts As WebElements, post As WebElement, i As Integer,
mysheet As Worksheet, keys As Selenium.keys
bot.Start "chrome", "https://valor.globo.com/impresso" **'it gots the error right here**
bot.Get "/"
Anyone having this problem, knows what to do?
Check your version of Chrome, then download the ChromeDriver for your version.
This code should open Google.
The browser will close as soon as the Sub ends, so either declare the ChromeDriver on a global variable, or don't let the Sub end.
Option Explicit
Dim MyChromeDriver As ChromeDriver
sub MyCD
Set MyChromeDriver = New ChromeDriver
MyChromeDriver.Get "https://www.google.com/"
End Sub

How do I set Chrome download directory with Selenium & VBA

Using Win7, Office2010, Chrome 58, and Selenium 2.0.9, I'm automating the downloading of a number of files from a few websites (NB, I actually need the files and the sites are not mine - I'm not testing my own site), and I'd like to control where the files end up being downloaded.
I have looked at quite a number of search results and everything I've found has led me to the following versions of code, each Driver.SetPreference variation has been tested independently and none of them work.
Private Sub DownloadDirTest()
Dim Driver As Selenium.ChromeDriver
Set Driver = New Selenium.ChromeDriver
Driver.SetPreference "browser.download.dir", "\\server\share\my\long\path"
Driver.SetPreference "browser.download.dir", "\\\\server\\share\\my\\long\path"
'after mapping Y: to "\\server\share\my\long\path" in Windows Explorer
Driver.SetPreference "browser.default_directory", "Y:\"
Driver.SetPreference "browser.download.dir", "c:\"
Driver.SetPreference "browser.default_directory", "c:\"
Driver.Start "Chrome", "http://google.com"
Driver.Close
End Sub
As can been seen here:
Most of the references I've seen are for Python, Java or Ruby, and they all make reference to something like:
ChromeOptions options = new ChromeOptions();
options.addArguments("user-data-dir=/path/to/your/custom/profile");
There doesn't seem to be any equivalent ChromeOptions available to VBA.
1) Does anyone know the actual property name to correctly set the download directory?
2) I'm not particularly wedded to Chrome, though it seems to be faster than IEDriver (in my initial testing), and I can't get the current Firefox driver to work. If someone has pointers to how to reliably set the DL directory in either of the other browsers (and a link to an updated Firefox driver - I haven't been able to find it via half-hearted searching), I'm open to using those.
The preferences from your example are specific to Firefox. You need to set the ones specific to Chrome to change the download directory:
Dim driver As New ChromeDriver
driver.SetPreference "download.default_directory", "c:\temp"
driver.SetPreference "download.directory_upgrade", True
driver.SetPreference "download.prompt_for_download", False
driver.SetPreference "safebrowsing.enabled", True
driver.SetPreference "plugins.plugins_disabled", Array("Chrome PDF Viewer")
driver.Get "http://google.com"
driver.Quit

Issue in launching Chrome via Selenium VBA

I have tried to launch Chrome browser via Selenium VBA by using the below code. I am getting this error when executing the code "WebRequestError
The underlying connection was closed: An unexpected error occurred on a receive." But IE browser is working fine.
Sub samp()
Dim drv As New Selenium.WebDriver
drv.Start "Chrome"
drv.Get "www.google.com"
End Sub
I fixed this by installing the latest ChromeDriver, and replacing the .exe-file with the file located in my AppData.
Requirements
Download and install SeleniumBasic VBA, and set the reference in VBA editor (https://florentbr.github.io/SeleniumBasic/)
Steps
Download latest WebDriver from: https://sites.google.com/a/chromium.org/chromedriver/downloads
Open folder C:\Users\ Username\AppData\Local\SeleniumBasic
Replace chromedriver.exe with existing file
Example
Now this example code below works as intended
Sub driver()
Dim selenium As New selenium.WebDriver
selenium.Start "chrome", "http://google.com"
selenium.Get "/"
End Sub

When an mht file is opened in IE11 , mode is getting changed IE7(default)

Any .mht file opened using IE11, the mode is getting changed to default IE 7(this has been observed using F12-> Developer Tools).
This problem exists with only IE11, I have tried in IE9 and .mht files are working fine.
1. Is this a known issue?
2. why the mode set to IE7(default), when IE11 is used?
Would you please provide any workaround to make sure that its always set IE mode to latest(edge).
Regards,
Syam Devendla