Is this possible to use Windows Desktop testing features to download a file in Katalon?
When trying to download a file from the internet, the windows dialog appears. Is this possible to use Windows Desktop testing features to deal with that dialog?
Is this possible to use Windows Desktop testing features to download a file in Katalon?
When trying to download a file from the internet, the windows dialog appears. Is this possible to use Windows Desktop testing features to deal with that dialog?
Hi @gdearest07
Is it a pdf ? You can configure WebDriverâs desired capabilities to allow file download such files
Otherwise, you can try to use Robotâs class:
Currently, Windows desktop tests cannot be run along with Web tests yet. !
Hi @ThanhTo,
Thank you. Is somebody working on using Windows Desktop testing features along with Web tests yet?
In UFT, itâs possible to handle Windows dialogs while running Web tests. So, when I saw that Windows Desktop testing was available in Katalon, I assumed that it was possible to do the same in Katalon. If you can implement it, that would be a great selling point.
@ThanhTo, yes, this would be useful in a few scenarios where deliverables include features involving the browser app (not the web page running inside it) and other Windows resources.
Please make this a feature request!
@ThanhTo, is this a correct link? I cannot see anything about using Robotâs class there.
Sorry my bad, hereâs the link:
I was able to solve it. I imported two java classes. import java.awt.Robot; import java.awt.event.KeyEvent; and wrote this Robot r = new Robot(); r.keyPress(KeyEvent.VK_ENTER); r.keyRelease(KeyEvent.VK_ENTER); And now this is what i have in my code: WebUI.sendKeys(findTestObject(âPage_fâ), Keys.chord(Keys.CONTROL, âsâ)) WebUI.delay(2) Robot r = new Robot(); r.keyPress(KeyEvent.VK_ENTER); r.keyRelease(KeyEvent.VK_ENTER); Java Robot class is able to interact with windows native dialogâŚ
As requested, I have opened a feature request. We will consider it for future releases, and will let you guys know when thereâs more information.
Users want to use Desktop Testing capabilities to handle pop-ups when downloading a file in Web test cases. It would be...
Thank you for you report !
@gdearest07 from groovy, you can call OS commands, execute scripts and so on, using the .execute()
method.
some examples here: https://coderwall.com/p/nswp1q/calling-other-processes-from-groovy
combine this with curl, or wget for windows, or a powershell script and you are set, no more pop-ups, see:
@gdearest07 from groovy, you can call OS commands, execute scripts and so on, using the
.execute()
method.
some examples here: https://coderwall.com/p/nswp1q/calling-other-processes-from-groovycombine this with curl, or wget for windows, or a powershell script and you are set, no more pop-ups, see:
Thank you @anon46315158. Itâs definitely an interesting solution and Iâll look into it. Not sure though, it can be used in my current case, cause Iâm downloading pdf files that are generated dynamically.
Not sure though, it can be used in my current case, cause Iâm downloading pdf files that are generated dynamically.
so you can combine them. grab the pdf link via the webtesting approach, and call the script to download them. easy peasy.
@gdearest07 My two cents ⌠We have two more workaround for this scenario.
Here are the step to upload file using selenium Click on Select file / Select button (This part could be handled using Selenium) Select file from open dialogue box(This part could not be handled using selenium) Click on Upload or Upload file button....
I have suggested Edit this page by : https://github.com/katalon-studio/docs/pull/32/commits/d78ba59eeef683981ced6c81d2a2a264be29445b The final version with steps to get it working on windows 10 : Steps : Download and extract Winium.Desktop.Driver.zip from https://github.com/2gis/Winium.Desktop/releases Run Winium.Desktop.Driver.exe Download the jar package. From Katalon studio --> Project settings --> External libraries, add two jars winium-elements-desktop-0.2.0-1.jar and winium-webdriver-âŚ
so you can combine them. grab the pdf link via the webtesting approach, and call the script to download them. easy peasy.
@anon46315158, there is no pdf link as such (i.e. there is nothing like https://pdfurl/pdfname.pdf) after the pdf file has been generated:
@gdearest07 My two cents ⌠We have two more workaround for this scenario.
- Using AutoIT tool.
- Using Winium - Within Web test, you can handle windows dialog
Thank you, @discover.selenium, for your two cents. Iâll look into these solutions as well. As for as I remember, after recording Windows dialogs with AutoIT, some kind of executable is produced, which can be not easy to use unless you are running your tests locally.
Hi @gdearest07,
AutoIT, some kind of executable is produced,
Yes, AutoIT creates .exe, which has to be called in your script. I use the SPY feature to identify the windows element.I donât rely on record feature.
I have a script that upload file using the file upload dialog of the browser for test automation. The script enters a path to the file dialog and click on the open button. The script runs prefect on my local machine. I'm using psexec to execute the...
I havenât tried the above one. Please give it a shot.
Steps :
Download and extract Winium.Desktop.Driver.zip from https://github.com/2gis/Winium.Desktop/releases
Run Winium.Desktop.Driver.exe
Download the jar package.
From Katalon studio --> Project settings --> External libraries, add two jars winium-elements-desktop-0.2.0-1.jar and winium-webdriver-0.1.0-1.jar (Refer : https://i.imgur.com/haDI84P.png)
Use the example below to import the Winium driver and use script into Katalon Studio.