How To Execute Selenium Scripts On Already Opened Browser
Ғылым және технология
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
Пікірлер: 164
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
2 жыл бұрын
Thank you so much 🙏 Sanghamitra
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.
Day end with something new... Worth 21 min of the day👍🏻 thx sir
Thanks for the session Mukesh! You are doing very useful works. Keep it up. Well done!!!
I have been waiting till now for this option..thanks mukesh for giving the session on this
Thanks for giving information on how to run scripts on existing chrome instance opened ...Helped me a lot
I been looking for this information, great tutorial
Loved it.. Expecting many more like this
Thank you so much for sharing this with us Mukesh 👍
Thanks a lot Mukesh for the video. Excellent video. Very much useful.
Very good info Mukesh. Thank you for the same. this is a painkiller.
Amazing feature. Thanks sir. This will be very handy for on-the-fly scripting and validation of the developed scripts :)
Been wanting to find a way to do this for years! Thank you!!
@Mukeshotwani
3 жыл бұрын
Welcome mate I m glad it helped ☺️
Thank you Mukesh.. it saved me a lot of time in rework .
@Mukeshotwani
3 жыл бұрын
Glad it helped Jagadeesh
Amazing topic covered Mukesh 👍
Thanks for this interesting video... Thought of this but didnot search any time or tried checking for this...
This is so helpful, looking for this option long time. Thanks a lot for sharing. Thumbs Uppp
@Mukeshotwani
2 жыл бұрын
Thanks Panchanan, I am glad it helped you.
Thank you for sharing , good information as always !
Thank you very much Mukesh!!!
This was amazing concept to learn.. thanks a lot for explaining in such details..
@Mukeshotwani
2 жыл бұрын
Thank you Jitendra and welcome back too 😊
it helps Mukesh. Thanks for sharing
Thank you 🙏 for teaching new things 👌
Great session ...very helpful✌
Thank you so much for this new topic
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?
I will execute last 2 steps manually lol jokesapart, thankyou for the video
you saved my lots of time. thanks
Thnx for this video..It made debugging in less time
@Mukeshotwani
3 жыл бұрын
Thanks Rajendra.
You r awesome brother..
Very informative
Very useful, Thanks for sharing this
@Mukeshotwani
3 жыл бұрын
Glad it was helpful! Sanjay
this is very useful .. thank you !!
@Mukeshotwani
3 жыл бұрын
You are welcome! Sindhu
OH It's cool...Thank you!
Awesome 👍
Thank u sir, learnt something new. Could you please show how to sort a webtable based on dates
Just awesome
Dhanyawad 🔥🔥
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.
that was a good one but i have different chrome profiles, how to executive a particular script on a particular profile
Thank you very much. Can you make another same video for python?
Its awesome 😊 thank you...
@vinayakchavan7694
2 жыл бұрын
For Microsoft edge we can do same solution na???
Thank You So much sir,
@Mukeshotwani
3 жыл бұрын
Most welcome Mate
Hello sir set experiment option is not Avelible in c# any idea ???
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
Thank you Mukesh.. it is very interesting. How can do this with webdriverio ?
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
Excellent
@Mukeshotwani
3 жыл бұрын
Thank you so much 😀 Aniket
Hi, can you provide the same code for C# developers Good video.
Excellent video. Please activate subtitle in your videos.
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
@Mukesh otwani is it possible to execute the command via java code itself rather than manually executing it on terminal
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
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
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!
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?
Hi Mukesh, How to use the same approach while executing the script in edge?
I have a question is it compulsory to add driver.get() line.
awesome
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.
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
2 жыл бұрын
You can reuse sessions which is started via CDP
thanks
is it possible to do this in the Edge browser??
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.
what about an user session with extensions already installed? or a browser already running with a profile already working .. how can I drive that ?
How to turn off remote debugging in edge chromium through edge options.. requirement to test in IE mode
Its possible to use screenshot function here?
whats the use of creating chromedata folders
How can I do this in firefox geckodriver?
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
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
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
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 ?
Sir if we put our website in production,hosting is done. Then what will happen, again we need to execute commands on terminal?
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?
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
3 жыл бұрын
yes same thing can be done for Edge too
Can we do this on mac?
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
Hi Mukesh, can we execute Appium scripts on already opened app ?
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
2 жыл бұрын
For Python kzread.info/dash/bejne/jKasmqiMddKfnM4.html For Java kzread.info/dash/bejne/hKafzJatlLvUl7w.html
It's possible in headless mode
can run selenium on cpanel?
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!
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.
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
3 жыл бұрын
I am also looking for firefox, did you find any solution?
@sriramkasu5286
3 жыл бұрын
@@Akit87 same me too
@Akit87
3 жыл бұрын
@@sriramkasu5286 I tried various methods but none of them worked for me
@sriramkasu5286
3 жыл бұрын
@@Akit87 same here...but I saw some forums and documenations mentioning --connect-existing flags and also --marionette flaga
@Akit87
3 жыл бұрын
@@sriramkasu5286 same I also saw these options on some forum, but not sure how to use these
every time we type console command for this execute selenium ??
@Mukeshotwani
2 жыл бұрын
Once it is opened then you can use until you close manually.
Hi Mukesh, In chromedriver version 3.141.59 this func is not working
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?
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
2 жыл бұрын
Hi Swati, please watch video again you might have missed some minor steps.
@user-ky8lz4ol4m
2 жыл бұрын
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
2 жыл бұрын
@@user-ky8lz4ol4m share ur code
@prasannaselva4525
2 жыл бұрын
@@Mukeshotwani It's the same for me.. Please help me
Anybody knows the command for linux that'll keep the browser window open at port 9222
********** *VERY DIFFERENT SCENARIO* ********** Hi Muskesh, I have one scenario where i launch an exe file using dekstop based tools and then it opens up a browser for me to select my credentials (Azure Web SSO functionality) but it is opened by that application so i cannot open it in the debugging mode. Usually i can handle the chrome from desktop also in which i execute a jar file with the set of functions but here the challange is to interact with the chrome broswer which is opened by the functionality. Is there a way that i can interact with that chrome instance.... Many Thanks in advance.
how to open "default" chrome browser using selenium with java and navigation url.
Can Anyone here suggest some code for edge browser using VBA selenium
Can we do the same on macbook ???
@nilesh123234
2 жыл бұрын
I am not able to run second command in mac terminal
My Requirement is: Prerequisites: 1) Launch Google Chrome as "Run as Different User" (Right click of the Chrome icon) 2) Enter Windows user and password in the popup when it appears 3) Google chrome launches manually Actual Test begins: I need to enable the bridge with the manually opened Google Chrome browser and then continue the rest of the test. Do you have any solution? Your help is very much appreciated.
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
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
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
Can we execute same on safari?
@Mukeshotwani
17 күн бұрын
No
How to do it on a mac machine? chrome.exe wont work
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
2 жыл бұрын
It's Mukesh not Naveen 😜
@lisaagarwalla799
Жыл бұрын
@@Mukeshotwani hey sorry mukesh . Can you please help me here if i can acheive the same using remotewebdriver?
sir its necessary to still open cmd
@Mukeshotwani
Жыл бұрын
Yes Sir. Once you close the cmd the port number will be released and you won't be able to interact.
@sarbjitdeol5314
Жыл бұрын
can you send the python scrpit for run script automatically open cmd and with command
I am getting error 500. How to solve it?