Click here to Skip to main content
15,889,403 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am trying to make an instagram bot which follows followers of specific user.
Now when i click on their followers, a new windows pops up and takes the focus.

What i want to do?
-> Instagram generates dynamic data. so i want to scroll down so that it generates approximately 40 users. then i will gain control over the button and follow each of them.

View the image here -->
<a href="https://ibb.co/dyDrXG">Image</a>


I want to gain focus on the Tab having title Followers.

What I have tried:

ActionChains(browser).move_to_element(followers_count[0]).click().perform()
time.sleep(5)

body_elem_2 = browser.find_element_by_xpath("//*[text()='Follow']")
body_elem_2.send_keys(Keys.ENTER)

for _ in range(3) :
	body_elem_2.send_keys(Keys.END)
	time.sleep(5)
	body_elem_2.send_keys(Keys.HOME)
	time.sleep(5)
Posted
Updated 27-Dec-17 8:26am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900