Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
i want to use selenium to automate desktop application but desktop applications does not provide locators and elements X path,how can i locate elements in desktop application
No, Using selenium we can automate only web based application. Selenium doesn't provide any way to automate desktop applications. For automating desktop application we can use other tools such as AutoIT.
Refer here for some idea->http://seleniumsimplified.com/2016/01/can-i-use-selenium-webdriver-to-automate-a-windows-desktop-application/
Answering your question straight, No, Selenium doesn't support to automate Desktop Applications.
As you want to use Selenium to automate desktop application, Winium can be the best solution to your needs.
Winium:
Winium is a new open source framework, that’s based on Selenium and consists of 3 parts:
Supports test automation on Windows applications.
Supports test automation on Windows Phone operating system context (home button, notifications bar, toggles etc.)
Supports test automation on Windows Phone applications.
Pros:
In case you are already using Selenium WebDriver and familiar with its API, using Winium is straightforward.
Cons:
As a result of it’s being a new project, few struggles come in the way. Its API still isn’t complete and not on the same maturity level as other tools in this category.
Bottom line:
In case you are considering Winium, my suggestion is to wait until it’s more baked.
Additional Resources:
You can find some more Open Source Test Automation Tools for Desktop Applications here.
You can you below tools :
Winium (https://github.com/2gis/Winium ) for windows desktop automation.
in this case you'd need to use some desktop inspecting tools like UISpy.
benefit of using this would be, you must be aware of methods and calls in selenium, same methods are there in this tool too.
AutoIT : this is less reliable in case your test script does some job on web and later you want to perform something on the desktop. AutoIT script compiles to an exe which can be triggered from the test script BUT remember AutoIT exe/script would start executing from wherever the cursor is located.
I guess you can use AWT classes to do few of the stuff on desktop but it'd incur a lot of time investment in developing the complete flow. (BAD IDEA, don't do that.)
Not very sure but in a few cases, I have seen Sikuli (An image-based automation API) work fine.(have a look on this quick example https://www.guru99.com/sikuli-tutorial.html)
We have different ways to handle desktop application using selenium webdriver.
below are the different real time techniques
AutoIT : AutoIT is the best option to work on window based application
Sikuli : Sikuli is image based automation tool.
for more reference visit below link
https://sqa.stackexchange.com/questions/9254/can-i-use-selenium-to-do-desktop-application-testing
No you can't automate native windows application with selenium.
But still you can achieve it by autoit or sikuli and again these tools are having few limitation on element activities, handling and reporting.
I would recommend you to take a look on RPA tools. which is trending in market now. you can automate any kind of apps like browser,native windows, citrix.
Consider uipath or blue prism.
I agree these are all not opensource but it's deserved to pay. Uipath you can get some trial version try to use it.
Allt the best!!
You can not automate windows windows based application using selenium . Now it depends on whether you want to use open source tools or microsoft tools.
Open source tools :
Auto IT . Its is very fast and its librarry can be integrated with C# or JAva
Microsoft based tools :
Coded UI - its the latest tool which can work for both windows based and web based application.
Related
I have to automate a JWS application (with *.jnlp extension) . We cannot automate the same using selenium as it is an windows type application. I also tried with AutoIt but it is not able to capture element properties using the same.
Could anyone please help how can I automate this application .I am trying to automate JWS application for the first time.
QTP and TestComplete are very good to automate Java desktop applications. I am using QTP currently to automate Calypso (a java application) and it works perfectly. I've used TestComplete previously to automate similar Java desktop application. They both are paid software, but well worth it if you want to automate complex applications.
Swing applications can be automated using [SWTBot][1]. Its an open source alternative to automate swing applications. This requires understanding of Swing framework and controls.
[1]: http://www.eclipse.org/swtbot/
EDIT: Maybe any of this can help for testing swing applications: Automated tests for Java Swing GUIs
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have created a game called "WordHunt" and I want to burn it to a cd/dvd..
Is there a proper way to burn java files especially GUI into the cd/dvd?? Is there a tutorial about it? can u please show it to me. I really want to learn it badly.
I'm assuming you have a game that you'd like to install a game you've written in Java from a CD/DVD. For that, you might want to use one of a series of freely available installer generators (found here).
If in fact you are simply trying to create a CD/DVD which autostarts a Java game, this explanation of Windows autostart procedures might help you:
[...]
If Windows finds a (plain text) file called AUTORUN.INF in the root directory of a CD then it follows the instructions in this file to run a program, as per the above descriptions. This example AUTORUN.INF file tells Windows to run program shellrun.exe (from the root directory of the CD) which in turn will show web page default.htm in the user's default browser. The other options are described below.
[autorun]
open=shellrun.exe default.htm
icon=shellrun.exe
action=Start ShellRun-CD
label=ShellRun-powered CD
Use the Windows Notepad application to edit plain text files (it is in the Start+All Programs+Accessories menu).
Your CD users may have switched off AutoRun. This might be because they are concerned about viruses. Also, if they press the Shift key down while inserting the CD, AutoRun is disabled.
There is no way to force your users to use AutoRun. It is therefore good practice to provide instructions so that users know how to start your CD, eg tell them to open file default.htm in their browser. These instructions are also required if your CD might be viewed by non-Windows users.
[...]
Having said that, the more "Java-like" solution to this problem would probably be something like a Java Web Start application. You might want to look into that technology before you go with physical distribution :)
Is there a proper way to burn java files especially GUI into the cd/dvd?
Don't do it!
The best way to distribute software to users these days is over the net. For deploying Java based desktop clients from a link, look to Java Web Start.
Java Web Start (JWS) is the Oracle Corporation technology used to launch rich client (Swing, AWT, SWT) desktop applications directly from a network or internet link. It offers 'one click' installation for platforms that support Java.
JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..
We have been using iMacro for our QA Automation, at a recent discussion it was decided to shift to Selenium.
Selenium provides a comparison thus neglected to mention how to migrate scripts to their platform..http://wiki.imacros.net/Selenium
is there any tools available for this purpose?
There is currently no tool that I know of that can help you with this.
There a couple of alternatives for migrating from iMacros to Selenium:
If you have a small amount of scripts re-record them using selenium IDE
If you have a large amount of test you could write a script that can map equivalent commands, you may still need to do some manual clean up but it may at least save you some time.
The easiest way (if you are using firefox) is to select Tools->Selenium IDE. This will open Selenium IDE in a separate window. Use the Imacros sidebar to "play" the script while Selenium IDE is recording. I just did this myself. It works like a charm. Obviously, this won't do any Imacros specific text-scraping, but if your script is a simple set of actions it works fabulously.
I've had a whale of a time attempting to figure this out, considering the limited documentation that I can find outside of the API itself.
I have a liferay portlet that simply clicks on a button, pops up a form with a bunch of fields, and then submits that form.
I want to use Selenium (or really any automation tool that can do this with Liferay) to similuate 100-500 concurrent submissions.
Has anyone used Selenium with LifeRay in a similar manner?
Selenium is a good tool to test the correctness of you web system, NOT to test the permormace of this system. For Stress testing you should use another tool, like JMeter http://jmeter.apache.org/ . Or you can code test script with HtmlUnit http://htmlunit.sourceforge.net/
We need a tool to test a set of fairly complex Java applications. The applications are mostly independent client programs or applets communicating with a servlet or apache server at a remote site. Specs:
Runnable on Windows XP, Vista and 7
Parameterizable (Can specify in a script the sequence of buttons to click, text to type in JTextFields and browser address bar etc.)
Can quit or bail out or display a nasty message if the expected window or dialog box doesn't appear
Record the output on the Java Console of browser in a .txt file (IE is sufficient for now) when the application opens a browser window.
While running, I should be able to see it running with folded hands while it would run
for a few minutes
We were thinking of writing an AWTRobot based tool that reads a command file and does this - (don't know how to do #3 or #4 yet - will ask you folks some day how to detect a window on the desktop). Would you suggest an open source tool available to do this? We don't need anything fancy to capture video or screenshots. Thank you, - M.S.
For browser based automated testing you can use Selenuim or you can use WebDriver.
The selenium project is hosted here
If you don't need to test the way the pages are actually rendered by the browser, but instead need to work at the HTTP/HTTPS/etc request level then have a look at JMeter. It has parametrization, dataproviders, graphs, and a proxy component for recording http user sessions.
If you do need browser testing, then, as has already been mentioned, Selenium is probably the best freely available tool. For production I would recommend using Selenium Remote Control server which can be driven by scripts written in Java/Python/C#/Perl/PHP.
To see what tools people use in real production environments, and to do your own research on what is available I recommend www.sqaforums.com.
Have a look at Sikuli
The reason I suggest this is it sounds like you need to test both a Java applet and the content of a native browser (launched from Java, but not itself Java) -- so it's not "Java all the way".
I'm not sure what you mean by criteria 4, though. It is worth noting that as Sukuli works by image analysis, it won't be able to copy text to a text file.
This question is an invitation for sales pitch, don't you think. How about Mercury Quicktest professional ( I believe its HP Quick test now). I do not believe this will be cheap either ( and well its HP, it will probably only work in IE ;)).
Since you want an open source solution, I believe, the most popular option is selenium and yes its a pain to configure sometimes ( like for Flex for example). So you should try Watir.
There is a lot of good buzz around it and when I evaluated it, I loved what I see.Also it does not work for desktop applications, I suggest you try some other solution for that.
(The problem is open source GUI testing tools are not usually all inclusive. If you need one solution to handle all your gui testing needs, then you should check out the more commercial ones like QTP.
I have used IBM Rational Functional Tester. It has everything you need and it's quite easy to learn. The scripting language is either Java or VB.Net so you won't have to worry about learning a language for your tests.
I had some pretty good results with Squish from FrogLogic and didn't break the bank: http://www.froglogic.com/products/
Did you try Squsih - http://www.froglogic.com/products/index.php