How can I find a specific image within a web page?
Submitted by: AdministratorTo 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.
Submitted by: Administrator
► 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.
Submitted by: Administrator
Read Online XQuery Job Interview Questions And Answers
Top XQuery Questions
☺ | I would like to add an HTML document to the Tested Applications collection. How can I do this? |
☺ | The web page I am testing displays the Login dialog. How can I access this dialog? |
☺ | How can I find a web page element that contains specific text? |
☺ | Does TestComplete support testing of Flex applications? |
☺ | Can I have checkpoints or test cases configured for element properties / javascript messages which would be dynamically formed? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |