Python Selenium Automatic Follow Instagram Python Selenium Automatic Follow Instagram selenium selenium

Python Selenium Automatic Follow Instagram


You need to use ActionChains when click on an element. So your code will be something like this:

good_elem = browser.find_element_by_xpath('//*[@id="react-root"]/section/main/div/article/div/div[1]/div/form/span/button')ActionChains(browser).move_to_element(good_elem).click().perform()

and for follow button, the code will be something like this:

follow = browser.find_element_by_xpath('//*[@id="react-root"]/section/main/div/header/section/div[1]/span/span[1]/button')ActionChains(browser).move_to_element(follow).click().perform()