Reputation: 878
I am trying to get to the following text area
But I get the error
Message: Element <p> is not reachable by keyboard
I tried both
element = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, ".ql-editor p"))).send_keys(troll_list[rand_troll])
and
wait = WebDriverWait(driver, 30)
wait.until(EC.element_to_be_clickable((By.XPATH, "//*[@id='chat_send-form_textarea']/div[1]/div[1]/p"))).send_keys(troll_list[rand_troll])
And i get the same error
How do I get to this textbox using seleniumbase? I am using the firefox driver.
UPDATE:
This behavior only occurs in Firefox. Chromium is able to find and select the textbox successfully.
Upvotes: 0
Views: 219
Reputation: 1
Add div to the css selector path.
element = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "div.ql-editor p"))).send_keys(troll_list[rand_troll])
When using css selectors, add the tag name before the css path
Upvotes: 0
Reputation: 4869
You're trying to enter text into p
(paragraph) HTML tag which is not designed for that purpose.
You should either locate appropriate <input type="text">
element or <textarea>
...
Upvotes: 1