Home   tech  

Document is read only error in UFT 2023

UFT versions below 2023

In UFT versions before 2023, you can add repositories via script using below code.

Set qtRepositories = qtApp.Test.Actions("Action1").ObjectRepositories
If qtRepositories.Find(orFile) = -1 Then
    qtRepositories.Add orFile, 1
End If

UFT versions After 2023

But in 2023 UFT version, you need to use below syntax otherwise you will get syntax error "Document is read only". It seems that they have introduced new object RepositoriesCollection

 RepositoriesCollection.Add orFile, 1
Published on: Mar 14, 2024, 12:13 AM  
 

Comments

Add your comment