Not able to run .reg file in robot framework

I have created .reg file to to select certificate for my website
Below file is working fine when I run manually and it select certificate for website.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\AutoSelectCertificateForUrls]
“1”="{“pattern”:"*",“filter”:{“ISSUER”:{}}}"

I have to call automatically vai robot script. Can you please suggest any way to achieve it?

Can we call this in Suite Setup or Test Setup or is there any other way to run this silently ?

Hi @bk-user,

Probably the easiest way is to just call the regedit command line with Run Process

If you saved that reg file as AutoSelectCertificateForUrls.reg, then something like this

Run Process    regedit.exe    /s    AutoSelectCertificateForUrls.reg

This may work as long as your user has sufficient rights to run regedit, otherwise you could explore winreg python module.

Hope that helps,

Dave.

Not worked .OSError: [WinError 740] The requested operation requires elevation
Anyways thanks for input @damies13

Hi @bk-user,

I was afraid that might happen, which is why I mentioned winreg python module

Unfortunately I don’t know of any robot framework libraries for manipulating the windows registry, but robot framework can run python code either via custom python keywords or directly using the builtin Evaluate keyword

Dave.