We are experiencing an issue when running Python Script via Jenkins, the browsers refuse to open up the URL, however, when we run them manually, then it works.

      Pre Requirement:
      Firstly, Need to create a project in Jenkins.
      Next, In the project configuration-> Build section need to add below details.
      For example:-
      cd <Python_Script_Folder_Path>
      python <Python_File_Name>.py

      My Python Sample Script:
      import webbrowser
      import subprocess
      mycmd = r'start chrome /new-tab {}'.format("https://outlook.office.com")
      n2 = subprocess.Popen(mycmd, shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE)

      post-execution process:
      Firstly, go to the Jenkins project and click on Build Now option.

      Expected Result:
      Default browser should be open along with given URL.

      Issue:
      The script is running successfully but browser not opening.

      Note: If you run python script via cmd prompt or any IDE works perfectly.

          [JENKINS-58838] Browsers not launching through Jenkins

          Sharathkumar K G created issue -
          Victor Martinez made changes -
          Component/s Original: jenkinslint-plugin [ 20644 ]
          Victor Martinez made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          Victor Martinez made changes -
          Assignee Original: Victor Martinez [ v2v ]
          Sharathkumar K G made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Sharathkumar K G made changes -
          Assignee New: Arun jose [ 0404 ]
          Sharathkumar K G made changes -
          Rank New: Ranked higher
          Sharathkumar K G made changes -
          Assignee Original: Arun jose [ 0404 ] New: Sharathkumar K G [ iamsharathgangadhar ]
          Sharathkumar K G made changes -
          Assignee Original: Sharathkumar K G [ iamsharathgangadhar ] New: Mohammed Asgar [ asgarma ]
          Sharathkumar K G made changes -
          Issue Type Original: Task [ 3 ] New: Bug [ 1 ]
          Sharathkumar K G made changes -
          Assignee Original: Mohammed Asgar [ asgarma ] New: Sharathkumar K G [ iamsharathgangadhar ]

            Unassigned Unassigned
            iamsharathgangadhar Sharathkumar K G
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: