1

I have a test case with video.

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][1]][1]

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());
        }
2
  • What did happen? Did it give any error? If no error is returned, check those two url.
    – Shahid
    Commented Jun 26, 2018 at 7:40
  • @shahid just video is play.next line not worked.if pause the video.it throws time out error.
    – Aravin
    Commented Jun 26, 2018 at 8:22

0

Your Answer

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

Browse other questions tagged or ask your own question.