I have a problem in my code.
for photolink in all_links:
self.browser.get(photolink) #Link öffnen
time.sleep(random.randint(5, 6))
#liken
self.browser.find_element_by_xpath('//*[@id="react-root"]/section/main/div/div[1]/article/div/div[2]/div/div[2]/section[1]/span[1]/button').click()
time.sleep(random.randint(1, 3))
#kommentieren
commentbox = self.WaitforObject(By.CLASS_NAME,"Ypffh")
commentbox.click()
time.sleep(random.randint(1, 2))
#commentbox.send_keys(self.config.Random_Comment())
commentbox.send_keys("Test")
commentbox.send_keys(Keys.ENTER)
time.sleep(random.randint(3, 5))
c = c + 1
print("Liked ", c, " photos")
time.sleep(random.randint(1, 3))
It works until commentbox = self.WaitforObject(By.CLASS_NAME,"Ypffh")
, so the curser is in the textfield. But, when I want to write something with send_keys, it broke.