So the following code has ID\'s for each button but they are dynamic every refresh and I\'ve tried using maleBtn = driver.find_element_by_xpath(\'//button[text()="
maleBtn = driver.find_element_by_xpath(\'//button[text()="