Connect to an existing browser in selenium with C# | Debug automation scripts | Chrome debug mode

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • In this video I am gonna discuss how you can connect to an existing instance of chrome browser running in debug mode.
    This comes handy when we have to debug our scripts, but we don't want to run all the steps of a test case to bring it to the breakpoint. Because running all the steps again can take a lot of time.
    So let's move inside the video to get more details.
    *************Please comment in case of any query************
    Please watch below video as well -
    To start with selenium project in c#. : • Selenium with C# | Cre...
    5 time saving tips for visual studio : • 5 Time Saving Shortcut...
    Drag and drop operation in selenium : • How to perform drag & ...
    How to switch dotnet core version : • How to switch .Net cor...
    Ternary or conditional operator : • Replace if-else block ...
    String manipulation : • Avoid using String var...
    Klov report server : • Selenium with C# | Klo...
    Dynamic v/s Var in c# : • Dynamic vs Var | C#

КОМЕНТАРІ • 12

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

    Thanks! I didn't know that '--user-data-dir' option is so important

  • @supriyaphule5532
    @supriyaphule5532 6 місяців тому +1

    Can you create video on passing the url I am getting an error as an argument is null while ryun test case

    • @maximumautomation
      @maximumautomation  6 місяців тому

      In this video itself, it moves to the webpage which we have provided using driver.navigate()... Could you please share the full stack trace to identify your issue?

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

    How to do the same with InternetExplorerDriver or EdgeDriver?

    • @maximumautomation
      @maximumautomation  11 місяців тому

      You can run the below command to open the edge browser in debug mode.
      Start msedge.exe --remote-debugging-port=9444 --user-data-dir=
      And then update the code to initiate a webdriver object with edgedriver instead of chromedriver.

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

    Hi, can you please do same video for edge browser?

  • @JasonBurtt
    @JasonBurtt 6 місяців тому

    How do you do this with python?

    • @maximumautomation
      @maximumautomation  6 місяців тому

      Hi,
      Please try the code below to do this with python.
      chromeoptions = Options()
      chromeoptions.add_experimental_option("debuggerAddress", "127.0.0.1:9000")
      driver = webdriver.Chrome(options=chromeoptions)

    • @JasonBurtt
      @JasonBurtt 6 місяців тому +1

      Thank you!