dimanche 2 avril 2017

Calendar picker with Selenium and Python

I want to click a day of the calendar(doesn't matter what day) if it's available

There are days that are availables and other that they aren't.

The calendar is made with table tag, each td tag, if it isn't available , has a class notSelectableDay.

I have to reload the page till the program found a available day which has the class selectableDay.

The program structure its in this other question i made if else loop on Python. Checking a class name with Selenium

Could this work:

if driver.find_elements_by_class_name("selectableDay"):

    driver.find_element_by_class_name("selectableDay").click()

Aucun commentaire:

Enregistrer un commentaire