0

I need to click on CC to verify if its working.Can't figure out, It gives me error.

public void cc() {
    driver.findElement(By.cssSelector("button[class*='vjs-subs-caps-button']"));
}

Here is the HTML CODE:

<button class="vjs-control vjs-button vjs-subs-caps-button"
   type="button" aria-live="polite" aria-disabled="false" title="Closed
   Captions" aria-pressed="false"><span aria-hidden="true"
   class="vjs-icon-placeholder"></span><span
   class="vjs-control-text">Closed Captions</span> </button></div>
2
  • Try with this driver.findElement(By.cssSelector("button.vjs-subs-caps-button")) Commented Jul 20, 2020 at 6:10
  • 1
    Please update question with Error stack trace. Thanks Commented Jul 20, 2020 at 7:00

0

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.