Selenium 4 - webdriver

We are doing tool upgrade from Selenium 3 to Selenium 4 version in our automation test framework.

Selenium 3

I’m able to save PDF to lambdaTest server and then able to move from lambdaTest server to our local system through test scripts successfully.

Selenium 4

I’m not able save document to lambdaTest server as PDF. Execution is going till print window and it is stopped in lambdaTest due to some browser options attribute issue.

If I execute in my local system(without lambdaTest tunnel), the PDF is getting saved successfully.

Browser options code which I have used is like below,

LTOptions.put(“credentials_enable_service”, false );

LTOptions.put(“profile.password_manager_enabled”, false );

LTOptions.put(“printing.default_destination_selection_rules”, “{ "idPattern": ".*", "namePattern": "Save as PDF" }”);

LTOptions.put(“printing.print_header_footer”, false );

LTOptions.put(“download.prompt_for_download”, false );

LTOptions.put(“plugins.always_open_pdf_externally”, true );

LTOptions.put(“download.directory_upgrade”, true );

Screen shot for document print screen. It is lambdaTest execution screen.

Test ID - N1VWW-RARMI-FADNK-GVVIA

Note:- My observation on this issue is, we have set default save as PDF location in browser options as per Selenium 4(w3c protocol standards)

Please anyone help in solving Selenium 4 browser profile settings issues for lambdaTest execution