0
votes

I'm trying to find a way to click on "X" button but I cannot find the way to click on this button.

Element copy:

<div style="cursor: pointer; float:right; border-radius: 3px; background-color: red; font-size: 10px; color: white; height: 15px; width:15px; line-height: 15px;" onclick="fecharModal();">X</div>

Xpath:

//*[@id="meu_modal"]/div

Css Selector:

#meu_modal > div

Tried:

driver.find_element_by_css_selector("a[onclick*=fecharModal]").click();