We have hosted our Jenkins server on an RHEL 7.9. We want to connect to the remote windows server from the RHEL box and execute a python program that uses pywinauto package to manipulate a GUI application that runs on the remote windows server for functional tests. Our python script that uses pywinauto is ready and working fine when executed from cmdline on the remote windows server and want to trigger the script from a Jenkins job. Now, Can someone here please let me know the options I should think of to connect to the Remote windows server from RHEL and execute a python script that does GUI automation?
Is there any way connect to a remote windows server from RHEL and execute a python program that does GUI automation
230 views Asked by HariReddy Konatham At
1
There are 1 answers
Related Questions in PYTHON
- How to store a date/time in sqlite (or something similar to a date)
- Instagrapi recently showing HTTPError and UnknownError
- How to Retrieve Data from an MySQL Database and Display it in a GUI?
- How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
- Python Geopandas unable to convert latitude longitude to points
- Influence of Unused FFN on Model Accuracy in PyTorch
- Seeking Python Libraries for Removing Extraneous Characters and Spaces in Text
- Writes to child subprocess.Popen.stdin don't work from within process group?
- Conda has two different python binarys (python and python3) with the same version for a single environment. Why?
- Problem with add new attribute in table with BOTO3 on python
- Can't install packages in python conda environment
- Setting diagonal of a matrix to zero
- List of numbers converted to list of strings to iterate over it. But receiving TypeError messages
- Basic Python Question: Shortening If Statements
- Python and regex, can't understand why some words are left out of the match
Related Questions in JENKINS
- Shellscript touch command not working in jenkins pipeline
- Jenkins Docker Agent Configuration Issue: Connection Refused on Local Ubuntu Install
- How to add more input text box in dynamicreferenceparameter in jenkins
- Jenkins pipeline script: Accept merge request from Gitlab
- Jenkins Exec Format Error while cloning repo
- Post checkmarx scan weblink on the Jenkins Build status page
- Exclude a file from merging to the main branch
- Created Jenkins pipeline and added the script in the Pipeline Description.To check out the Project from the svn repository.NotWorking. Any Suggestion
- How to write a Jenkins Pipeline script to fetch needed repo?
- trouble to trigger Jenkins job
- Unable to start jenkins in amazon linux 2: start request repeated too quickly
- is not a valid Cucumber report! String length (20054016) exceeds the maximum length (20000000)
- Run cleanup function in Python when Jenkins job is aborted
- Jenkins pipeline map is getting converted to an array but it's too large I think?
- How do I list which Jenkins credentials used per pipeline in the script console?
Related Questions in PYWINAUTO
- pywinauto scripts run so slow now, they were running very well and fast
- Scroll a specific scrollbar out of available ones to the item which is not visible on launch by default
- Locate a tab item from list of tabs that is selected using pywinauto
- I'd like make private pywinauto fork for single Qt6 class, where to start?
- navigate to a directory and right click on a file using pywinauto
- How to execute a .py file with a class using .robot file or integrating it to robot framework?
- How can I wait for this lasso selection window that powerpoint spawns to disappear?
- win32gui / pywinauto don't see which child objects the component consists of
- PyWinAuto.Application().connect(pid).window(windowName).send_keystrokes take way longer than keyboard.press()
- Cannot select item in ListBox
- Is there a way to check the toggle status of an object that has no control_type="CheckBox")
- Get image or screen capture in PyWinAuto
- PyWinAuto : need to check if a GroupBox has a scrollbar or not
- pywinauto TimeoutError at a very simlpe program in pycharm
- pywinauto: MenuSelect() Cannot be used to select options from "Menu ToolBar" in QGIS applications
Related Questions in REMOTE-EXECUTION
- Remote process execution using PsExec
- Windows Script to SSH into a Remote Server and Execute a Command
- Unable to Launch or Execute New Window or Applications on Remote System Using Windows PowerShell "Invoke-Command"
- SSH Remote Code Execution Script over Jumphost (Nested Quotes)
- How to get private IPs of all instances in one remote-exec, terraform, aws
- How to run node app inside remote-exec using Terraform
- Is there any way connect to a remote windows server from RHEL and execute a python program that does GUI automation
- Execution of python code on remote machines
- Azure Lamp Stack using Terraform getting file provisioner error timeout - last error: dial tcp 20.237.241.47:22: i/o timeout
- Python running a python script on remote hosts in parallel
- Invoke-Command not finding script, but it's there
- Not able to connect to remote host via terraform OCI ,remote-exec
- Kafka Key access on Ingress of a Python Flink Stateful function
- Terraform Output linux command option?
- Failed to query remote execution capabilities: connection timed out
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Popular Tags
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Holla, I have done this recently from centOS 8, This was quite challenging though. Since pywinauto requires active desktop to perform actions on the UI. For this purpose we can not do SSH or similar ways.
Here is how to...step by step.
You can use to do the RDP connection to the windows server using xFreeRDP from RHEL.
xfreerdp /u:username /p:password /v:hostnameRef.- FreeRDP
Up to this all works smooth here onwards you can not execute the commands on RDP session to trigger the execution.
But windows server is your savior. It does provide you the
EVENTCREATEcommand which allows you to create event. It will create event on your behalf in your windows server. This command will allow you flexibility for scheduling your job. The events created by this command will be listed in the event-viewer utility of windows. To see the window event created by you, give meaningful message. To create event user should be administrator.Example -
eventcreate /t INFORMATION /id 1000 /d "Create event in WinMgmt source"In this step you will have to setup/schedule the job based on event occurred on windows. By right clicking on event and then select option 'Attach task to this event...' or by directly going in to the Task Schedular (another windows utility tool).
a. Open Task Schedular.
b. Right click on root tree node - "Task Schedular Library"
c. Select the option "Create Task..."
d. Popup will open to create Task Fill Name and description of task.
e. Select the checkbox "Run with highest privileges".
f. Go to trigger tab and New button.
g. Select the first dropdown value for "Begin the task" as "On an Event".
i. In the setting section of popup select log type of event.
ii. Source and Event ID values should be similar that you will use in your custom event(step 2 event).
iii. Select other scheduling setting as per your need.
i. Go to Actions tab and click on New button.
j. On the New Action popup, select Action as "Start a program"
k. Select your program (python script) to be executed and parameters if any in setting section.
l. Click OK and test this connection of event and task by firing event from cmd (step 2)
This is almost done now except the one critical part. And that is how to fire eventcreate command from RHEL. You can do that by writing small python code using SSH or paramiko packages.
NOTE's