Update app.py
Browse files
app.py
CHANGED
@@ -40,9 +40,10 @@ def selenium(message):
|
|
40 |
#<ol class="AmbQnf">
|
41 |
wd.get(url)
|
42 |
wd.implicitly_wait(3)
|
43 |
-
|
|
|
|
|
44 |
#textarea = wd.find_element(By.XPATH, "/html/body/div[1]/div[2]/main/div[1]/div[2]/div/div[1]/div/form/div/div[2]/div/div/div[1]/div[1]/div/textarea")
|
45 |
-
time.sleep(3)
|
46 |
textarea.send_keys(f"{message}")
|
47 |
time.sleep(3)
|
48 |
textarea.send_keys(Keys.RETURN)
|
|
|
40 |
#<ol class="AmbQnf">
|
41 |
wd.get(url)
|
42 |
wd.implicitly_wait(3)
|
43 |
+
WebDriverWait wait = new WebDriverWait(driver, 15);
|
44 |
+
WebElement textarea = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("userInput")));
|
45 |
+
#textarea = wd.find_element(By.XPATH, "/html/body/div/main/div[3]/div[2]/div/div[2]/div/div/div[3]/div[2]/div[1]/div/div/div/div/textarea")
|
46 |
#textarea = wd.find_element(By.XPATH, "/html/body/div[1]/div[2]/main/div[1]/div[2]/div/div[1]/div/form/div/div[2]/div/div/div[1]/div[1]/div/textarea")
|
|
|
47 |
textarea.send_keys(f"{message}")
|
48 |
time.sleep(3)
|
49 |
textarea.send_keys(Keys.RETURN)
|