How Can I Find A Specific Image Within A Web Page
To find an image within a web page, you can use one of the following approaches: ► Search for the IMG element whose SRC attribute contains the file name of the desired image. To perform the search, use the Page.NativeWebObject.Find method (see the method?s description above). ► Use TestComplete?s image-search capabilities. You can call the Picture method of the web browser window to obtain a Picture object holding the window image, and then use the Find method of this object to search for the desired image. This method returns a rectangle that specifies coordinates of the image within the web browser window. To obtain the scripting object corresponding to the found image, you can use the Sys.ObjectFromPoint method. Both approaches are equally valid, however, finding the image by name works much faster. For more information and code examples, see the TestComplete Tips: Finding an Image on a Web Page blog on our AQCommunity site or the ?Finding an Image on a Web Page? help topic.
2009-2016 downloadmela.com. All rights reserved.