Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recognition of JavaButton and WebButton
#1
Solved: 10 Years, 10 Months, 1 Week ago
Hello All,

Previously I was working on a Web Application. In that application, in some pages there were more than 1 WebButtons present having the same name, say for example "Save".

On that case, I was using both the "name" and "index" property like
Quote:Browser("").Page("").WebButton("name:=Save","index:=0").Click

QTP used to search all the WebButtons having name "Save" and then from the list of the found WebButtons, it was clicking the WebButton whose index was 0.

Now I am working on a Java Application. In this application, in a window, there are two JavaButtons with two different "Tagname", say "Button1" and "Button2"

When I am using the below code, it is saying that "there are more than one objects satisfying the criteria" (not exactelly the same warning, but conveys the same message)

Quote:JavaWindow("").JavaButton("tagname:=Button1").Click
JavaWindow("").JavaButton("tagname:=Button2").Click

Tagname property for both the buttons has different value, so it should get identified easily (If we look on Web App perspective)

When I am using the following code, the buttons are getting identified

Quote:JavaWindow("").JavaButton("tagname:=Button1","index:=0").Click
JavaWindow("").JavaButton("tagname:=Button2","index:=1).Click

So my point is here, is there any way of identifying the JavaButtons which are unique by its tagname or label in a particular window without using "index" property ?

I mean how do you guys do this ?
Reply


Messages In This Thread
Recognition of JavaButton and WebButton - by PrabhatN - 08-20-2010, 07:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 993 06-17-2019, 12:19 PM
Last Post: Treirk
  Not able to click on webbutton Zalavadia86 3 2,198 10-24-2016, 11:32 PM
Last Post: frebuffi
  object recognition issue by qtp 11.0 shipu 1 2,446 07-24-2014, 05:57 PM
Last Post: Ankesh
  QTP 11 and VB Object Recognition LauraShadle 0 1,871 06-10-2013, 08:27 PM
Last Post: LauraShadle
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 4,797 05-03-2013, 11:53 PM
Last Post: agarwl.anurag

Forum Jump:


Users browsing this thread: 1 Guest(s)