Forum Discussion

mikej411's avatar
mikej411
Occasional Contributor
12 years ago

Verifying an image inside of a textbox exists.

I am testing a web application using Jscript in TestComplete and need to verify that a WordWheel TextBox includes an image of a magnifying glass inside of it. And that when text is entered, a red x appears. See the image below. I dont need to what the image looks like, just need to maybe find a property I can use to verify that it exists. Or maybe more properties to verify that the red X appears, etc.



For design reference, this is how I verify the text font style of that text box below:



  if (searchTextBox.currentStyle.fontStyle == "italic" && modulesTextBox.currentStyle.color == "gray")

  {

   Log.Checkpoint("The text box font is gray and italic");

  }

  else

  {

    Log.Error("The text box font is not gray and italic);

  }





Is this possible?













3 Replies