Highlighted
Contributor.
Contributor.
160 views

UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Hi Team,

Recently we have upgraded to UFT 14.50.

While running Automation Suites, we have encountered an issue with UFT 14.50.

While setting data in JavaEdit box it throws an error "This Operation cannot be performed".

Same code is working with older version UFT 12.

I have even tried record and playback. While recording, it has recorded the steps properly. But when i run recorded script it again throws error while setting data in JavaEdit Box.

Can you please help with it.

Thanks!!!

Regards,

Prathap Reddy

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Contributor.
Contributor.

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Hi Hilda,

Thanks a lot for your support.

".Type" operation simulates keyboard actions, we are little cautious using that operation as there are some case sensitive fields and if caps lock is on or off, it impacts our execution.

But based on your second suggestion i have used different operation using below native method and it is working same as ".set" operation.

JavaEdit.Object.setText "User1"

Thanks a lot once again for your support.

Regards,

Prathap Reddy

View solution in original post

0 Likes
7 Replies
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Can you provide more information about the java version used and the Java Toolkit for the application? (AWT,Swing, SWT, JavaFX)

Thank you!

Hilda 

0 Likes
Highlighted
Contributor.
Contributor.

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Hi Hilda,

Please find below required details.

Java Version: 1.8.0_60


SWT Version: 4.629

javafx.runtime.version=8.0.60
javafx.runtime.build=b27

 

I am not sure this is what the details you are looking for Awt and Swing

AWT : batik-awt-util-1.10.jar

SWING: batik-swing-1.10.jar

 

Thanks!!!

Regards,

Prathap Reddy

0 Likes
Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Hello,

I was not able to reproduce the error on JavaEdit with UFT 14.50.  I suggest you to escalate the problem to a CPE case with more details about the environment, application and the script used in the tests. 

Thank you,

Hilda

0 Likes
Highlighted
Contributor.
Contributor.

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Hi Hilda,

I have tried setting empty data in the JavaEdit Box by using set operation and passing empty string as parameter, it was successfully clearing data which is already present in the JavaEditBox.

JavaWindow("xyz").JavaEdit("UserName").Set ""

JavaWindow("xyz").JavaEdit("Password").Set ""

 

Even " GetROProperty("text")" is successfully returning the value present in the text field.

 

But when i tried to enter some data by using set operation it is throwing error "The operation cannot be performed"

JavaWindow("xyz").JavaEdit("UserName").Set "user1"

JavaWindow("xyz").JavaEdit("Password").Set "password"

 

Even while recording, it is recorded successfully with set operations, but when i replay the recorded script it is throwing me the error "The operation cannot be performed". 

Same scripts are working properly with UFT 12.54, i have  checked it.

Our Application is a Desktop Application(called as "LoanIQ", it is a mysis product) and it is used in wide range of industries.

Can you please suggest another alternate solution to fix this issue or if you have any info on anyone else has raised similar issue with this application and resolved it.

Thanks!!!

Regards,

Prathap Reddy

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Could you try one of the two below to see if it helps:

1. JavaEdit.Type "user1"

2. JavaEdit.Object.value = "user1"

0 Likes
Highlighted
Contributor.
Contributor.

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Hi Hilda,

Thanks a lot for your support.

".Type" operation simulates keyboard actions, we are little cautious using that operation as there are some case sensitive fields and if caps lock is on or off, it impacts our execution.

But based on your second suggestion i have used different operation using below native method and it is working same as ".set" operation.

JavaEdit.Object.setText "User1"

Thanks a lot once again for your support.

Regards,

Prathap Reddy

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: UFT 14.50 - unable to set data in JavaEdit Box

Jump to solution

Glad to know that you have found a workaround using native methods.

It is Heming here by the way, not Hilda. 🙂

Enjoy UFT!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.