0

I'm trying to make a simple code automation. It firstly, needs to login, then perform some action.

When I run the code in eclipse it logs in (i'm solving captcha manually for 3 minutes) then the process should start.

After some changes when I click run, it tries to login again. This happens every time.

But after different attempts to fix it, the login process still takes a long time for me. After x amount of attempts it also causes me to be banned from the site.

So, without login again and again. After every code changes, how can I get my automation to work?

E.g: RUN 
1-)go to youtube.com 
2-)login 
3-)go to any song 
4-)get song's name, save

I'm making some code changes on 3rd and 4th process, and then i'm clicking RUN. It's starting at 1st step again (login). After clicking run 3-4 times, It causes me to be banned from the site.

The main question: How can i try 3rd 4th step codes without login process again.

I hope you can understand my issue.

Oozeerally
  • 842
  • 12
  • 24
  • it's best to set Selenium to use a specific browser profile that has already been logged in and remembered. Sounds like the captcha will always be an issue though. (probably knows you're a bot) – pcalkins Jul 22 '20 at 21:20

1 Answers1

0

I had the same thought in the initial days of my testing career. As far as I understood you want to save time by skipping the login steps. I have two ways to suggest -

  1. Execute your scripts on same webdriver session every time, details here - Can Selenium interact with an existing browser session?
  2. You can switch from eclipse to IntelliJ ide. In IntelliJ, you can execute new/modified scripts in debugger mode. Execute your script in debugger mode, right-click and select 'evaluate expressions'. In the opened window you can execute any command on the same browser session Click this link for image
ayu
  • 11
  • 3