I have tried several ways to make a button clickable using Selenium in Python and it seems none of my tries were good enough.
This is how the HTML looks like:
< class="divModulesItems" style="margin-left:0px; margin-top:0px; margin-right:0px; margin-bottom:0px;" onclick="location.href='CSIQTHourEntry.aspx'"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" viewBox="-370 248.3 100 100" style="enable-background:new -370 248.3 100 100;" xml:space="preserve" focusable="false">
<br Enter <br hours
This is the latest I tried, by using onclick method:
EnterHours = HoursEntryPortal.find_element(By.XPATH("//*[ contains(text(), 'hours')]"));
Also, by using the above code, I get the following error:
TypeError: 'str' object is not callable
Any idea how could I make this button clickable? Maybe my sintax is not correct or I omit something.