There is a java app I use (not mine) and I want to automate it.
I have used autohotkey before to enter text and click buttons but I am not sure how to get text from a java table using it.
What I need is to parse text in a table, process it, enter text (depend on process) and click button. Is there a free automation tool that I can achieve this?
Regards,
Burak
Related
I have a windows application (say application XYZ) that has a text box in it. My goal is to create a Java application that will enter text into the app XYZ. This has to be done without needing XYZ to be visible on the screen(could be behind an application and should still work). What library or tool should I use to acheive this. I heard about screen scraping but I think it won't work with this.
NOTE : I don't have access to the source code of XYZ.
Im trying to accelerate the use of a web application using selenium Webdriver by creating hotkeys for it. I want certain webdriver click events to be associated with keyboard keys. For example, pressing "s" on the keyboard will click on the submit button.
I understand how to do the clicking and locating elements with webdriver but don't know how to go about listening to the keys from Java while Firefox is open (from a webdriver get call). My application has no GUI and since it's opening a firefox window it will lose focus so KeyListener is not an option.
I have come accross the JNI library that I'm looking into. Any other suggestions how I may do this?
In that case, it is almost always better idea to automate the whole process
Say, you need to daily update salary of the employees. It is better idea to invest your time to read XLS file (almost standard way how those data are delivered to the people destined to do the repetitive work) and read line by line and somehow enter it to the application.
I know I did not provide you the answer you were expecting, but try to think of automating the whole process. It might be little tricky, but doable - and at the end faster - than simple mapping of the keys
Friends i am trying to develope a desktop application it's requirement is
1.It should have 2 browse button after clicking on that file open box should appear like
jfilechooser in swing
2 Then i have to select that file and require it's url for future use.
3.My application contains just 2 buttons and on clicking on that i want to call a function that compare that file(logic for that i already written)
4.I am using eclipse for that
so overall i can say my application is simple so what should i use javafx or swing for gui?
if any other conveniant option is present please tell me.please give me option which are open source
You could implement it using Swing.
If you want it to be on a variety of devices (desktops, mobile or browsers) then choose JavaFX.
If u require rich look and feel in your application,use JavaFx.Otherwise Swing is also good.
I developing a Sinhala-English Unicode converter in java.Now I want to add the final output unicode sinhala word in facebook chat window while i typing them.If i type a word in application that letters also should print on facebook chat(Web browser's active window) window in any browser.I think the problem might be slightly unclear.But I expect any kind of answer for this problem...
Java has only one tool that allows emulation of user activity: java.awt.Robot. Using this class you can emulate mouse clicks and keyboard usage, so theoretically you can select browser window, then select text area on site and "type" any text you want. The problem with this solution is that current java API does not allow you to identify native window, so it is not easy to find the browser among the windows existing on user's desktop.
Finally, exactly as #Jonas said - better use Facebook API.
I'm developing a program like Terminal in Linux or Command Prompt in Windows, but I'm developing it on Linux, and I don't care much about portability.
The program is written in Java, using SWT.
The user writes the commands in a text box, and when he presses 'enter' it reads this line and interpret it.
The problem is that the user writes his commands in a text box, so he is free to write at any place inside it.
I want to restrict him to write only in the last line of the text box. I don't want him to change the position of the cursor and writes any way.
Thanks in advance
I wrote a terminal-like control in .NET. It's not java-based but I think that you can reuse some of the logic in there:
http://wpfterminal.codeplex.com/
Be advised that I didn't mean to release this project so soon, I did it for you, so it might require a little cleaning maybe, as well as a few bug tracking. But anyway, it worked flawlessly for now.
You can see an example in this screenshot (terminal is integrated in a bigger project) :
http://images4.hiboox.com/images/4210/0a2809b63e05c3d0cac678962e0e3d5a.jpg
My solution
.
Basic mechanisms
Actually what I did was to define a lastPromptIndex integer, and everytime a user presses the ENTER key and a new prompt appears, this value is updated.
After that, it's simple, you just need to process any text input before the textbox validates the input. If the textbox caret was located before your lastPromptIndex, you need to raise an error (usually a beep sound) and you must invalidate the text input, so nothing is written in the textbox. I also automatically set the caret position to the end of the textbox, so the user can immediatly input some text.
Extensions
You can enable command completion by looking for an "UP key" input if the caret is before the prompt index, etc. What you need is just to process input events before they are sent to the textbox internal mechanisms. I don't know if SWT controls allow it, but I'm pretty sure they do, like any serious UI system.
Other solution
.
JTERM
I remember that a friend of mine used a terminal in a Java application, and in his sources, I found that if was a control from JTerm, have a look at it:
http://www.acordex.com/vtj/JTerm.html
Your could use 2 text widgets to simulate a terminal session.
One for the entry of the command, and the other for the display of the command and the response.
The entry text widget only needs to accept 70 - 80 characters or so.
The display text widget will scroll and show the most recent command and response.