Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Query
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
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.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
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

Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Thanks Basanth.
Next time will post on question in one thread.
Thanks Saket.
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Reply
#6
Solved: 11 Years, 3 Months, 4 Weeks ago
hey...use split using " - ". Then u will get it done!
Reply
#7
Solved: 11 Years, 3 Months, 4 Weeks ago
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Query regarding "Call" statement anupam4j 1 2,028 09-26-2014, 01:46 PM
Last Post: vinod123
  Data Table Query Suma Parimal 4 4,768 01-21-2014, 12:50 PM
Last Post: Suma Parimal
  UFT Query invisible786 0 1,895 01-15-2014, 09:41 PM
Last Post: invisible786
  Query about checkpoints pkdhake 5 3,699 07-11-2013, 03:17 PM
Last Post: vinod123
  query on test results look in qtp 11 madhulika99 1 2,728 02-25-2012, 07:28 AM
Last Post: inborntester

Forum Jump:


Users browsing this thread: 1 Guest(s)