Unable to customize specflow report with screenshots path - specflow

I am trying to generate specflow mstestexecution report with the screenshots path mentioned as link. I made use of Console.Writeline() to mention the screenshots path but its getting dispalyed as text in the report. Please provide your inputs on the same.

The HTML report sees everything as plain text even if you use HTML tags. This is by design. You can change the behaviour of specflow.exe yourself, it is an open source project on GitHub.
When you don't want to dive to deep into that, you need a more ugly work around: You could consider to tag your links with another token (like {img} instead of ) and than search and replace in the .html file for all {img} to for example.

Related

Hyper link issue inside ICS file

I have created an ICS file. And it has a hyperlink for a text. In outlook 2013, it is working fine. But in other email clients, it is showing me the full URL along with the hyper linked text. Refer the below screenshots.
MAC-OS-Laptop
Outlook2016
This is only working fine in Outlook2013. Refer this screenshot.
Outlook2013
Please help to resolve this issue.
Thanks in advance.
Venil, Not all calendar or email applications will cope with html in the event description. Of course some choose to, however the specification tends to indicate that the DESCRIPTION is meant to be 'plain' text. Some applications will convert a plain url (no hyperlink) to a clickable one. It may be safer and cleaner to use a plain url rather than the html hyperlink. See the RFC5545 specification links:
The DESCRIPTION definition in the RFC5545 specification says it is of type text. A text type is defined as human readable. The spec allows for an ALTREP that may contain html. Putting all that together implies that the DESCRIPTION field is not intended to have html.

Add-on for Submitting File from Clipboard

Is There A Browser-Add-on That Can Create A Temporary Txt File From My Clipboard And Populate The File Submit Dialog?
Guide for firefox:
Get the data from your clipboard with this: paste data from clipboard using document.execCommand("paste"); within firefox extension
Now you can either create a temporary file with something like OS.File: https://developer.mozilla.org/en-US/docs/JavaScript_OS.File/OS.File_for_the_main_thread
Or create a object with something like window.createObjectUrl.
Then assuming the file submit dialog is prompted by a html5 uploader, then you should just set value of that html5 dialog box there are other ways though too, like mozSetDataAt, mozSetFileArray etc, search github for these keywords shows excellent examples:
https://github.com/search?l=javascript&q=mozSetDataAt&type=Code&utf8=%E2%9C%93
https://github.com/search?l=javascript&q=mozSetFileArray&ref=searchresults&type=Code&utf8=%E2%9C%93
You might need to use the mimeType of application/x-moz-file not sure. Definitely experiement with it and share your solution, and ask for help along the way. This is fun stuff.
There are probably other smarter ways to attach into a input type=file, i was trying to do it the other week. I would also be interested if someone else could share some solutions to actually trick the file input element to think the native file dialog was actually used, maybe using XPCOM.

How to localize ActiveReport 7.0 XML PageReports rdlx

We have a huge number of Page Reports created using ActiveReport (*.rdlx files)
We use them from our ASP.NET MVC web appolication.
All captions and other stuff were initially created on English
Now we need to add a multilanguage support there so, somehow we need all existing texts be inserted in resource file and so we can then add translations
Is there a way to achive this task quickly, without going to each report field and manually extracting it into resource file?
Documentation says that once you change Language property, resource files will be created, but seems it is not working for XML reports, or there shouldbe a trick
For the reports designed with Code-behind, resource files are created pretty much the same as if you will create a Windows form... but I fail to find out how to do this for XML reports.
Page Reports support a localization; however it doesn't do so with a resource file.
This is mentioned off-hand in a single sentence on the page about Localization with ActiveReports 7.
Setting up a localized value in a Page Report is done the same was as you do in a Section Report. Simply change the report's Language property and then set new textbox values. At report runtime the appropriate value for the textbox will get used.
As I mentioned above, this doesn't generate a separate .resx file; instead if you inspect the resulting .rdlx you'll find a custom dd:LocalizationResources element is created that specifies the language setting and the new values for report elements.
The Localize property you are referring to in the documentation and in the code-behind reports are for the code-based "Section Layout" Reports but won't work for XML-based "Page Layout" reports (if you look at the generated code for the report, you'll see that the designer is just generating a bunch of code to localize the report).
Since code-behind reports support custom code or you can add references to another DLL you can write a simple function to localize captions. There is a good example of localizing this for .rdl reports here, you can use exactly the same approach with the ActiveReports' .rdlx files.
During that initial configuration of the report to be localizable you'll either have to manually change each static string to a Code.LocalizedValue call or maybe you could write a simple script to find each //Textbox/Value elements and replace it with a similar call. A simple script with a combination of xpath and regex could do help you automate the initial configuration of the report. To localize something other than a Textbox Value in the report (e.g. report parameter, labels/bookmarks), you'll need to replace the text of a different element than the Textbox Value but the concept is the same.
Of course, I am assuming you are localizing the static strings in your report. If you want to localize the values from the database then you'll have to do that differently (comment if you need help and I'll explain).

textarea that was using plain text with option of markdown or textile filter now needs images

My clients can enter text into textarea and have the option to use the markdown or textile filters for each textarea.
With some models (articles, newsletter, etc) they can upload images to associate with the model, which are displayed in a column next to the text of the text.
This worked fine for a while, but they have now told me that the want the ability to put the images INSIDE the text a specific positions.
What is the best way to go about this? I suppose I may have to use a wysiwyg for this, but would rather not. And how would this work for images which are not yet on the server, etc?
There are different directions you could go to:
Follow the path of Confluence, which released in their new version 4.0 a rewritten WYSIWYG editor, that stores as source XHTML, not any more wiki markup.
Leads to an update of all pages when migrating.
Was pretty difficult to implement. I do not know if they use any more the TinyMCE editor of previous versions.
Follow the format of markdown how to include images in your source format. So by typing: This is my text. !image.png! The inline image shows ..., you will have a format that is understandable.
You have to expand the interpretation, so that the !<filename>! will be mapped that is stored locally anyway.
You have to add clear-up dialogs for the images that are yet not known, so doing bulk uploads ...
You may provide a drag area on your view, that then shows the filename and gives examples how to include that inside the text area.
Go for something in between, by allowing users to drag images inside the editor. There are plugins written in Javascript that allow you to do that, e.g. UI Draggable for jquery
I have no idea how to integrate that image inside the text editor. Overlay?
So the second one is the easiest, and the user knows how to do it. If they only decide that this is the solution they want to have :-)
I think I'm going to use a combination of #2 above, and the Liquid templating engine.

Troubleshooting "call to undefined function" when adding Markdown to project

I'm trying to add some Markdown capabilities to my Symfony project (Symfony version 1.3.3).
To accomplish that, I had already included the Markdown library into lib/vendor directory. Also, I added the need configuration in the autoload.yml for the previous library.
However, I'm getting a fatal PHP error:
Call to undefined function Markdown()
How can I resolve this problem?
The symfony autoloader loads classes from php files named like <classname>.class.php. If you're using the markdown.php file from mitchelf.com, it does not follow the naming scheme, nor does it contain a class called Markdown, as a matter of fact: it has a function called Markdown.
Symfony isn't even trying to load it, for reasons I described above. You will have to include it manually. I suggest you have a look at http://www.symfony-project.org/plugins/sfEasyMarkdownPlugin.
I do NOT suggest installing a plugin for such a simple feature. It is not hard for you to figure it out if you have some real examples.
There is an open source project based on symfony named Bookeet. It has embedded MarkDowm feature. It uses markitup as the markdown editor. And it uses php markdown to convert markdown code to html code.
To save your time, go directly to changeset 29f0ba1807 of the Bookeet project(I am sorry that I can't post the hyperlink because SO doesn't permit new user to post more than one hyperlink). You could see clearly what should be done in order to add markdown feature to your website.

Resources