rwdata = driver.find_elements_by_xpath( "/html/body/div[2]/div/div/div/form[2]/div[2]/table/tbody")
This is a table, with the value of r with type text/javascript
for r in rwdata: print(r.text) if r.text != "Booked": print("Aceptado")
When I print R it has the following values: Booked Booked Booked 9:00 AM Booked Booked Booked 2:00 Am Booked
¿How can I make this comparison, because so far it never enters the if?
<td scope="row" headers="2/8/2021" class="timetable-cells"> <div class="cellcontainer" style="height:120px"> <div data-function="timeTableCell" data-sectionid="153" data-servicetypeid="862" data-fromdatetime="2/8/2021 9:00:00 AM" class="pointer timecell text-center " style="top: 0px; height:118px; background-color: #FF0000;color:#000000;" aria-label="Booked" role="row"> <label for="ReservedDateTime_2/8/2021 9:00:00 AM"> Booked </label> </div>