Forum Discussion

ḥari's avatar
ḥari
Frequent Contributor
8 months ago

Iframes

Hi team,
I have a video play button in a web page and want to verify if he hit that button video is playing or not. Here that play button comes under iframes so i can't able to switch page variable to iframes.

Can any one help me out from this?

Is there any method available to switch from page to iframes like in a selenium

1 Reply

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Here's example code that highlights left and right pane of https://www.w3schools.com/css/tryit.asp?filename=trycss_buttons_basic which uses iframe.

     

    function Panes()
    {
        var page =  NameMapping.Sys.Browser("chrome").Page("https://www.w3schools.com/css/tryit.asp?filename=trycss_buttons_basic").Panel("container");
        var left = page.Panel("textareacontainer").Panel("textarea").Panel("textareawrapper").Panel(0).Panel(5).Panel(0).Panel(0).Panel(0).Panel(0).Panel(4);
        var right =  page.Panel("iframecontainer").Panel("iframe").Panel("iframewrapper").Frame("iframeResult").Button("Input Button");
        Sys.HighlightObject(left);
        Sys.HighlightObject(right);
    }