Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to click one '+' out of many '+'
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi ,

I am testing a web application. Once I get to home page, I see a menu with a list of + sign. I need to click a plus sign. Next to each plus(+) sign, there is a label. Example,
+ abc
+ cde
+ efg.

I simply want to click the plus next to efg. How can I do that? If I do the normal recording, it does not work. It clicks different plus sign different time.

Thanks a lot.
using QTP 9.2/JAVA APP.
Safi
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi..

U can use "Index" Property to Click perticular "+".

you can use Index property through Descriptive programming..

u can Record whole script.. but the statement when u click "+"..
use Descriptive programming for that perticular Statement..

Thankx
Reply
#3
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi,

You have mentioned 3 pluses in the example and want to click the 3rd one(If I got you right).

One question here, is the number of pluses always 3 or it changes everytime?

If it is always 3, then go by index property(Possibly index:=2 will do)

If it is not, then again one question, do you want to click the plus sign beside "efg" every time or you wanna click the last one? If the "efg" one always then again, go by index property.

Else if the last one and the number of buttons changes everytime, try the code below,

Code:
Set wButton = Description.Create
wButton("micclass").Value = "WebButton"
wButton("name").Value = "+" //Please check name is "+" or anything else
Set allWButtons = Browser("BrowserName").Page("PageName").ChildObjects(wButton)
getButtonCount = allWButtons.Count //It will get you the total number of "+" buttons in you app
allWButtons(getButtonCount - 1).Click //It will click on the last "+" button

Hope this will solve your purpose.
Reply
#4
Solved: 11 Years, 3 Months, 4 Weeks ago
Thanks.
Its not working.

on the web application, it shows as followsSadFI=FOLDER ICON)
- FI Topics
+ FI business areas
+ FI FACTS
+ FI INVENTORY
....

I have 7 + signs total. I need to click different + signs different time depending on what I need. Current script need to click on + next to FACTS.

I used object spy and found out that all + and the - sign and the FI, all have the class type -Image.

I used the below code and i get error :
Code:
Browser("micclasss:=Browser").Page("micclass:=Page").Image("micclass:=Image", "Index:=2").Click

It does not click any + signs.

Thanks.
Reply
#5
Solved: 11 Years, 3 Months, 4 Weeks ago
Can you try using Virtual object and see?
Reply
#6
Solved: 11 Years, 3 Months, 4 Weeks ago
Using object spy are you able to see a webtable? If yes, let me know we have implemented a similar solution for Hyperion application some time back.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Right Click On a Image and Click on a Link in WebElement RameshKrishnan 4 5,403 07-10-2013, 04:13 PM
Last Post: RameshKrishnan
  How do I left click on the right click menu in WinTreeView? RandomGrin 0 3,917 12-22-2012, 04:22 AM
Last Post: RandomGrin
  How do I left click on the Right click menu? RandomGrin 2 4,213 12-18-2012, 09:47 PM
Last Post: RandomGrin

Forum Jump:


Users browsing this thread: 3 Guest(s)