Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Helper methods missing for DataGridView test in UFT QTP with .NET 8.0 and .NET 9.0 #13015

Open
vijayarasan opened this issue Feb 24, 2025 · 5 comments
Labels
untriaged The team needs to look at this issue in the next triage waiting-author-feedback The team requires more information from the author

Comments

@vijayarasan
Copy link

I'm encountering issues while testing the DataGridView WinForms control using UFT QTP software across different .NET versions. Specifically:

  1. In .NET 8.0:
    The helper methods that were previously available in .NET Framework 4.6.2 are not detected. I've attached a document comparing the helper methods between .NET versions (.Net Framework 4.6.2, NET80 and NET90) for reference.

    Document: QTP Test Details.zip

  2. In .NET 9.0:
    When clicking on the DataGridView control in the desktop application, the window unexpectedly disappears.

Could you please investigate these problems and provide guidance on:

  1. Why the helper methods (ex: SelectColumn, SelectCell, SetCellData e.t.c.,) are not detected in .NET 8.0 and if there's a way to restore this functionality?
  2. The cause of the window disappearance in .NET 9.0 when interacting with the DataGridView control?

Any insights or potential solutions would be greatly appreciated. Thank you for your time and assistance.

I've attached a sample project demonstrating these issues for your review.
Samples:
.Net Framework 4.6.2 Demo: .NetFrameWork4.6.2SampleDemo.zip

.NET80 Demo: DatGridViewDemoNET80.zip

.NET90 Demo: DataGridViewDemoNET90.zip

Note: The QTP test is functioning properly with the .NET Framework 4.6.2. However, I am unable to test the .NET 8.0 and .NET 9.0 WinForms desktop applications. Can you suggest a way to achieve QTP testing for .NET 8.0 and .NET 9.0, similar to how it works with the .NET Framework 4.6.2?

@Tanya-Solyanik Tanya-Solyanik added the untriaged The team needs to look at this issue in the next triage label Feb 25, 2025
@Philip-Wang01
Copy link
Contributor

@vijayarasan Thank you for your feedback. We have tested the three projects you provided in Visual Studio with the same results. Are these three methods (SelectColumn, SelectCell, SetCellData) specific to QTP? Is the QTP tool the only way to reproduce the problem? If so, can you provide more information such as where to download QTP and steps to reproduce the problem?

@vijayarasan
Copy link
Author

@Philip-Wang01, Thank you for your reply.

Yes, these methods are generated in the Action file of UFT/QTP. You can download the Micro Focus UFT software setup from the link below.

QTP Software: Free Trial of OpenText Functional Testing

After the installation, you can create the test and run the executable generated from the previously attached sample.

Replication Procedure:

Step 1: Click the record button to capture the test case.

Step 2: Select any one of the cells in the DataGridView.

Step 3: Select any one of the column headers in the DataGridView.

Step 4: Enter the value in any one of the cells.

Step 5: Stop the recording.

Observed Behavior:
The helper methods (SelectColumn, SelectCell, SetCellData) were not generated in the action file.

Expected Behavior:
The helper methods (SelectColumn, SelectCell, SetCellData) should properly generated in the action file like .Net Framework 4.6.2

I have prepared a test video demo, which you can find in the attachment below.

.Net Framework 4.6.2 : Framework4.6.2TestVideoDemo.zip

.NET80: NET80TestVideoDemo.zip

@Philip-Wang01
Copy link
Contributor

It has been verified that the DataGridView control generates different code in UFT Recording .NET 8.0 than .NET Framwork 4.6.2, and crashes straight away in .NET 9.0. This is consistent with the phenomenon described by the customer. The DataGridView control does not throw an exception if UFT is not used.

UFT recorder result in .NET Framework 4.6.2:

UFT_recorder_462_code.txt

test462.mp4

UFT recorder result in .NET 8.0:

UFT_recorder_80_code.txt

test80.mp4

@vijayarasan
Copy link
Author

@Philip-Wang01, Thanks for the update.

Yes, the UFT Recording for .NET 8.0 and .NET Framework 4.6.2 are both different. I need to automate the .NET 8.0 application in a manner similar to how I did with .NET Framework 4.6.2. I require support for automating the desktop application created in .NET 8.0. Is it possible to provide support similar to that for .NET Framework 4.6.2?

@Tanya-Solyanik
Copy link
Member

Is it possible to provide support similar to that for .NET Framework 4.6.2

@vijayarasan - I can't find helper methods you mention in our documentation for the WinForms DataGridView class https://learn.microsoft.com/dotnet/api/system.Windows.forms.Datagridview?view=netframework-4.6.2
1 SelectColumn
2 SelectCell
3 SetCellData
4 ActivateCell

In what assembly and namespace are these helper methods defined on .NET Framework4.6.2?

@Tanya-Solyanik Tanya-Solyanik added the waiting-author-feedback The team requires more information from the author label Feb 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged The team needs to look at this issue in the next triage waiting-author-feedback The team requires more information from the author
Projects
None yet
Development

No branches or pull requests

3 participants