2019 up to now | 2018 2017  |  2016  | 2015 | 2014 | 2013 | 2012

Mailing List - Entries of 2012

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] [Multiple name method] how to resolve this problem

  • Subject: Re: [QF-Test] [Multiple name method] how to resolve this problem
  • From: Martin Moser <martin.moser@?.de>
  • Date: Tue, 17 Jul 2012 07:35:03 +0200

Hi Sreeram,

you have two components with the same name.
As the name of the component is the most crucial part for recognizing the component it has to be unique.

The simplest solution is to fix it in the source code, if the name has been set by developers. The second way of solving it might be to implement a NameResolver, where you specify an algorithm of setting the name unique. If the duplicate name is caused by an existing NameResolver you will need to fix this.

Resolvers are described in the manual chapter "39.1 Resolver hooks" or <http://www.qfs.de/qftest/manual/en/tech_nameresolvers.html#sec_nameresolvers>.

Please note that the name of a component stands mostly for the "id" web tag in web components.

Best Regards,

--On Montag, Juli 16, 2012 12:34:03 +0100 Sreeram Sethuraman <sreeram.sethuraman@?.com> wrote:


Please can you tell me how to resolve this in override mode.

Name override: BTN.OK.OK
2 components match name
Parent component:
36007Z5FADIB0036&Target=ChangeConfig] Probability: 80%
Looking for:
d.data.ExtraFeatureSet@179d47f[Should  match: class='submit
hkitPopUpButton',Should match: id='hk__',Should  match:
ssCount=4,primaryIndex=null,secondaryIndex=null] Intermediate named
ancestor: DomNode@292536784<TD/>
Intermediate named ancestor: DomNode@292536832<TR/>
Intermediate named ancestor: DomNode@292543368<TABLE/>
Intermediate named ancestor: DomNode@292543472<TD/>
Intermediate named ancestor: DomNode@292582680<TR/>
Intermediate named ancestor: DomNode@292583192<TABLE/>
Intermediate named ancestor: DomNode@292584136<DIV id='hkitLayer_body'
Found component: DomNode@292600984<BUTTON:BUTTON id='hk__'/>
Intermediate named ancestor: DomNode@292744696<TD
id='hkitPopUpGen_buttonmiddle' cachedIdName=hkitPopUpGen_buttonmiddle/>
Intermediate named ancestor: DomNode@292677840<TR/>
Intermediate named ancestor: DomNode@292648432<TABLE/>
Intermediate named ancestor: DomNode@292583712<TD/>
Intermediate named ancestor: DomNode@292600608<TR/>
Intermediate named ancestor: DomNode@292731576<TABLE/>
Intermediate named ancestor: DomNode@292770104<TD/>
Intermediate named ancestor: DomNode@292666792<TR/>
Intermediate named ancestor: DomNode@292572272<TABLE/>
Intermediate named ancestor: DomNode@292762680<DIV id='hkitPopUpGen'
Intermediate named ancestor: DomNode@292612024<DIV
id='hkitLayer_GenPopUp'  cachedIdName=hkitLayer_GenPopUp/>
Found component: DomNode@292476992<BUTTON:BUTTON '/>
Multiple name match

Multiple components with name 'BTN.OK.OK' found as candidates for
component 'BTN.OK.OK'.

I even tried all the below option still gets above problem.

This id is the means by which other nodes refer to this component.
Therefore it may appear in many places and you should take care to assign
an id with a meaning, i.e. one that is easy to remember and recognize. An
id must be unique within the test-suite.
Variable: No
Restrictions: Must not be empty, contain any of the characters '#', '$',
'@', '&', or '%' or start with an underscore ('_').
'Class name'
For SWT and Swing application this is the fully qualified name of the
Java  class of the component or one of its super-classes whereas for web
applications there is a pseudo class hierarchy described in section 6.4.
The actual class recorded by QF-Test depends on the setting of the option
Record system class only and on potentially registered ClassNameResolvers
(see subsection 39.1.2). Upon replay, class matching is based on the
actual or pseudo class hierarchy, so you can manually change this
attribute to any of the element's base classes.
Variable: Yes
Restrictions: Must not be empty.
The name of the component that was set by the developers of the SUT with
the setName(String) method. See section 36.2 for why and how names should
be set on all "interesting" components.
Variable: Yes
Restrictions: None
If there is no 'Name' available for the component, QF-Test tries to
recognize it by a characteristic feature.
See section 36.2 for more information about component recognition.
Variable: Yes
Restrictions: None
'As regexp'
If this attribute is set, the 'Feature' is a regular expression (see
section 36.4).
Variable: Yes
Restrictions: None
'Extra features'
Besides the main 'Feature' a 'Component' can have additional features
represented as name/value pairs. The kind of component determines which
extra features are recorded. Each extra feature can have one of three
Ignore (currently represented as 0)
This extra feature is just for information. It has no influence on
component recognition.
Should match (currently represented as 1)
Target components matching this extra feature have a higher probability
for component recognition than those that don't match it.
Must match (currently represented as 2)
The target component must match this extra feature. Any component not
matching it is no candidate for component recognition.
Additional columns allow for matching against a regular expression or to
negate the expression, e.g. to define that the "class" attribute of a DOM
node in a web page should not be "dummy". The absence of an extra feature
can be enforced by adding one with an empty value.
Variable: Yes (the value)
Restrictions: Names must not be empty
These two fields hold additional structural information needed for
component recognition during a test run. The 'Class count' is the number
of components within the same parent container and with the same class
(or  a class derived thereof). The 'Class index' is the index that this
component has in the list of these components with matching class. As
usual the first component has index 0.
When counting the components of matching class, invisible components are
considered as well. This is more robust but means that the values may be
higher than expected.
Note It is possible to specifiy just the 'Class index' or the 'Class
count' attribute.
Variable: Yes
Restrictions: None


IMPORTANT - CONFIDENTIALITY NOTICE - This e-mail is intended only for the
use of the addressee/s above.  It may contain information which is
privileged, confidential or otherwise protected from disclosure under
applicable laws.  If the reader of this transmission is not the intended
recipient, you are hereby notified that any dissemination, printing,
distribution, copying, disclosure or the taking of any action in reliance
on the contents of this information is strictly prohibited.  If you have
received this transmission in error, please immediately notify us by
reply  e-mail or using the address below and delete the message and any
attachments from your system.

Amadeus Services Ltd, World Business Centre 3, 1208 Newall Road,
Hounslow,  Middlesex, TW6 2TA, Registered number 4040059

Martin Moser                           martin.moser@?.de
Quality First Software GmbH            http://www.qfs.de
Tulpenstr. 41                          Tel: +49 8171 38648-14
DE-82538 Geretsried                    Fax: +49 8171 38648-16
GF: Gregor Schmid, Karlheinz Kellerer  HRB München 14083