I am trying to build an instagram bot with selenium. So far I have managed to get it work with 1 chrome window and 1 account, it auto follows, likes etc. with the given http requests on my express server. However when I try it with 2 different accounts on 2 different selenium instances or windows, the first one stops executing the function(or maybe it starts executing on the second chrome window, I dont know whats happening). So can anyone explain me if and how its possible to continue execution on multiple windows? Note: I don't want to switch between instances.
- use a different thread for each instance... post the code you are using now.– browsermatorCommentedMay 6, 2020 at 21:20
- the code is quite complicated and long thats why i didnt post it. Basically it consists of one js file for listening http requests for different functionalities such as auto follow, username scrap, auto unfollow etc. and other js files for each of these functionalities. I dont know if its the right way to split the code but this is how I did it.– Ozan YılmazCommentedMay 6, 2020 at 22:08
Add a comment |
1 Answer
You can use the Selenium Grid to implement the scenario.
Generally, Hub & Node Structure is generally used to run parallel Tests.
https://www.guru99.com/introduction-to-selenium-grid.html Above link will help you to get the concept of Grid.