Micro Focus QTP (UFT) Forums
Need to click play button on video player which is available in Application - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Need to click play button on video player which is available in Application (/Thread-Need-to-click-play-button-on-video-player-which-is-available-in-Application)



Need to click play button on video player which is available in Application - kotaramamohana - 03-14-2011

Hi Friends,
I need to click Play button in Video player which is available in the application. When I tried to click the play button in the player by using QTP, its marking(capturing) whole Video player instead of 'Play' button. Could you please let us know whether QTP can click Play button in video player. I have attached screen shot. PFA
Please share your thoughts


RE: Need to click play button on video player which is available in Application - basanth27 - 03-14-2011

So its an embedded object. In other words child of a child object. Would you mind pasting the code?
I suspect the play button itself not being able to be identified. If we cannot do it the conventional way then we can use co- ordinates based on factors of the player.


RE: Need to click play button on video player which is available in Application - kotaramamohana - 03-21-2011

Hi Friend,
Yes you are correct, its Embeded object. Script is not generating for Recording also. So i can't paste any code aslo here. Otherwise can you give suggestion, how can i generate script for that.




RE: Need to click play button on video player which is available in Application - basanth27 - 03-21-2011

Questions,

1. Is the player location a constant? I mean, would the location of the video player change on the webpage?

If answer for question 1 is no, then we can find the co-ordinates of the play button and then click on it.

If the answer for question 1 is yes, then we may need to find the co-ordinate of the player and then possibly find the co-ordinate of the play button.

We can think ahead if you answer question 1.


RE: Need to click play button on video player which is available in Application - kotaramamohana - 03-21-2011

Hi Basant,
When I tried to identify the Play button through QTP, Its highlighting whole Player window. Its not recognising play button alone. I am unable to get the Play button Co-Ordinates because its capturing whole Video Player window.



RE: Need to click play button on video player which is available in Application - basanth27 - 03-21-2011

When you spy, what are the cor-odinates displayed for the webelement?

When we go through this laborious process of finding the coodrinates and click on the play button, we need enormous patience and several trial execution before we get it working.

Well, you havent yet answered the question i asked. ( question 1 )


RE: Need to click play button on video player which is available in Application - kotaramamohana - 03-21-2011

Hi Basant,
X-Co ordiante is not changing but Y-Co ordinate is changing.


RE: Need to click play button on video player which is available in Application - basanth27 - 03-21-2011

Well, let me re-phrase my question. Does the player on the screen change its location everytime you open the webpage?


RE: Need to click play button on video player which is available in Application - kotaramamohana - 03-21-2011

Hi Basant,
The location is not changing whenever we come to that page. Here is the co ordiates 850,481.
I have used the following code to click the Play button. It executed successfully with warning but its not clicking.


RE: Need to click play button on video player which is available in Application - basanth27 - 03-21-2011

Which code have you used? Is it possible for you to obtain the co-ordinates of the play button? you can google to find some freeware tool which will give you the exact x and y co-ordinates of the button. Once done you can use various methods to click. One of the method is called,
DeviceReplay. you can research more on this.More details about the method is available on QTP help.