Micro Focus QTP (UFT) Forums
Identifying of an object in a web based application for this scenario - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Identifying of an object in a web based application for this scenario (/Thread-Identifying-of-an-object-in-a-web-based-application-for-this-scenario)



Identifying of an object in a web based application for this scenario - venkatbatchu - 08-18-2009

Can you please exaplain the solution to over come this issue
Please see the attached screen shots.

Thanks in advance
V


RE: Identifying of an object in a web based application for this scenario - basanth27 - 08-18-2009

What do you get when you do this,

Code:
sindex = Browser().page().frame().webelement("innertext:=Area","index:=0
").GetRoProperty("Source_Index")

msgbox sindex


RE: Identifying of an object in a web based application for this scenario - venkatbatchu - 08-18-2009

Hi,
Value i am getting here is 438

Please see the below code
Code:
m=Browser("....").Page(".........").Frame("main").WebElement("innertext:=Priority","innerhtml:=Priority","outertext:=Priority","Index:=0").GetROProperty("Source_Index")
msgbox m (Here i am getting value of 438 and after wards am able to execute the below code i really surprised why it is been executing the below code?)
Browser(".....").Page("....").Frame("main").WebElement("innertext:=Parent2A","innerhtml:=Parent2A","outertext:=Parent2A","Index:=0").FireEvent "ondblclick"
Browser("....").Page("........").Frame("main").WebElement("innertext:=Parent2B","innerhtml:=Parent2B","outertext:=Parent2B","Index:=0").FireEvent "ondblclick"
Browser("........").Page(".......").Frame("main").WebElement("innertext:=Child2R","innerhtml:=Child2R","outertext:=Child2R","Index:=0").FireEvent "ondblclick"


What is Source_Index and what is the importance of this?
Can u please refresh me about this....


RE: Identifying of an object in a web based application for this scenario - basanth27 - 08-18-2009

Which code part "Webelement" was throwing the error ? can you paste that part only please.


RE: Identifying of an object in a web based application for this scenario - venkatbatchu - 08-18-2009

Code:
m=Browser("....").Page(".........").Frame("main").WebElement("innertext:=Priority","innerhtml:=Priority","outertext:=Priority","Index:=0").GetROProperty("Source_Index")
msgbox m
Browser("....").Page(".........").Frame("main").WebElement("innertext:=Priority","innerhtml:=Priority","outertext:=Priority","Index:=0").FireEvent "ondblclick"
I am getting error message after this line of code

What is source_index and what is the importance of this...
Can u please explain about these things also..


RE: Identifying of an object in a web based application for this scenario - basanth27 - 08-18-2009

Try this and let me know if it still throws the error ?

Code:
Browser("....").Page(".........").Frame("main").WebElement("innertext:=Priority","Index:=0").FireEvent "ondblclick"

If it throws the same error then try this,

Code:
Browser("....").Page(".........").Frame("main").WebElement("innertext:=Priority","Source_Index:=438").FireEvent "ondblclick"

Source_Index is a DOM identification of the Object. You can read more about it at www.w3schools.com