How to load webpage using selenium webdriver in already running chrome browser using python|Selenium and python|How to load default chrome profile using selenium python|How to load same chrome profile everytime in selenium

 

English

Introduction

In this page you will get information about How can you load webpage using selenium webdriver in already running chrome browser using python.Explained both in ENGLISH and Hindi.
Note:-You should have chromedriver already installed in it.

SELENIUM
Selenium is a framework which allows us to access webpages and different websites using coding languages like pythom,java..etc.Generally it is used for automation processes.

Where can it be used?
It can be used for conducting 90% of the online works automatically in one click.It can cover a huge workspace from personal account login to Major business works.

Generally,In each execution the webdriver opens a new chrome profile/session.This creates problem when we want to access already logged-in profiles.

So,steps to do so are:
  1. Open command prompt.
    • (In windows use "WINDOWS +R") 
    • Then Click Okay



  2. Open chrome file location
    • Search for chrome using task bar
    • RIGHT CLICK and Open file location

    • If you get location of shortcut then again right click on the chrome shortcut and open file location


    • Copy the path of chrome.exe as shown

    • Open cmd and then input command:- cd "Paste the path of file as shown in image".

    • Now Copy & Paste this code in cmd as shown in the image:-
    • chrome.exe --remote-debugging-port=8989 --user-data-dir="path of chromedriver"

    • Hit "Enter ".You can see a new chrome window which will open everytime you do this.
  3. So to perform operations on this window
    • Use the following code


"Hope it helped"
Have anything in mind? Let me 
know in the comment section👇

Next Post Previous Post
No Comment
Add Comment
comment url