How To Execute Selenium Scripts On Already Opened Browser

Поділитися
Вставка
  • Опубліковано 23 лют 2021
  • In this video, I will share how to execute selenium test or script on already opened browser using Chrome DevTools Protocol.
    Here the blog link along with code
    learn-automation.com/how-to-ex...
    Chrome Devtools
    chromedevtools.github.io/devt...
    All Videos
    / mukeshotwani
    All Playlist
    / mukeshotwani
    Connect with us:
    Linkedin- / mukesh-otwani-93631b99
    Instagram- / mukeshotwani
    Facebook Group- / 256655817858291
    Facebook Page- / seleniumwebdrivermukesh
    Twitter- / mukeshotwani
    Blog- learn-automation.com
  • Наука та технологія

КОМЕНТАРІ • 162

  • @sanghamitrabhowmicklive3013
    @sanghamitrabhowmicklive3013 2 роки тому +6

    This is amazing information. I really donno how should we thank you for all the knowledge you have been sharing with us. Hats off to you!!!!!

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому +1

      Thank you so much 🙏 Sanghamitra

  • @prathameshlad6565
    @prathameshlad6565 Рік тому

    The only video I found helpful for this topic. I Spend 3 days searching for relevant information and finally found it. Thank you very much.

  • @SameerKumar-yu1xi
    @SameerKumar-yu1xi 3 роки тому +2

    Day end with something new... Worth 21 min of the day👍🏻 thx sir

  • @Therinjikkuvom
    @Therinjikkuvom 3 роки тому

    Thanks for the session Mukesh! You are doing very useful works. Keep it up. Well done!!!

  • @sreereshvkm726
    @sreereshvkm726 3 роки тому

    Loved it.. Expecting many more like this

  • @vijaykumar-ut1ze
    @vijaykumar-ut1ze 3 роки тому

    I have been waiting till now for this option..thanks mukesh for giving the session on this

  • @MeixnerQuest
    @MeixnerQuest 3 роки тому +1

    I been looking for this information, great tutorial

  • @SarangHoley
    @SarangHoley 3 роки тому

    Amazing topic covered Mukesh 👍

  • @karthikeyaguptha
    @karthikeyaguptha Рік тому

    Thanks for giving information on how to run scripts on existing chrome instance opened ...Helped me a lot

  • @balagopalt4447
    @balagopalt4447 3 роки тому

    Thanks a lot Mukesh for the video. Excellent video. Very much useful.

  • @engineerraj1662
    @engineerraj1662 3 роки тому

    Thank you so much for sharing this with us Mukesh 👍

  • @sumitsaha9782
    @sumitsaha9782 3 роки тому

    Amazing feature. Thanks sir. This will be very handy for on-the-fly scripting and validation of the developed scripts :)

  • @TheyCallMeDin
    @TheyCallMeDin 3 роки тому +1

    Been wanting to find a way to do this for years! Thank you!!

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      Welcome mate I m glad it helped ☺️

  • @shadowfrost420
    @shadowfrost420 3 роки тому

    Thank you for sharing , good information as always !

  • @sdetworld8997
    @sdetworld8997 3 роки тому

    Very good info Mukesh. Thank you for the same. this is a painkiller.

  • @kunalshah332
    @kunalshah332 3 роки тому

    Great session ...very helpful✌

  • @jagadeeshbedge8447
    @jagadeeshbedge8447 3 роки тому +3

    Thank you Mukesh.. it saved me a lot of time in rework .

  • @tapaspadhi1530
    @tapaspadhi1530 3 роки тому

    it helps Mukesh. Thanks for sharing

  • @mandeep3445
    @mandeep3445 3 роки тому +1

    Thank you very much Mukesh!!!

  • @panchananbhattacharjee9512
    @panchananbhattacharjee9512 2 роки тому +1

    This is so helpful, looking for this option long time. Thanks a lot for sharing. Thumbs Uppp

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      Thanks Panchanan, I am glad it helped you.

  • @saikrishna.b736
    @saikrishna.b736 3 роки тому

    Thanks for this interesting video... Thought of this but didnot search any time or tried checking for this...

  • @praveenvanam6491
    @praveenvanam6491 3 роки тому

    Thank you so much for this new topic

  • @swamyas5668
    @swamyas5668 3 роки тому

    Thank you 🙏 for teaching new things 👌

  • @hafezgharib7639
    @hafezgharib7639 2 роки тому

    You gotta a new subscriber for this one :). Very helpful, I was looking for this the whole day ^^, thank you so much. Could you do the last part(the one you extracting the debuggerAddress) in python pls?

  • @etemkeskin5025
    @etemkeskin5025 3 роки тому

    you saved my lots of time. thanks

  • @JitendraKumar-lr3vq
    @JitendraKumar-lr3vq 2 роки тому +1

    This was amazing concept to learn.. thanks a lot for explaining in such details..

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому +1

      Thank you Jitendra and welcome back too 😊

  • @adityapratapsingh3825
    @adityapratapsingh3825 3 роки тому

    You r awesome brother..

  • @shankumondal2881
    @shankumondal2881 3 роки тому

    Awesome 👍

  • @pallabipurohit1061
    @pallabipurohit1061 3 роки тому

    Very informative

  • @mauryar16
    @mauryar16 3 роки тому +2

    Thnx for this video..It made debugging in less time

  • @sindhusudhakaran1731
    @sindhusudhakaran1731 3 роки тому +1

    this is very useful .. thank you !!

  • @sanjay4727
    @sanjay4727 3 роки тому +1

    Very useful, Thanks for sharing this

  • @subisw
    @subisw 2 роки тому

    OH It's cool...Thank you!

  • @rkn3383
    @rkn3383 3 роки тому

    Just awesome

  • @dibakardey6097
    @dibakardey6097 Рік тому

    Hi @Mukesh, suppose the testcase fails in particular step is it possible to run the script from the step it got failed in the same session

  • @surajgoenka
    @surajgoenka 3 роки тому

    I will execute last 2 steps manually lol jokesapart, thankyou for the video

  • @vinayakchavan7694
    @vinayakchavan7694 2 роки тому

    Its awesome 😊 thank you...

  • @srujjhanaadevy3712
    @srujjhanaadevy3712 Рік тому

    @Mukesh otwani is it possible to execute the command via java code itself rather than manually executing it on terminal

  • @smartpatel8093
    @smartpatel8093 Рік тому

    Hello sir set experiment option is not Avelible in c# any idea ???

  • @prikshitverma3885
    @prikshitverma3885 3 роки тому

    Dhanyawad 🔥🔥

  • @aniketfarkase9759
    @aniketfarkase9759 3 роки тому +1

    Excellent

  • @warademilind
    @warademilind Рік тому

    Is it possible to do with Electron based application (desktop based app- chromium)? I am able to launch and execute properly..but not sure how to go ahead with already opened app. Thanks

  • @goldentertainment2335
    @goldentertainment2335 3 роки тому +1

    Thank You So much sir,

  • @angelus806
    @angelus806 2 роки тому

    what about an user session with extensions already installed? or a browser already running with a profile already working .. how can I drive that ?

  • @shubhamm1843
    @shubhamm1843 2 роки тому +1

    that was a good one but i have different chrome profiles, how to executive a particular script on a particular profile

  • @darkevil9348
    @darkevil9348 Рік тому

    I have a question is it compulsory to add driver.get() line.

  • @viplovebisen
    @viplovebisen 3 роки тому

    awesome

  • @prestonkingsley375
    @prestonkingsley375 3 роки тому

    Thank u sir, learnt something new. Could you please show how to sort a webtable based on dates

  • @pranjaliganorkar7731
    @pranjaliganorkar7731 3 роки тому

    Hi Mukesh, your videos on Selenium are very helpful. I am working on Selenium with Typescript as the underlying language. This is a very different language considering from Java background. Would you be able to post some videos on Selenium with Typescript and Jest or other test runner framework? Thanks in advance.

  • @MrBoingts
    @MrBoingts Рік тому

    Hi, I followed and doubled checked all the steps, but when i hit enter ( +- 5:46) I open a browser BUT i'm still signed in - I have created this folder in my C driver - is that the issue ?

  • @chakrabmonoj
    @chakrabmonoj 3 роки тому

    Hi Mukesh - thanks for another great lesson. Very helpful.
    I had a question : will the same commands work with Python as well, or these can be used only with Java?
    Thanks

  • @venpraveen
    @venpraveen 3 роки тому

    Hi mukesh, my eclipse is not supporting the browser because of updates, which version is the best t o support browser windows 64 bit machine.
    Thanks in advance

  • @Imran-M-
    @Imran-M- 3 роки тому

    Thanks Mukesh for making this video.
    I've tried to use TestNg instead of main() : @BeforeMethod (wrote "debuggerAddress" code in this block)
    @Test (driver.get(), sendKeys() here )
    @AfterMethod (driver.quit() here)...................but for some reason code in @After is not recognized and not taken. Any idea?

  • @BlackCherry11140
    @BlackCherry11140 2 роки тому +2

    what if we want to use existing session where all extension and logged accounts are available instead of fresh new session just came to my mind if it is possible please share it as soon as possible....

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      You can reuse sessions which is started via CDP

  • @srajanshrivastava8391
    @srajanshrivastava8391 Рік тому

    Hi, i am using grid implementation in my project, we are able to get running chrome session in local but when we change local host to the IP of other machine it say cannot connect to chrome::, Can you please help me on this

  • @jatinqa4020
    @jatinqa4020 9 місяців тому

    Thank you sir, I have 1 question that i am using chrome 117.0.5938.132 but chromedriver.exe is not working with this what to do

  • @shubhamjha5738
    @shubhamjha5738 3 роки тому

    Sir if we put our website in production,hosting is done. Then what will happen, again we need to execute commands on terminal?

  • @monikasingh2295
    @monikasingh2295 2 роки тому

    Hi Mukesh, How to use the same approach while executing the script in edge?

  • @KhalilYasser
    @KhalilYasser 3 роки тому

    Thank you very much. Can you make another same video for python?

  • @amiablekrishna
    @amiablekrishna Рік тому

    Mukesh, Can you explain, how to continue with next scenario in case of a Failure any test in Selenium? i need to execute all scenario.

  • @BennyJonesDG
    @BennyJonesDG Місяць тому

    is it possible to do this in the Edge browser??

  • @poornimamanjunath6205
    @poornimamanjunath6205 2 роки тому +1

    Mukesh, Is is possible for you to please share the python code for the same? or any link? Also, what if I want to attach to a webpage using its title not the url? what is the selenium api for connecting to a web page using its title?

  • @manickarajans6653
    @manickarajans6653 3 роки тому

    How to turn off remote debugging in edge chromium through edge options.. requirement to test in IE mode

  • @hammadmaqsood6395
    @hammadmaqsood6395 2 роки тому +2

    Hi, can you provide the same code for C# developers
    Good video.

  • @travellover3934
    @travellover3934 Рік тому

    Its possible to use screenshot function here?

  • @namratasingh3464
    @namratasingh3464 Рік тому

    Hi Mukesh, thanks your videos are really helpful!
    I have a query, in which when I am clicking on a button it is giving me one id, then have to wait overnight, and then next day login on the other URL where this id will have few account numbers and other data which I have to verfiy. but waiting overnight is must for data to generate , How this can be managed using Selenium ?
    Thanks!

  • @niyus56489
    @niyus56489 2 роки тому

    This is really awesome.. Thank you....can we do the same for edge browser also..I tried it is showing some error..can u pls help

  • @miketysonschwarzeneggerpra9215
    @miketysonschwarzeneggerpra9215 3 роки тому

    Excellent video. Please activate subtitle in your videos.

  • @xitcode
    @xitcode Рік тому

    thanks

  • @madhiyazhagansm9659
    @madhiyazhagansm9659 3 роки тому

    Hi Mukesh, can we execute Appium scripts on already opened app ?

  • @Jerometk
    @Jerometk 2 роки тому +1

    How can I do this in firefox geckodriver?

  • @adosdiagne8359
    @adosdiagne8359 2 роки тому

    Thank you Mukesh.. it is very interesting.
    How can do this with webdriverio ?

  • @user-qn6jp3bw8n
    @user-qn6jp3bw8n 4 місяці тому

    Hi Mukesh,
    In chromedriver version 3.141.59 this func is not working

  • @mahatheedandibhotla
    @mahatheedandibhotla 3 роки тому

    whats the use of creating chromedata folders

  • @juliebrennan-oit8409
    @juliebrennan-oit8409 2 роки тому

    Hi the chrome session will open from the command line, but when I run from selenium script I get the following error: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: cannot connect to chrome at localhost:8989
    from chrome not reachable Can you help me?

  • @mohammadhoseinkarimi4721
    @mohammadhoseinkarimi4721 2 роки тому

    hi!
    it still does not work for me and open the new chrome window.
    could you please help me
    I'm new
    but I really need it
    thanks!

  • @rajeshkumar-no8sp
    @rajeshkumar-no8sp Рік тому

    Can we do this on mac?

  • @vinodkumaryadav1292
    @vinodkumaryadav1292 Рік тому

    Thanks Mukesh.. It's very helpful...
    I am trying to do same with Edge driver but it's not letting me do..
    Would you please help me with Edge browsers

  • @hamimalam4968
    @hamimalam4968 3 роки тому

    I want to know what if we use two class and call the class in the main method. how do I do it. please make a video about it.. thanx

  • @hdstudio1875
    @hdstudio1875 3 роки тому +1

    Only problem is, if u open the task manager or try to kill existing drivers using task kill, u will be able to see that it's creating new driver everytime however the browser is same, as u r using 'new ChromeDriver(opt)' method.
    So am unable to find out how to use the existing instance of driver so that I can close it, coz every body may not have admin permission to use taskKill to kill drivers.

  • @chromeuser7363
    @chromeuser7363 Рік тому

    Anybody knows the command for linux that'll keep the browser window open at port 9222

  • @srikanthvodnala2505
    @srikanthvodnala2505 2 роки тому

    Hi great explanation I loved it
    I have one doubt we are connecting to the existing opened browser.
    If in one situation
    for example
    by selenium I log in to Facebook.
    after finishing my work I closed the existing browser to which selenium is connected.
    Then I have run the same selenium code I have to log in again or In that browser it already login.
    Doubt: After closing the browser how to open the existing browser in which all our login credentials and cookies are stored.

  • @alexdin1565
    @alexdin1565 Рік тому

    can run selenium on cpanel?

  • @akcandlestick8948
    @akcandlestick8948 2 роки тому +1

    every time we type console command for this execute selenium ??

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      Once it is opened then you can use until you close manually.

  • @sagaryenkar3988
    @sagaryenkar3988 2 роки тому

    It's possible in headless mode

  • @piyushmarda9720
    @piyushmarda9720 3 роки тому

    This is very informative Mukesh. I never found a solution for this issue till date. I used to like UFT more than selenium for the same reason. Is there any solution for edge browser as well?

    • @Mukeshotwani
      @Mukeshotwani  3 роки тому

      yes same thing can be done for Edge too

  • @maheshharish6415
    @maheshharish6415 3 роки тому

    Hi Mukesh , chrome update version 88.0.4324.182, which chrome driver version is used ?

  • @lisaagarwalla799
    @lisaagarwalla799 Рік тому

    Hi Naveen , can i achieve the same if i am running my automation on a remote device using selenium grid . I tried but not able to acheive it . can you help me here

    • @Mukeshotwani
      @Mukeshotwani  Рік тому

      It's Mukesh not Naveen 😜

    • @lisaagarwalla799
      @lisaagarwalla799 Рік тому

      @@Mukeshotwani hey sorry mukesh . Can you please help me here if i can acheive the same using remotewebdriver?

  • @iyogi23
    @iyogi23 3 роки тому

    How to do it on a mac machine? chrome.exe wont work

  • @rpfoodie799
    @rpfoodie799 2 роки тому

    Can Anyone here suggest some code for edge browser using VBA selenium

  • @nirbhaydeeptrigunayat1767
    @nirbhaydeeptrigunayat1767 5 місяців тому

    how to open "default" chrome browser using selenium with java and navigation url.

  • @kailaspoduval
    @kailaspoduval 3 роки тому

    Thanks a lot Mukhesh ji🙂..really useful one in day to day automation work..a Time saver while checking fixes. Could you pls let me know is this possible in Firefox browser??

    • @Akit87
      @Akit87 2 роки тому

      I am also looking for firefox, did you find any solution?

    • @sriramkasu5286
      @sriramkasu5286 2 роки тому

      @@Akit87 same me too

    • @Akit87
      @Akit87 2 роки тому

      @@sriramkasu5286 I tried various methods but none of them worked for me

    • @sriramkasu5286
      @sriramkasu5286 2 роки тому

      @@Akit87 same here...but I saw some forums and documenations mentioning --connect-existing flags and also --marionette flaga

    • @Akit87
      @Akit87 2 роки тому

      @@sriramkasu5286 same I also saw these options on some forum, but not sure how to use these

  • @johnmichaelsampedro2828
    @johnmichaelsampedro2828 Рік тому

    I am getting error 500. How to solve it?

  • @genghiskhan5685
    @genghiskhan5685 2 роки тому +2

    You have a video using Python, and in this video you are using Java. You should specify that in the title so anyone looking for your similar videos can differentiate thanks.

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      For Python ua-cam.com/video/Zrx8FSEo9lk/v-deo.html
      For Java ua-cam.com/video/Rrkj4tdXngY/v-deo.html

  • @user-ky8lz4ol4m
    @user-ky8lz4ol4m 2 роки тому +1

    Hi Mukesh,
    Nice video! Thanks for creating it.
    I followed all the steps as shown in the video but still for me it is opening another browser rather than executing in the opened browser.
    Could you please help me to resolve the issue?
    Thanks,
    Swati

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      Hi Swati, please watch video again you might have missed some minor steps.

    • @user-ky8lz4ol4m
      @user-ky8lz4ol4m 2 роки тому +1

      I followed all the steps. I think Selenium is not recognizing the browser instance that I am opening manually. I don't know if while opening browser manually it opens on the port no which I am giving.

    • @Mukeshotwani
      @Mukeshotwani  2 роки тому

      @@user-ky8lz4ol4m share ur code

    • @prasannaselva4525
      @prasannaselva4525 2 роки тому

      @@Mukeshotwani It's the same for me..
      Please help me

  • @RekhaDeshmane-p6r
    @RekhaDeshmane-p6r 5 днів тому +1

    Can we execute same on safari?

  • @hennymakaveli
    @hennymakaveli 3 роки тому

    @Mukesh Otwani, can we do this in Firefox? #MukeshOtwani

    • @Akit87
      @Akit87 2 роки тому

      were you able to find the solutuon for firefox?

  • @sarbjitdeol5314
    @sarbjitdeol5314 Рік тому +1

    sir its necessary to still open cmd

    • @Mukeshotwani
      @Mukeshotwani  Рік тому +1

      Yes Sir. Once you close the cmd the port number will be released and you won't be able to interact.

    • @sarbjitdeol5314
      @sarbjitdeol5314 Рік тому

      can you send the python scrpit for run script automatically open cmd and with command

  • @nilesh123234
    @nilesh123234 2 роки тому

    Can we do the same on macbook ???

    • @nilesh123234
      @nilesh123234 2 роки тому

      I am not able to run second command in mac terminal

  • @michellecortes1176
    @michellecortes1176 3 роки тому

    Hi Mukesh, new subscriber here. Thanks so much for your videos, I find them really easy to follow.
    Super Job!
    Just posting also this query, in the hopes, you could help me.
    I tried to follow your steps here, but I was getting this error:
    org.openqa.selenium.WebDriverException: unknown error: cannot connect to chrome at localhost:9988
    What should I do?
    Thanks in advance for the response :)

    • @sdetworld8997
      @sdetworld8997 3 роки тому

      I too faced this, from google which helped later, Also mukesh was mentioning the chome should be the default browser..
      May be this will work if user "chrome.exe --remote-debugging-port= --no-default-browser-check --user-data-dir="

    • @michellecortes1176
      @michellecortes1176 3 роки тому

      @@sdetworld8997 THank you for the response, yes my chrome is set to default, and the command above though sadly didn't work for me