Automation logic for Cucumber Selenium - java

I am looking for help for automation logic for below scenario.
I have to create a application(say something like creating a user) in my web app, after creation, through search we can find and open the application with the unique number. Then there will be a File Upload button will be enabled for that application to upload any files. But the catch here is, for the file upload button to get enable, it has to go through couple of workflows inside the system. So approximately it takes 3 to 5 minutes to get the File Upload button to get enabled for that single application created. I am looking for how to automate this case in Cucumber-Selenium-Java.
Because, even though we script, the selenium will not wait for 3-5 minutes for the file upload button to get enable. We manually also cannot do that which is not good practice , which will slow the execution, as I have to create approximately 30 applications, which in case the workflow will be taking each application one by one in sequence to get the File Upload button to get enabled. Because that is how the development design has been made.
So any help or any logic suggestions on how can we automate these type of cases?

Related

How do you write a silently self-starting, long-running, time-triggered Java desktop application without registering it as a Windows service?

I'm trying to build a report-building tool (which has a UI written in JavaFX) that has the following features:
When the system (re-)boots, it should auto-start in the background (without showing the UI)
It should have an icon in the system tray
The UI should only show when the user clicks on the system tray icon
A report should be generated either once a day/week/month, at a specific time, automatically
It should "snooze/sleep" in the interim period and use minimal resources while it awaits the next trigger time
It should show a toast pop-up / Windows notification / whatever when a new report has been generated
(The bold ones are the real problems, the italics are maybe solvable--given some resources I found--and the un-formatted one I have a work-around for, namely to place it on in the Startup folder in the AppData folder of the users' machine.)
But the clincher is the following: due to my company's policies, I'm NOT allowed to build register it as a Windows service. Also, converting it into a web service, placing it on a server, and using Control-M (or a cron expression) are also off the table. (That's a long story for another day.) I'm not sure how to implement it and I've been stuck on this for a bit.
I've taken a look at Quartz, this other StackOverflow question, and some other resources on how to run the Java app in the background, but most resources tell me to add it as a Windows service and I keep hitting a brick wall. Also, I don't know how much of an effect the application would have on the users' machines if I ran the application in the background with the solutions mentioned in the other StackOverflow answer. I need to have a minimal processing footprint in the interim period.
I'm also unsure of how to package the application as an EXE. For now, I'm going to turn it into an executable JAR. (Any help on this would also be welcome.)
I'm open to any suggestions and ideas and even other resources to look at for further reading. Anything to help me out here is welcome.

How to run any program on domain with certain times

I want to make a program that automate login a website then gets data from there with certain times without being called from me or anyone else like datatabese jobs.My problem is I don't know how to run this program from my domain with certain times.
I searched the web then I found selenium driver, some web scrapers and so. These are all working(can do what to do) that when I run the project from my computer via java or reach that files from my domain(PHP or whatever).
Briefly, how could I make a program that automate login(it's not important login stuff just must doing something without being touch its ok for me) .

Detect what element was clicked with JAVA

For the project in my school I am creating a automation tool for the web with JAVA.
This tool should detect the user activity on web page, save it, and then run the result as Tests.
I found solution for the running part: I will use Selenium to run all the tests that I am automatically generating.
But I did not found how to detect user activity on the web, Selenium can do it?
The Idea is to check what element the user was clicked, hover, send keys...
There is a way do detect what element was clicked in the browser with pure JAVA? if not, there is some tool to check it?
Look at the Selenium IDE plugin for Firefox. It will help record your usage of a website. You can then reuse the scenario to perform your test.
Since the tests are actually made on the front-end, the tests are not tied to Java. Your back-end could be written in C# or PHP: the front-end user has no idea what's behind.

Delay Java initialization until needed

I have a web page where sometimes I need to communicate with a device.
This device is accessed with sockets, so I have a jar file with the support libraries.
When you want to get data from the device, you press a button, and a javascript method fetches the data using the library (no java code here)
The presence of the jar makes the java machine to start as soon as you load the page.
Since there is a lot of users that don't use this option (usually they don't even have the device, to begin with), they see that as a nuisance.
Is there a posibility to delay the java loading until the button is pressed ?
I don't want to redirect them to another page, that should be done in the same page.
You can load the jar file into a seperate div created dynamically via javascript, at the time you need it.
If you want to consider loading your application with java-webstart-technology, you can implement a button similiar to what oracle has on their page here
Basically what the button does is download the required jars specified in a jnlp-file and launch it.

Alternative to clipboard for sharing data between a web based application and legacy desktop application

I've been pondering over this problem most the afternoon and haven't yet found the most ideal solution so thought I would see what others think..
There is a legacy Win16 application that has to be modified (with the least effort) in order to communicate with a web based application.
The idea is such that in the Win16 app, the user will want to look up a specific code, so they'll click a button which will then launch the browser and allow them to navigate a specific set of pages until they find the result they desire, then they have the option of either pressing Select or Cancel.
Pressing Select should pass back a small string back to the app (around 10 characters) and close the browser. Cancel will likewise send a Cancel message back to the app and again close the browser window.
I can't see many choices available in implementation as the Win16 app is not able to call webservices, so I'm looking at using the clipboard, however that is not without problems.
I hope there's some other alternative I haven't thought of,
As always - all advice appreciated.
Thanks,

Categories

Resources