Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Highlighted
Omar Lpz Respected Contributor.
Respected Contributor.
363 views

Is there some sort of 'correlation' for UFT Web GUI tests?

Hi everyone,

I'm kinda new to UFT and I'm learning the basics of this tool. Despite running tests in the sample app MyFlight and in the site http://newtours.demoaut.com, I've tried to run a GUI test on the Web Tours app, I know that this app is made for the basics of LR, but I thought that i could just give it a try and apply a test.

Obviously, the test failed because the correlation in the outbound flight parameter, my question is if I can code something to bypass that part o to run propperly my test on the WebTours app.

I tried some of the next code to see if i can extract the value and return it, but all my attemps had ended in failure.

First I tried the simple ones:

Browser("Browser").Page("Web Tours").Frame("info").WebRadioGroup("name: =outboundFlight", "index: =0").Select "#0" 

Then I tried something a bit more complicated:

Set oDesc1 = Description.Create()
oDesc1("micclass").Value = "WebRadioGroup"
oDesc1("html tag").value = "INPUT"
Set Radiobuttons = Browser("Browser").Page("Web Tours").ChildObjects(oDesc1)
NumberOfRadioButtons = Radiobuttons.Count()
If NumberOfRadioButtons <> 0 then
Radiobuttons.Item(1).Select "#" & 0
end if

(This option doesn't give me error in the OutBound Flights, however, it displays and error in the next form due to missing object "Webedit:Creditcard", I suppose because the next form isn't showing up)

After that I tried to catcth the value with a getROProperty:


val= Browser("Browser").Page("Web Tours").Frame("info").WebRadioGroup("outboundFlight").getROProperty("Value")
Browser("Browser").Page("Web Tours").Frame("info").WebRadioGroup("outboundFlight").Select "val"

But none had worked, so my question is: It can be done or should I try with other sites to practice with the Functional tests?

 

thanks in advance,
Omar.

 

0 Likes
4 Replies
Micro Focus Expert
Micro Focus Expert

Re: Is there some sort of 'correlation' for UFT Web GUI tests?

hi, there

you can do the parameterization with your input by using the data sources from either Test\Action parameter or datatable. There's also a setting for you to do the auto-parameterization which, once enabled, will automatic the process during your recording, turning your input to a parameter.

For other corelation other than input, I am not aware of a feature to do it.

Thanks.

James

0 Likes
Omar Lpz Respected Contributor.
Respected Contributor.

Re: Is there some sort of 'correlation' for UFT Web GUI tests?

Hi James,

Thank you for your response, but the parameterization of the value will solve the issue? I mean in LR I learned that the server expects a return value, but the script pass the hardcoded value during the recording in UFT. If I "auto-parameterize" (I don't remember seeing such function in UFT ) The subsecuent forms will show normally?

Thanks.
Omar

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Is there some sort of 'correlation' for UFT Web GUI tests?

hi, 

UFT has no inherent logic to bind data input to subsequent actions. In this sense, even you enable the auto-parameterization, it will make one input of user action to be a parameter but cannot use the same parameter when you try to retrieve data or input again. The new input will generate another parameter while the output has no relation whatsoever to the previous input. I'm afraid you need to maintain the connection, or relation, by yourself in the script.

Thanks.

James 

0 Likes
gulatisneha56
New Member.

Re: Is there some sort of 'correlation' for UFT Web GUI tests?

I agree with you.

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.