3

I have created a Java program that utilizes Chrome Driver, Selenium, and Java Excel API. The program is used to automate a few different processes on Google Chrome. Currently, setting up this automation is more complicated than I would like it to be: the user needs to download a zipped folder, unzip it, download the Java Runtime Environment, and launch the program using the executable.

My goal is to simplify the installation of the automation. Ideally, a user would come to a SharePoint website, fill out a form with the parameters of the automation (potentially upload an Excel Workbook), click an "execute" button, and the automation would run. As a result, the automation would run seamlessly across platforms (Windows and MacOS) without any modifications.

I have researched changing the programming language to achieve this functionality. I concluded that a different language could remove the need for a Java Runtime Environment download, but it would still require some type of installation process. Additionally, I have researched using HTML/JavaScript, but I concluded that this is not possible because the functionality (triggering a web automation from a website) could be used maliciously without the user's knowledge. Finally, I began researching containerization through Docker. This solution seems promising but I do not know enough about it to determine if it is the appropriate solution.

What would be the best route to achieve the results that I am looking for (outlined in the second paragraph)? I have access to enterprise-grade databases that I thought may be useful. Would it be possible to have the form trigger a virtual machine to run the automation on a remote database and then output the result to the user once it has finished?

Thank you in advance for any guidance you can provide. I do not know much about making a Java program into an enterprise-grade application so any information about what to research is extremely useful. Finally, please do not hesitate to correct my logic at any point in this question as I may have drawn the wrong conclusions from my research.

Community
  • 1
  • 1
Mitch Kelly
  • 481
  • 3
  • 10
  • 1
    sounds like you want the server to run the automations? That seems very do-able. For the user themselves to run the automations, I have a hobby project that might give you some ideas but it does require Java: https://www.thebrowserbots.com – pcalkins Sep 09 '19 at 23:05
  • 2
    Docker is not significantly easier than what you initially describe. The user will still need to install a runtime (the Docker Desktop application) and download and unpack at the very least a support script to launch the container; plus you'll have to go to extra steps to allow the container to make changes to the host, and the tool will only be runnable by an administrator. – David Maze Sep 09 '19 at 23:44
  • 1
    Not from the browser (like run a JavaScript on the browser) itself but Jenkins is a good option also, actually on my current job, we run all kind of automation through Jenkins. Steps are like: Login on the Jenkins page ( it's on the browser ), choose the build you want and pass some parameters, of course you need a server where it will run, you can configure it first, and start using... – Spencer Melo Sep 10 '19 at 00:46
  • @SpencerMelo I have started researching Jenkins; it seems like it might be exactly what I need! I have found a few helpful tutorials for running my Selenium automation on Jenkins. Do you know of any tutorials that show how to move Jenkins from localhost to a server that can be accessed internally at my company? Additionally, will each user still need to have a Java Runtime Environment installed on their machine to use the automation or is the runtime environment packaged within Jenkins? Thank you for the help! – Mitch Kelly Sep 10 '19 at 21:37
  • @DavidMaze Thank you for catching my mistake! I am still very new to containerization so I wanted to be sure that I did not misunderstand the functionality before I began using it! – Mitch Kelly Sep 10 '19 at 21:40
  • @pcalkins Could you be more specific? I am on the Browser Bots site but I am not to sure what exactly I would be downloading. Is it source code? – Mitch Kelly Sep 10 '19 at 21:41
  • 1
    There's a zipped jar... it's based on a one-click launching of "browsermation" files that are served from the site (JavaFX window and PHP on the back-end) along with map files and any extra data files (csv/xls) that would be needed. I don't have TheBrowserBots code up on github, but the Browsermator (which does most of the work) is here: https://github.com/pcalkins/browsermator It's called with arguments that define the "browsermation" file to run and map file to parse. – pcalkins Sep 10 '19 at 22:43

1 Answers1

0

You want to look into creating a jar file with your selenium code.

DMart
  • 2,401
  • 1
  • 14
  • 19