-2

the code:
the code

I want to change the value of this textbox, but I can't do it. Here is my code for it:

driver.find_element_by_name("inps_19_1").send_keys("value", "my value"), not working,

driver.find_element_by_css_selector("input[name='inps_19_1']").send_keys("whatever") not working.

Any advice?

asachet
  • 6,620
  • 2
  • 30
  • 74
  • 1
    Welcome to Stack Overflow! Images and screenshots can be a nice addition to a post, but please make sure the post is still clear and useful without them. **Don't post images of code or error messages.** Read [why](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-on-so-when-asking-a-question/285557#285557). Instead copy and paste or type the actual code/message into the post directly. – Filnor Nov 20 '18 at 12:40

1 Answers1

0

I can't see the full HTML, but a problem I've run into a number of times was either elements being contained iframes or shadowroots that you'd have to switch to before the driver can find it. iframes are easy enough to switch to

driver.switch_to_frame("frameName")

Then you can find the element after.

If the element is contained within a shadowroot, this answer shows how to expand them https://stackoverflow.com/a/37253205/10007528