Re: UFT can't set the value in the webedit. (790 Views)
Reply
Occasional Contributor
Haisenberg
Posts: 4
Registered: ‎10-15-2013
Message 1 of 5 (873 Views)

UFT can't set the value in the webedit.

In this page I want to do a search.

 

QQ截图20131112174646.jpg

Set value "" in the quote number webedit .

QQ截图20131107104437.jpg

then click the search button and the strange things happen, the acutal result come up as no search criteria input, the system do a fully seach, all data come out.

 

QQ截图20131107104437.jpg

It is not an error, because it works fine when doing the manual operation.

BTW, I test it under firefox 21.

Below is the object identification from the object spy:

"Class Name:=WebEdit",
"abs_x:=300",
"abs_y:=226",
"class:=ng-valid ng-dirty",
"default value:=",
"disabled:=0",
"height:=32",
"html id:=",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=-1",
"name:=WebEdit",
"outerhtml:=<INPUT type=text ng-model=quoteNo class="ng-valid" ng-dirty>",
"outertext:=",
"pattern:=",
"placeholder:=",
"readonly:=0",
"required:=False",
"rows:=0",
"type:=text",
"value:=US1-03048-00",
"visible:=True",
"width:=268",
"width in characters:=20",
"x:=300",
"y:=168" 

 

you can see there is a value in it, and all these webedits in this page have the same identifications, I differentiate them by index.

Do you have any idea what the problem is? And thank you so much for you answer!

Please use plain text.
HP Expert
vzamoraz
Posts: 502
Registered: ‎04-12-2012
Message 2 of 5 (850 Views)

Re: UFT can't set the value in the webedit.

Is posible that this aplication has a validation function that is trigged during type process and is not active during QTP set.

 

Try this

instead of:  Browser("").Page("").WebEdit("").set  "US1-03048-00"

Use:              Browser("").Page("").WebEdit("").type "US1-03048-00"

 

If issue persist then use device replay:

 

Browser("").Page("").WebEdit("").click

Set DR = CreateObject("Mercury.DeviceReplay")
DR.SendString "US1-03048-00"
Set DR = nothing 

 

Best Regards

 

 

Note: The Opinions expressed in my post are mine alone, and do not reflect the opinions of my employer. No warranties express or implied for any answered posted.

Also remember if you have a valid contract with HP feel free to visit our FT/QTP Support Customer Forums: http://h30499.www3.hp.com/t5/Functional-Testing-QTP/ct-p/sws-Fun_Test
You can create an account with your HP credentials

Please use plain text.
Occasional Contributor
Haisenberg
Posts: 4
Registered: ‎10-15-2013
Message 3 of 5 (828 Views)

Re: UFT can't set the value in the webedit.

Thank you for you answering, the type method works, but right now I meet another problem, please find the details as below:

QQ截图20131118222323.jpg

 

the webedit above can't be clicked or focused, so I can use the method type to input the value in it.
Below is the object indentification properties:

"Class Name:=WebEdit",
"abs_x:=543",
"abs_y:=409",
"class:=ng-pristine ng-valid",
"default value:=",
"disabled:=0",
"height:=32",
"html id:=",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=-1",
"name:=WebEdit",
"outerhtml:=<INPUT type=text ng-model=docflow_quoteId placeholder=Enter Quote Number class="ng-pristine" ng-valid>",
"outertext:=",
"pattern:=",
"placeholder:=Enter Quote Number",
"readonly:=0",
"required:=False",
"rows:=0",
"type:=text",
"value:=",
"visible:=True",
"width:=284",
"width in characters:=20",
"x:=543",
"y:=351"

Please use plain text.
HP Expert
Ana_Noncheva
Posts: 245
Registered: ‎08-06-2013
Message 4 of 5 (795 Views)

Re: UFT can't set the value in the webedit.

Hello,

 

From your description, I cannot understand the problem with the "Enter Quote Number" web edit: you say that you can use the Type method on it, correct?

 

Regards,

Ana

“HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.”
Please use plain text.
Frequent Advisor
pavanpy
Posts: 56
Registered: ‎04-11-2013
Message 5 of 5 (790 Views)

Re: UFT can't set the value in the webedit.

The object identification suggests that the implementation could be improved by using detailed values in following tags: html id,html tag,innerhtml,innertext. Since they are defined with generic values or empty, several WebEdit objects might be having same properties, thus failing to identify the appropriate one.

 

Few things you can try:

- If there are tab indices, then you can focus on an object which is recognised correctly, use keystrokes and go to the WebEdit field you want to enter and perform your activities.

- Use insight object, however it has maintenance overhead.

- Try the following: ...WebEdit("outerhtml:=.*ng-pristine.*","visible:=True").Type <QuoteNumber>

 

+pavan

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation