Testing Framwork Chrome PDF opening option in extensionless mode

2 Answers 4 Views
Chrome
Zsolt
Top achievements
Rank 1
Iron
Zsolt asked on 05 May 2025, 01:36 PM

Dear Telerik Support Team,

 

Several automated tests of ours started to be failing as PDFs are not opening up in Chrome, rather they are tried to be opened externally (screenshot 1). We wanted to check the PDF settings in Chrome, however the settings seemed to be correct. Then we figured out that since we just started to use extensionless mode by adding this line into our code:

Settings mySettings = new Settings();
mySettings.Web.......

mySettings.Web.......

mySettings.Web.UseBrowserExtension = true;

it seems that the Chrome is opened up by you with a different profile. If we are correct, "your" profile is located at this location, right?

C:\Users\Tfs3Tester\AppData\Local\ArtOfTest\TSChromeUserData\Default

Here in Preferences if we are modifying this part ""always_open_pdf_externally":true" to FALSE, then surprisingly its value always set back to TRUE, every time if a test run (with vstest.console.exe) is opening up th eChrome browser.

Also we tried to define the default PDF opening behaviour in the registry, based on this link of yours:

Custom Chrome Profile - Progress Test Studio

No luck, we tried to define a Chrome profile, but we couldn't properly.

 

So my quetion is the following: if a test opens up Chrome with extensionless mode, how can we make sure that PDF's are opening up inside the Chrome browser? How to configure that settings?

 

Best regards,

Zsolt

2 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 06 May 2025, 08:51 AM

Hello Zsolt,

As far as I understand you use the Test Studio Testing Framework to build your tests. Please, note that this is a free product with no active support included, but you still can contact the Test Studio team via our public forum. Therefore your submitted support ticket under your active license was converted to a public forum post which can be accessed with this link

Let's head to the issues you experience. I'll start with several important notes which you seem to have missed. 

  1. Test Studio supports PDF file validation out-of-the-box and it requires certain browser settings because the behavior is predefined - PDF files are always downloaded and then the local file is opened in new tab. 

    Note: In the case when you develop the tests in code, none of these actions happen automatically and you need to handle it accordingly. 

  2. The browsers used from Test Studio requires calibration which is a set of settings applied in the browser so that it behaves as expected from the tool. In the browser mode with extension (which is now deprecated) the calibration was done manually. Thus, it was easily skipped by users and this is how your browser settings related to handling PDF files remained unchanged. 
    The calibration in the browser without extension happens automatically on browser startup and you cannot change the settings.
  3. Custom browser profile and path settings applies only to browser mode with extension. Thus these are also deprecated but obviously we missed to update the documentation accordingly. We'll take care of this as soon as possible. 

With that said I have to say that you need to adjust the tests which interact with PDF files so that these correspond to the workflow which Test Studio can handle. In other words - download the PDF, then open it from the local folder and connect the execution to the new browser tab, then close the new tab and continue with the rest of the scenario. 

I hope that this information is useful for you. Let me know in case you have any additional questions.

Regards,
Elena
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Zsolt
Top achievements
Rank 1
Iron
answered on 06 May 2025, 08:16 PM

Dear Elena,

 

So basically there is no way of changing this setting here in extensionless mode:

We just would like to make sure, that if our code starts a new Chrome browser in extensionless mode, then that PDF setting is set. That would fix our tests.

 

Thank you,

Zsolt

 

Elena
Telerik team
commented on 08 May 2025, 08:12 AM

Hi Zsolt, 

Test Studio uses a specific workflow to validate PDF files as part of a web test. The workflow is as follows:

  1. Download the PDF file locally on the executing machine.
  2. Open the PDF file in new tab in the browser from its local storage directory. 
  3. Connect the execution process to the new tab.
  4. Perform validation as per requirements.
  5. Close the popup and connect the execution process back to the original tab.

To comply with this workflow it is a requirement to set the browser settings to always download PDF files which means you cannot change the setting in the browser used from Test Studio. 

In order to fix the failing tests you need to rework these so that they follow the above workflow.

Regards,
Elena

Tags
Chrome
Asked by
Zsolt
Top achievements
Rank 1
Iron
Answers by
Elena
Telerik team
Zsolt
Top achievements
Rank 1
Iron
Share this question
or