I have a test case with .

Test Case scenario:

There I want to check whether the link in the website and when we clicked that link played video link are same.

Highlighted is linked to video

This is the video that played when clicking the link above

I try something like this but I not worked.

JavascriptExecutor excute = (JavascriptExecutor) driver ;

        String asset=driver.findElement(By.xpath("//div[@ng-repeat='asset in arParameters.assets']/a")).getText();
        driver.findElement(By.xpath("//div[@ng-repeat='asset in arParameters.assets']/a")).click();
        //Thread.sleep(5000);
        String link =driver.findElement(By.xpath("//video[@name='media']/source")).getAttribute("src");
        excute.executeScript("alert('"+link+"')");
        Thread.sleep(10000);
        driver.get(baseUrl+"productions/cue_sheets/diag?ws=b54fb782-5865-408e-8f54-b1dea2d622c0&id=32c8aedd-b522-4580-b393-651f295fa1c0");

        try {
            assertEquals(link,asset);
        } catch (Error e) {
            verificationErrors.append(tcID+": "+e.toString());
        }



Source link https://sqa.stackexchange.com/questions/34441/how-to--the-video-in--

LEAVE A REPLY

Please enter your comment!
Please enter your name here