Highlighted
Contributor.
Contributor.
285 views

Issue with values set in code, not populating on the UI when test is run

Jump to solution

I have an issue where the Id number is specified in the code ( a result of record function). However when running the test, the ID number does not get populated. I've tried changing the 'Set' to "Type", however the Type method fails. Below is the code. As you can see, the ID number has been included in the code, however it is blank on the UI when the test is run. Please help. The test is being run on chrome.


Browser("AppSmart QA").Page("AppSmart QA").WebEdit("Username").Set "TestUser"
Browser("AppSmart QA").Page("AppSmart QA").WebEdit("Password").SetSecure "5d230c93a514f469ff4030a8a815cf5cc8a1"
Browser("AppSmart QA").Page("AppSmart QA").WebButton("Submit").Click
Browser("AppSmart QA").Page("AppSmart QA_2").WebButton("WebButton").Click
Browser("AppSmart QA").Page("AppSmart QA_2").WebElement("Gold Card").Click
Browser("AppSmart QA").Page("AppSmart QA_2").WebEdit("IdNumber").Click
Browser("AppSmart QA").Page("AppSmart QA_2").WebEdit("IdNumber").Set "8005170042084"

 

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

sometimes the input is not activated until you click it. maybe you can try clicking the WebEdit, and then set the value. 

Thanks.

James

View solution in original post

0 Likes
6 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

Maybe the inputbox is defined as numeric. Try removing the quotes.

Failing that use low-level recording for that statement.

Mark Smith.

0 Likes
Highlighted
Contributor.
Contributor.

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

I tried both and neither worked.. 

the removal of the quotes caused a failure.

the recording using low-level, performed the test but the ID number still failed to populate.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

Could you try one of below and see if it works:

1. Browser("AppSmart QA").Page("AppSmart QA_2").WebEdit("IdNumber").Object.Value =  "8005170042084"

2.  Setting.WebPackage("ReplayType") = 2

     Browser("AppSmart QA").Page("AppSmart QA_2").WebEdit("IdNumber").Set "8005170042084"

     Setting.WebPackage("ReplayType") = 1

3. Browser("AppSmart QA").Page("AppSmart QA_2").WebEdit("IdNumber").Click

     Set dr = CreateObject("Mercury.DeviceReplay")

    dr.SendString "8005170042084"

    Set dr = Nothing

 

0 Likes
Highlighted
Contributor.
Contributor.

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

I tried the three options, thank you. In all options the IdNumber is still populated as a blank field.. Any other ideas?

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

sometimes the input is not activated until you click it. maybe you can try clicking the WebEdit, and then set the value. 

Thanks.

James

View solution in original post

0 Likes
Highlighted
Contributor.
Contributor.

Re: Issue with values set in code, not populating on the UI when test is run

Jump to solution

Thank you James!!! :):):):)

That worked, I'm super chuffed.

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.