1

I am trying to check if flash video is minimized or maximized. Tried to do something like this:

var video = Program.Driver.FindElement(By.XPath("//object[contains(@id, 'player_api')]"));

int videoSize = video.Size.Width;

if (videoSize > 1024)
{
     //Do something...
}

But I am getting fixed size of HTML element. Any suggestion?

2
  • can you please give us a sample page to check the video. :) Commented Aug 5, 2015 at 11:07
  • @AntonAngelov Thank you for your comment, steeles.cream-club.co.uk please take a look at the main video on the page at the center of the screen. Commented Aug 5, 2015 at 11:13

1 Answer 1

1

As far as I can see you can locate the following element:

var video = Program.Driver.FindElement(By.XPath("//*[@id='player_api']/param[6]"));

Then get its value and then find the video sizes in the flash object. You can even deserialize the value to C# object from the JSON. Check the image: http://screencast.com/t/sYu3DYxo6V

Sign up to request clarification or add additional context in comments.

6 Comments

Thank you, what is going to happen with the parameters when window is maximized? Are they going to change or they are static ?
You should try but I assume that they should be different. :)
Is there any possibility to get that maximize button inside of the flash player as an element ?
I don't think that WebDriver support it natively. However, you can try to automate it with Sikuli- sikuli.org/ + you can check the following article- toolsqa.com/selenium-webdriver/…
Thank you for your help.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.