Instead of displaying pdf files in Red Hat Linux, the SWT browser opens a save prompt. Is there any way to handle this? - eclipse-plugin

My application is based on eclipse 4.4.2 and has a preview pdf functionality which opens pdf files in a SWT browser. The pdf files open just fine in Windows in the SWT browser but in linux the save prompt opens instead which defeats the whole purpose of that particular functionality. Any suggestions are welcome.

Related

PDF url is behaving differently in Selenium and normal application

i am facing a weird issue in Selenium. i have a option in my application, and when i click on that option it will open a pdf file in new window. but when i am running the same in Selenium Java Automation it is downloading the file from that option. (it is opening new tab quickly and file started downloading and new tab also closed once file started downloading)
does any body have a solution for this.

Extent reports - Image not displayed when html page is opened with Intellij IDEA

In Intellij IDEA 2019.3.3, I have a java project with selenium, testng and extent reports which runs automated tests on a website. The code generates html reports for the tests and saves screenshots of test failures to display them in the reports. The code puts the absolute path for screenshots in the html code of the failed tests in these reports.
When I open a html test report via Intellij (report > right click > open in browser > chrome), the thumbnail of the screenshot is not present. There is no placeholder either. Is this bug? If not, then do I need to change any setting in Intellij IDEA for the thumbnail to show up?
PS - I tried to open the report with chrome and firefox and faced the same issue. I have not tested this with a simple java project having an html page in a folder in that project. You can try it.
I don't know if this is a bug or a feature in Intellij IDEA. But, the simple solution is to open your html report directly with your browser. The image thumbnails show up there.

worklight embedded browser not working

I have worklight up and running with the "hello world" example running in a Linux environment using instructions from here: http://www.ibm.com/developerworks/mobile/worklight/getting-started.html
But, I can't see the application design because worklight can't load the embedded browser:
Clicking 'additional information' took me to another useless screen:
So, then I pointed to an external browser (chrome in my case),
but still no result:
Then attempting to use the worklight 'console', yields this:
How do I fix this?
This is what you need. You need to manually force a xulrunner version to use.
By "embedded browser" I'm guessing it is trying to open a browser window inside Eclipse...
You can go to Eclipse preferences and search for "web browser". There, change the default browser to your preferred external browser.
Next, or in addition, you can just right-click on the Worklight project and select "Open Worklight console". From there you can click on the "preview common resources" or the environment icon (if you added any) and preview.
The answer has nothing to do with worklight: Eclipse doesn't just "dump" your external browser into an eclipse window.
It uses the webkit libraries to construct a browser frame inside eclipse so that you can interact with it.
For Linux users, you need to make sure the webkit libraries are installed correctly in Linux before Eclipse can discover and use them properly. Heres some instructions:
For me, this was as simple as
sudo apt-get install libwebkit-1.0-0
Followed by restarting Eclipse.

How to control file chooser with Selenium 2?

The selenium website claims:
It drives the browser much more effectively and over comes the
limitations of Selenium 1.x which affected our functional test
coverage, like the file upload or download, pop-ups and dialogs
barrier
But I know only of more or less strange hacks using AutoIt or AWT KeyEvents.
So, how can I tell Selenium to put a certain path into the file dialog (not the form element that opened the file dialog!) and click on 'OK'?

Selenium with SWFUpload

I tried to use Selenium for the automation testing script. The testing web page used SWFUpload for uploading. I don't see any api in Selenium to resolve the upload.
Here is the page: http://demo.swfupload.org/v220/multiinstancedemo/index.php
I found flash-selenium but it is not useful.
http://code.google.com/p/flash-selenium/
Thanks,
Jame
One way of uploading documents is by using autoscripts.
However, autoit scripts are only supported on a windows machine.
You need to do following:
Click on browse button.
Run the .exe autoit file.(exe file can be converted from autoit scripts).