Micro Focus QTP (UFT) Forums
Need help in doing SET on WebEdit inside WebTable - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Need help in doing SET on WebEdit inside WebTable (/Thread-Need-help-in-doing-SET-on-WebEdit-inside-WebTable)



Need help in doing SET on WebEdit inside WebTable - chong67 - 09-26-2012

I am trying to do DP on a SET on WebEdit that is inside a WebTable.

===================
This is what recording capture:

Code:
Browser("Delta - Book a flight").Page("Delta - Book a flight").WebEdit("paxFFNumber[0]").Set “12345678”

===================
This is what I write using DP and it didn’t work:

Code:
Browser(“name:=Delta - Book a flight”).Page("title:=Delta - Book a flight").WedEdit("html id:=paxFFNumber\[0\]", "name:=paxFFNumber\[0\]").Set "12345678"

===================

Object Spy properties:
Code:
"Class Name:=WebEdit",
"abs_x:=1525",
"abs_y:=423",
"class:=",
"default value:=",
"disabled:=0",
"height:=20",
"html id:=paxFFNumber\[0\]",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=20",
"name:=paxFFNumber\[0\]",
"outerhtml:=<INPUT onblur=""secureFlight\.retrieveSavedSFData\(get\('paxFFNumber\[0\]'\)\.value,get\('paxFFAirlineCode\[0\]'\)\.value,document\.getElementById\('paxLastName\[0\]'\)\.value,document\.getElementById\('paxFirstName\[0\]'\)\.value,null\);showSFPD\(0,get\('paxFFNumber\[0\]'\)\.value\);"" id=paxFFNumber\[0\] onfocus=secureFlight\.setPaxIndex\(0\); tabIndex=15 maxLength=20 name=paxFFNumber\[0\]>",
"outertext:=",
"readonly:=0",
"rows:=0",
"type:=text",
"value:=",
"visible:=True",
"width:=119",
"width in characters:=20",
"x:=565",
"y:=286"


"Class Name:=WebTable",
"abs_x:=962",
"abs_y:=394",
"border:=",
"class:=",
"cols:=7",
"column names:=Prefix;First Name;Last Name;Suffix;Airline Program;Frequent Flyer Number;Total value of Certificates applied",
"height:=96",
"html id:=pax_list",
"html tag:=TABLE",
"innerhtml:= *",
"visible:=True",
"width:=692",
"x:=2",
"y:=257"


"Class Name:=Page",
"abs_x:=960",
"abs_y:=137",
"height:=1011",
"hwnd:=2425556",
"name:=",
"text:=",
"title:=Delta - Book a flight",
"url:=https
dispatchMethod=doPricedItineraries&hiddenFieldsId=qhhZLN5xX42V305&checksum=272908248&cacheKey=qhhZLN5xX42V305",
"width:=956"


"Class Name:=Browser",
"abs_x:=960",
"abs_y:=137",
"application version:=internet explorer 8",
"hasmenubar:=True",
"hasstatusbar:=True",
"hastoolbar:=True",
"height:=1031",
"hwnd:=1639326",
"name:=Delta - Book a flight",
"number of tabs:=1",
"openedbytestingtool:=True",
"opentitle:=
"Destinations",
"openurl:=http
"title:=Delta - Book a flight",
"version:=internet explorer 8",
"width:=956"



RE: Need help in doing SET on WebEdit inside WebTable - Sathiya - 09-27-2012

Check whether the following lines working fine or not
Code:
Browser(“name:=Delta - Book a flight”).Highlight
Browser(“name:=Delta - Book a flight”).Page("title:=Delta - Book a flight").highlight
Browser(“name:=Delta - Book a flight”).Page("title:=Delta - Book a flight").WedEdit("name:=pax.*").highlight
Browser(“name:=Delta - Book a flight”).Page("title:=Delta - Book a flight").WedEdit("name:=pax.*").Set "12345678"



RE: Need help in doing SET on WebEdit inside WebTable - Jyobtech - 09-28-2012

Hi
Use this logic:
Code:
Browser("title:=Delta - Book a flight.*").Page("title:=Delta - Book a flight.*").WedEdit("html id:=paxFFNumber\[0\]", "name:=paxFFNumber\[0\]").True
or
Code:
Browser("title:=" & gWebAppTitle).Page("title:=.*").SAPEdit("name:=" & NewName & ".*","INDEX:=" & FieldIndex, propType, "visible:=True")



RE: Need help in doing SET on WebEdit inside WebTable - Ankesh - 09-28-2012

@chong67,

You code is worng. Look at the screenshot one more time. It says
'Object does not support the property or method Broswer(..).Page(..).WedEdit

Please note there is nothing called WEDEDIT in QTP/Web.

It has to be WebEdit. Replace the code and check if it works.

Regards,
Ankesh