Filter and download files by extension in Selenide - selenide

I am using Selenide to download a list of files from a webpage. Webpage has a list of files of different extension like pdf, gz, csv, etc.
I have got a common xpath to download all of these files. However, I want Selenide to download only the files with pdf extension and skip the download of other files.
I have tried the below code but it still downloads files with other extension.
$().download(DownloadOptions.using(FileDownloadMode.HTTPGET)
.withFilter(FileFilters.withExtension("pdf")))
Is there any way to let Selenide download only a particular extension files.

Related

Locating Extension Source Code in Firefox

What folder in firefox is where the extension IDs or source code is located?
I want to query the content of this folder to determine what extensions are installed on the browser (with Tanium).
For example, in Chrome, you can find it in
%userprofile%\AppData\Local\Google\Chrome\User Data\Default\Extensions\

Download assets in it's original format in AEM

I want to download the asset in it's original format using AEM, is it possible? Currently, if I select one pdf or jpeg asset, and click download, it's downloaded as a zip file which includes the selected asset. Now I want to download it without a container zip, that's to say download it in it's original format.
If you are referring to PDF then that's how the download for PDF works because when a PDF is uploaded all it's contents are extracted as sub-assets. This behaviour can be changed via modifying the PDF extraction logic but it won't affect the download behaviour.
The logic behind this is that when an artefact is uploaded in AEM it becomes a DAM asset and rules governing to it's manipulation take over. For example, in case of PDF, a PDF asset is a collection of the original PDF and all it's images and thumbnail extractions. So when you are downloading something you are basically downloading the whole collection as AEM sees it.
Having said that, you can probably write a custom servlet and extend the DAM GUI to download just the PDF.
You can select the option as shown below, when selecting 'Download' action after selecting the asset to download, in Assets UI

Is there software I can use to view my Markdown files as a wiki, with relative links, on Windows

Our team has installed the Markdown Mode extension in Visual Studio on our Windows PCs, and we're happy with that as an editor for Markdown files, but we need a way to generate a wiki from those files where we can click on links that cross-link the files of the wiki. I've been trying to find something, but haven't had any success getting something running.
I tried creating an empty web application and pasting in the html file from here http://dynalon.github.io/mdwiki/#!index.md and naming it index.html, and adding a couple of md files to the same directory that I set to always copy to the build directory, but I got 404-3 errors when it tried to access the .md file.
I see a couple of tools that look possibly good but need Python or Ruby installed, which isn't ideal: http://markdoc.org/quickstart or http://helloform.com/projects/commonplace/
I see this ASP.NET control for embedding a Markdown file into a page http://wikicontrol.codeplex.com/ but the control is for VS 2010 so clearly is not being actively maintained, plus to use it I'll need to build something to take the relative links and find the related .md files and load them up in MVC - sounds like a hassle to get working, and it will require me to put MVC in my docs project.
Is there something that is just designed so that I can put an html file or similar in a directory with a root .md file and have it just immediately act like a wiki and allow navigation between them?
We have decided to use MarkdownDeep NuGet package and a single MVC controller to handle this. The MVC controller looks at the requested path, uses it to figure out the location of the Markdown file, reads that file and renders it to HTML and returns the HTML.

Having a file open automatically when the compressed folder containing it is unzipped

I have a compressed (zipped) folder with several KML files and some image files in it. I will soon make the compressed folder available to download from a web site; once the site's user downloads the file, they can unzip it. I am wondering if there is a way to make a certain one of the KML files open in Google Earth automatically as soon as the folder is unzipped (this file is linked to the other KML files in the folder, and opening it in Google Earth is a much handier way of viewing all the KML files than opening each file individually). Is there any way of implementing this? The operating system on my machine is Windows 7, in case this helps.
The act of unzipping a .zip file cannot easily be triggered to open a particular file as you describe on the file system. You would need a drop-box like mechanism with a custom application waiting for new contents in a particular folder.
However, KMZ is a zipped file which when opened by Google Earth will display the root-level KML file (typically named doc.kml) so a workable solution would be to create a single KMZ file with folder-structure as needed. The KMZ file would include a parent KML with links to the sub-KML files either as anchor links (or feature anchor) accessed via feature description and/or as network links.
The parent KML file can have in its top-level KML element an description with an index or table of contents with links to all the sub-KML files.
A working example of a feature-anchor can be found here:
http://kml-samples.googlecode.com/svn/trunk/kml/feature-anchor/feature-anchor-semi.kmz
A good description of feature anchors in action with examples can be found in Chapter 2 of the KML Handbook.

Open downloaded file in browser pdf format

I am using paperclip to upload docx doc and pdf files to my railsapp, is there any way I can view this uploaded files in the browser itself in pdf format, without downloading it ?
Try pdf.js.
Firefox recently started using it as viewer for PDF files, but you can integrate it in your app. But you still need to 'download' it, that is, load into the browser.

Resources