I'm trying to automate filling out a Microsoft form and I am running into a problem that I'm having a hard time diagnosing. I have succeeded in using Selenium for accessing the form, but when I try to click the radio buttons using the xPath, Selenium fails to get find the radio buttons. I'm getting the xPath directly from the form website so I know its right. The other thing that's throwing me off is the @chrome
appearing in the stack trace. As seen from my imports I'm using Firefox/Gecko not Chrome, so why is stack trace sound like Chrome is throwing the error. Last bit of info I noticed is that when I used the debug console to look inside the element, I notice that accessible_name, aria_role, shadow_root have trace back errors saved instead of values, but I'm not sure if it's related.
my code
from selenium.webdriver import Firefox
from selenium.webdriver.firefox.service import Service as FirefoxService
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver import FirefoxOptions
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
#stuff that I'm excluding, but works
WebDriverWait(driver,short_sleep).until(EC.presence_of_element_located((By.XPATH,FORM_QUESTION_ONE_XPATH)))
RadioButtonPeriod = driver.find_element(by=By.XPATH, value=FORM_QUESTION_ONE_XPATH)
RadioButtonPeriod.click()
error output:
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
NoSuchElementError@chrome://remote/content/shared/webdriver/Errors.jsm:395:5
element.find/</<@chrome://remote/content/marionette/element.js:300:16