Determine a web page element which contains exact text

How can I determine a web page element which contains exact text?

E

Expert

Verified

TestComplete gives you with access to ways and properties of web page elements, therefore you can search all web page tools and get the desired text within the element properties. To check the search, you can utilize the Page object’s Find Method. Such method uses three parameters as: KeyValue, Page.NativeWebObject.Find(PropertyName and TagName.

  • PropertyName:  It is name of the property, that value is checked through the method. Classically the element’s text is available through the innerText or innerHTML property.
  • KeyValue: It is the sought-for text (we can employ the * and ? wildcards to identify the search masks).
  • TagName - Such parameter is optional. You can use thsi to identify tag names which you would like to search in. See that since the name of the Find method coincides along with the name of the Find method added to each tested object by TestComplete, the Page object’s method resides within the NativeWebObject namespace, it is, in your script you must call Page.NativeWebObject.Find rather than Page.Find. For code illustrates, see the Searching for Web Page Element Containing Specific Text blog upon our AQCommunity site or the “Searching for the Element having the Desired Text” assist topic.

   Related Questions in Programming Languages

  • Q : Define Propagation Propagation : When

    Propagation: When an exception is thrown in a method, and there is no suitable exception handler within the method, the exception might be propagated to the caller of the method. For a checked exception, the method should include a throws clause in it

  • Q : Data types of LONG To define the data

    To define the data types such as LONG, INT, SHORT, CHAR write a program?

  • Q : Describe File system File system : The

    File system: The operating system makes it possible to utilize space on a computer's disk drives by imposing a structured file system on disk storage. Each and every file system contains its own conventions for the manner in which the files are named,

  • Q : Explain the role XSL that dynamically

    Explain the role which XSL can play while dynamically generating HTML pages by a relational database?

  • Q : Explain the good illustrations of

    Explain the good illustrations of closing XHTML elements.

  • Q : Define class Define class?

    Define class?

  • Q : Explain Hot spot Hot spot : This is an

    Hot spot: This is an area in an image map with a specific significance. A program usually monitors movements of the mouse, and reacts according to the actions related with the hot spots over which it passes. This may comprise displaying various status

  • Q : What is Octal character constant Octal

    Octal character constant: It is a character constant in the form of \ddd, where each d is an octal digit. This might be employed for characters with a Unicode value in the range of 0 to 255.

  • Q : Define Loop variable Loop variable : A

    Loop variable: A variable employed to control the operation of a loop, like a for loop. Usually, a loop variable will be provided an initial value and it is then incremented after each and every iteration till it passes or reaches a terminating value.

©TutorsGlobe All rights reserved 2022-2023.