Micro Focus QTP (UFT) Forums
Webedit embedded in a Webelement, cannot be identified - 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: Webedit embedded in a Webelement, cannot be identified (/Thread-Webedit-embedded-in-a-Webelement-cannot-be-identified)



Webedit embedded in a Webelement, cannot be identified - Dev509 - 07-14-2014

Hi I have a webedit which is embedded in the dynamically changing webelement, i am able to identify the dynamic webelement, however not able to identify the embedded webedit and hence not able to set a new value to it.

Here is some code i have written

Code:
Dim oDesc1        'Description Object
Set oDesc1 = Description.Create
oDesc1( "micclass" ).value = "Webtable"
oDesc1( "innertext" ).value = "\(1\) Income from fiduciary activities.*"
oDesc1( "innertext" ).regularexpression = true

tableinfo  = Browser("").Page("ReportGenerator_2").WebTable(oDesc1).GetCellData(1,11)
'msgbox tableinfo

'Browser("").Page("ReportGenerator_2").WebTable(oDesc1).Highlight

Dim Webel
Set Webel=description.Create()
Webel("micclass").value="WebElement"
Webel("html tag").value  = "DIV"
Webel("innertext").value= tableinfo

webelinnertext = Browser("").Page("ReportGenerator_2").Webelement(Webel).GetROProperty("innertext")
'msgbox webelinnertext

'Browser("").Page("ReportGenerator_2").Webelement(Webel).Highlight
'wait 3000

Browser("").Page("ReportGenerator_2").Webelement(Webel).FireEvent("ondblclick")

Dim Webed
Set Webed=description.Create()
webed("Class Name").value="WebEdit"
webed("Name").value="WebEdit"
Webed("html tag").value= "INPUT"
Webed("visible").value= "True"
Webed("value").value = "6666"
'webedinnertext = Browser("").Page("ReportGenerator_2").WebEdit(Webed).GetROProperty("value")
'msgbox webedinnertext

Browser("").Page("ReportGenerator_2").Webedit(Webed).Set "7777"



Also here are the Webelement and Webedit details
Code:
"Class Name:=WebElement",
"abs_x:=2239",
"abs_y:=779",
"class:=x-grid3-cell-inner x-grid3-col-10",
"height:=21",
"html id:=",
"html tag:=DIV",
"innerhtml:=6666\.00000",
"innertext:=6666\.00000",
"outerhtml:=<DIV style=font-size:11px;font-family:'arial';color:#0000ff;text-align:Right; unselectable=on class=x-grid3-cell-inner x-grid3-col-10>6666\.00000</DIV>",
"outertext:=6666\.00000",
"title:=",
"type:=",
"visible:=True",
"width:=152",
"x:=959",
"y:=715"
------------------------

"Class Name:=WebEdit",
"abs_x:=2239",
"abs_y:=753",
"class:=x-form-text x-form-field x-form-num-field x-form-focus",
"default value:=",
"disabled:=0",
"height:=18",
"html id:=ext-comp-1190",
"html tag:=INPUT",
"innerhtml:=",
"innertext:=",
"kind:=singleline",
"max length:=-1",
"name:=WebEdit",
"outerhtml:=<INPUT type=text name= id=ext-comp-1190 autocomplete=off size=20 class=x-form-text x-form-field x-form-num-field x-form-focus style=text-align: left; width: 152px; height: 18px;>",
"outertext:=",
"pattern:=",
"placeholder:=",
"readonly:=0",
"required:=False",
"rows:=0",
"title:=",
"type:=text",
"value:=6666",
"visible:=True",
"width:=152",
"width in characters:=20",
"x:=959",
"y:=689"

Thanks in advance