Clicking on element with seleniumbase

248 views Asked by At

I'm trying to click in a element with seleniumbase but its not happening as expected I tried following method but its not working for some reason:

<code>
driver.click('div[class="ovm-OverviewMediaButton me-MediaButtonLoader me-MediaButtonLoader_MLVideo"]')
Received the exception:
seleniumbase.common.exceptions.NoSuchElementException: Message: 
 Element {div[class="ovm-OverviewMediaButton me-MediaButtonLoader me-MediaButtonLoader_MLVideo"]} was not present after 7 seconds! <code>
Trying with only the first class name:
<code> driver.click('div[class="ovm-OverviewMediaButton"]')
seleniumbase.common.exceptions.NoSuchElementException: Message: 
 Element {div[class="ovm-OverviewMediaButton"]} was not present after 7 seconds! <code>

The element which im trying to click:

<code>
<div class="ovm-OverviewMediaButton me-MediaButtonLoader me-MediaButtonLoader_MLVideo "></div> <code>
1

There are 1 answers

3
Michael Mintz On

Here's a valid selector for that element: div.ovm-OverviewMediaButton.

To click it with the seleniumbase driver, use:

driver.click("div.ovm-OverviewMediaButton")