I had built webkit with qt.
Now I want to write a program
input : an url or a html file.
output: the input page's dom tree and render tree, without the effect
of js.
I knew that the built-in program "dumprendertree" suits for me, but I want to get the output on command line because I worked on an OS without X-windows. I don't know how to switch the dumprendertree'output to stdout.
Thank you very much for any suggestions.
Related
I'm trying to build an extension that uses jq to help parse and jump through large json files. I have the basics setup, the issue I'm running into is since I'm using jq in a child process execute (cp.exec(...)) I'm only able to parse the data that's saved on the file. While I want to be able to parse even that json data in the editor that isn't saved. I know this is possible since vscode does something similar with ripgrep for its search. For example in the vscode source code (src\vs\workbench\services\search\node) you can see ripgrep is launched as a child process and searches the files for matches. It seems to use the fsPath of the file but it gets current editor results but I dont using the activeTextEdtiro.document.uri.fsPath.
I know you can get the entire current contents of the editor with something like
vscode.workspace.openTextDocument(uri).then((document) => {
let text = document.getText();
});
or your can get the uri / fsPath to the file with
vscode.window.activeTextEditor.document.uri.fsPath;
But the problem is the uri is outdated (ie doesnt have the unsaved changes) and I cant pipe or echo all the text into the jq command in a cp.exec using the getText() method. So how do you fetch the uri to the current state of the file.
I am executing my automation scenarios using SpecFlow with Visual Studio.
I want to Embed a custom image to the HTML report which was generated by SpecFlow. That image is a screenshot i am taking whenever scenario is failed in Hooks.
Please help me out.
This is what i am seeing in the html report - enter image description here
Take a look at the SeleniumWebTest sample project here. This sample project shows how to include a screenshot in your report. While the example is Selenium-based, the same principles apply to other frameworks.
A more in-depth explanation of how this works can be found here under "Including Screenshots". Essentially, you need to abuse the console and use it to output your images' file paths.
Any data written to the console is available in your report (this is how the trace details are received by the report). You will need to parse the data written to the console and strip out the file path you want to embed. Make sure that you strip the image path completely so that you don't output the file path as part of the other trace information received from the console.
Edit: I've since discovered that there seems to be an issue with the template in the sample project. The following section in the template is bugged:
class="log">#Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOT[ <a href="http://specflow.org/plus/documentation/,-/" data-page=",-"<img width='1000' src=").Replace("</a> ]SCREENSHOT", "</img>"))</pre>
This is because the console no longer seems to be formatting the file as a hyperlink, so the replacement string is never found. Updating this line in ReportTemplate.cshtml seems to have done the trick:
<pre class="log">#Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOT[ ", "<img width='1000' src=\"").Replace(" ]SCREENSHOT", "\"</img>"))</pre>
As the console is no longer formatting the file as a hyperlink, you only need to replace the padding (in this case the "SCREENSHOT[]SCREENSHOT") from the string and instead enclose the path with the <IMG> tag. You also need to add the quotes around the file path.
I would like to see what is happening behind the scenes when the engine transforms XML file with screen definition into Groovy (I suppose) script. So that I can see the definition turning into more readable script, hopefully.
Where shall I place the breakpoint while debugging?
Also, in Tools (/apps/tools/Service) if you click on 'Service detail' you get a nicely rendered view of the generated groovy for any of your services called from screens (or otherwise called). 'Services' are a very intuitive unit for debugging in moqui.
XML Screens are not transformed into scripts like XML Actions are. XML Screens and Forms are transformed by FreeMarker macros into the desired output text (html, xsl-fo, csv, etc). These macros are defined in the DefaultScreenMacros.html.ftl file for html output, and similarly named files (in the runtime/template/screen-macro directory) for other types of output.
I would like to have SublimeText show the HTML result of parsing my HAML in another window, live, as I type the HAML.
Does anyone have an idea of how to make this happen? In, e.g., WebStorm there are file watchers that do this, but is there something like that built into ST2?
I did something similar to this with Typescript, only I only updated the Javascript output when I saved the file. First, I would say to take a look at SublimeBuildOnSave. That'll show you how to hook into the save function and see what file is being saved.
When you've got the general idea, you can take a look here and mess around with opening another pane (or using the existing pane) to show the compiled output.
It's pretty simple to make a simple version of this. If you want more advanced features like live compiling, it'll take a bit more effort, but it's not impossible. But the above scenario worked just fine for Typescript for me. (If I find where I left that code, I'll post it.)
I am looking for a script that will go through ~75,000 SWF files that we have, will decompile each and find all the Shapes/Elements which size is greater than x.
The output should look smthng like:
SWF Filename "SWF Path" "SWF overall Size" "Element Name" "Element Size"....
Does anybody know of a software that might be able to handle that task?
How do decompile scripts work ? would it be easy to write something to handle the above task?
Thanks
Library for swf parsing: as3swf
SWF format reference: version 10
You'll need to know SWF format basics and shapes/frames definitions. Make an AIR app that will read files and parse them. Surprisingly, ActionScript is probably best way to parse SWF.
There's a .NET based parser called SWFModeller that forms part of the Swiffotron project. It would be able to parse and then inspect the shapes in the SWF.