Micro Focus QTP (UFT) Forums
QTP Query - 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: QTP Query (/Thread-QTP-Query)



QTP Query - saravananrd@gmail.com - 08-18-2009

Hi All

Have couple of question.
1. Application is developed in .net
We are using Tree View object, I am able to get the content.
I need to split it.
Pls find the content, which is displayed in Debug Viewer -Value column
"CT - Brain
XRay - Heart
MRI - Scam
CT - Heart"
Can any suggest how to spilt and get the content one by one.

2.We are using Swftable object.
I need to check the column header in the swftable.
Column header is like this, with header name, without header name and few hidden column.
I need to verify the column with header and without header name

can any help me on this.

Thanks
Saravanan


RE: QTP Query - basanth27 - 08-18-2009

Yes We can Help. But please restrain yourself posting as if you are sending across a email. There are 2 different questions. Post it individually. Before posting i request you to read through the forum guidelines.

1. a = object.Getcontent()
a1 = Split(a,"-")
msgbox a1(0) ' This will contain CT..so and forth all the items will be included.


RE: QTP Query - Saket - 08-18-2009

Although I agree with Basanth - Please post one question per thread,
For your second query - You can use GetCellProperty to retrive the column header
e.g.
swftable.GetCellProperty(0 , 1 , "colname") - return the first col header name
swftable.GetCellProperty(0 , 2 , "colname") - return the second col header name


RE: QTP Query - saravananrd@gmail.com - 08-18-2009

Thanks Basanth.
Next time will post on question in one thread.
Thanks Saket.


QTP Query - subramanianmsc2007 - 02-02-2011

Hi,

Now i am working QTP. I got error like that Object does not support property or method. How to avoid these kind of error. I have used the following code like that :
Code:
Browser("Browser").Navigate "......."
Dim Str1
str1="WebButton"
msgbox str1
Dim str2
str2="Reset"
msgbox str2
Dim res
res=str1 & "(" & str2 & ")"

Browser("Browser").Page("OpenSSO (Login)").res.Click
'Browser("Browser").Page("OpenSSO (Login)").WebButton("Reset").Click
please do the needful.

Thanks in advance,
Subramanian.M


RE: QTP Query - DinakarVadapalli - 02-02-2011

hey...use split using " - ". Then u will get it done!


RE: QTP Query - subramanianmsc2007 - 02-04-2011

Hi to All,

Thanks for your kind reply, how to use Split function insted of "(" .

Code:
Dim res
res=str1 & "(" & str2 & ")"

Browser("Browser").Page("OpenSSO (Login)").res.Click
'Browser("Browser").Page("OpenSSO (Login)").WebButton("Reset").Click