'Actionchains not working in selenium-python
comment = driver.find_element(By.CLASS_NAME, 'Ypffh')
next_feed = driver.find_element(By.CLASS_NAME,"wpO6b")
try:
action = ActionChains(driver)
action.move_to_element(comment)
action.click()
action.pause(3)
df_comment = pd.read_excel(file_path[0], sheet_name = "Sheet1")
real_comment = random.choice(df_comment["댓글"])
comm = real_comment.split('-n')
for i, c in enumerate(comm):
c = c.replace("-n", " ")
action.key_down(Keys.SHIFT).send_keys(Keys.ENTER).key_up(Keys.SHIFT)
action.send_keys(c)
i += 1
action.pause(1)
action.send_keys(Keys.ENTER)
action.perform() **// it works until here**
time.sleep(5)
action.move_to_element(next_feed)
action.click()
action.perform() **// it's not working**
I'm planning to open instagram links and leave comments from xlsx.
until leaving comments works fine, but clicking the next button (next_feed) isn't working
can you enlighten me what's wrong with the code?
cheers!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
