Update app.py
Browse files
app.py
CHANGED
@@ -41,17 +41,18 @@ def selenium(message):
|
|
41 |
#<ol class="AmbQnf">
|
42 |
wd.get(url)
|
43 |
time.sleep(3)
|
44 |
-
text_input = wd.find_element(By.XPATH, '/html/body/div[1]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[1]/textarea')
|
45 |
-
|
46 |
#wait = WebDriverWait(wd, 15) # Korrektur der Instanziierung
|
47 |
#textarea = wait.until(EC.visibility_of_element_located((By.ID, "userInput"))) # Korrektur der Verwendung von EC
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
51 |
#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")
|
52 |
#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")
|
53 |
text_input.send_keys(f"{message}")
|
54 |
-
|
55 |
text_input.send_keys(Keys.RETURN)
|
56 |
time.sleep(8)
|
57 |
elements = wd.find_elements(By.TAG_NAME, "p")
|
|
|
41 |
#<ol class="AmbQnf">
|
42 |
wd.get(url)
|
43 |
time.sleep(3)
|
44 |
+
#text_input = wd.find_element(By.XPATH, '/html/body/div[1]/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div[1]/textarea')
|
45 |
+
|
46 |
#wait = WebDriverWait(wd, 15) # Korrektur der Instanziierung
|
47 |
#textarea = wait.until(EC.visibility_of_element_located((By.ID, "userInput"))) # Korrektur der Verwendung von EC
|
48 |
+
text_input = WebDriverWait(wd, 25).until(
|
49 |
+
EC.presence_of_element_located((By.ID, 'chat-input'))
|
50 |
+
)
|
51 |
+
time.sleep(4)
|
52 |
#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")
|
53 |
#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")
|
54 |
text_input.send_keys(f"{message}")
|
55 |
+
|
56 |
text_input.send_keys(Keys.RETURN)
|
57 |
time.sleep(8)
|
58 |
elements = wd.find_elements(By.TAG_NAME, "p")
|