-1

I want to fill some field of a webpage and then send a request to it but this website has a very powerful login page to avoid sending requests for login from a robot so I can't log in with selenium but after login, I can use selenium and I can send requests, on the other hand, I write this program for an app so I can't open a web driver and then work on it
I need to work on a tab that exists

I want to program work on a session that a human opened

  • Does this answer your question : [Can Selenium interact with an existing browser session?](https://stackoverflow.com/questions/8344776/can-selenium-interact-with-an-existing-browser-session) – Devansh Soni Apr 19 '20 at 11:42
  • no, in this one say the program open a session but I want to human open a session – Golabie Plus Apr 19 '20 at 11:47

1 Answers1

0

From what I understand from your question is that you want to open an existing browser that is launched by a human.

There are multiple ways to achieve this and as mentioned by Devansh in the comment, You can use the session ID to get the already launched browser and execute your test script on it.

However, there is another way that might be able to solve your issue of executing scripts on already open connection or logged in user.

You can use the profiles of browsers for this scenario, User profiles in a browser are like user accounts on a computer.

You can use the answer to this question to create and use profiles in your script: Opening an existing tab/logged in user using Chrome Webdriver

Now You can manually log in the required account for the website on the above profile you are struggling to log in and then launch the scripts.

  • this website doesn't save your last login so each time you want to use this website you have to log in to it and each time you have to prove that you are not a robot – Golabie Plus Apr 20 '20 at 09:02
  • @GolabiePlus I am sorry to tell you that robot checks also known as CAPTCHA are placed to restrict automation/bots to the website, If you still want to test them using automated scripts then you will have to ask the developers to disable the robot check for staging version maybe . – Mujtaba Mehdi Oct 01 '20 at 13:53