unable to print a document from selenium IDE - selenium-ide

I have tried to print an print a pdf document.
setTimeout(function() {window.print();},1000); It works here and open print view but Selenium can not recocgnize the pdf frame.
I have tried with all type of command to idenity pdw frame with no success.
document.getElementsByTagName('iframe')[0].contentWindow.documentfindElement(By.xpath("//[#id="sidebar"]/div[3]/div/button1").click());*
Any idea?

Related

MongoDB playground output not showing in VS Code terminal

I'm trying to run a few queries on MongoDB playground extension. According to the documentation, the output of the queries should be shown in a terminal. However, A new file is opening up to display the result and the playground output tab of the terminal is empty.
How do I get it to show the result in the terminal?
Use print() or console.log() command
Note that print and console.log will print in the VS Code Output
panel, while the result of the playground is displayed in an editor.
See https://www.mongodb.com/community/forums/t/print-function-in-vscode-extension-is-missing/103118/2
Hope this will help whoever looking for the solution.
Go to View , select "open View.." and type "playground output".
enter image description here

.Bl, .It to render list in mandoc doesn't work on both macOS and Ubuntu 16.04

I try to use a proper macro like .Bl with its .It to render list in mandoc (or per say man page) with the following syntax (as seen in mdoc.7)
The arguments are as follows:
.Bl -tag -width Ds
.It Fl v
Print verbose information.
.El
Tried both on macOS and Ubuntu 16.04 by putting into .SH DESCRIPTION, and it doesn't render expected output. All I see is
The arguments are as follows: Print verbose information.
The steps I do this is
Edit mandoc file
Symlink it to target file at /usr/local/share/man/man3/
See result by man <filename>
PS. I didn't go any gzip.
What did I miss? How can I properly render list in mandoc?
Instead, I look at mandoc's code of /usr/share/man/man1/bash.1 in which I view such man page via man /usr/share/man/man1/bash.1 for safety to ensure I view the right file.
It uses the following syntax
.TP 10
.BI Item Name
Item description
.TP
.BI Item Name 2
Item 2 description
This will properly renders those two items in which the first column has 10 character in width. The second item will use the same column width as defined before. Much cleaner and simpler than what I tried but with not success in the question.
You will see the following output using above syntax

Printing a Report from a Form in Access without a print preview or opening report?

I have a button on a form that I want the user to be able to print a report without opening the report or viewing a print preview. This is my code so far:
DoCmd.OpenReport "DisplayUncompleteProjects", acNormal
DoCmd.RunCommand acCmdPrint
But my problem is that it is print both my form and the report. I just want to print the report. But I also don't want the user to leave the form page. (aka when they are done printing the report all they can see is still the form.)
Thanks.
Leave out the second line, which just prints the current object, and run only:
DoCmd.OpenReport "DisplayUncompleteProjects", acNormal

issues while re-editing text using open-WysiWyg editor

I am using openWysiWyg editor in my website. This is attached to a text-area where I can type in the content and the content is then saved to some php text file with the html tags intact. In the view page on my site i directly include this php file and everything works fine.
Recently I got requests to have some facility to re-edit the already submitted text. For that, I am using the same editor attached to a textarea and I read the contents of the file and pass it to the textarea as . The content get loaded in to the textarea and everything is fine excpet the following issue.
If i try to re-edit something like "& lt ;pankaj & gt ;" - upon loading this content in the editor it gets converted to "< pankaj >< /pankaj >" upon submitting the new changes.
So I am having two issues - why "& lt ;" is getting converted to '<' and why is this auto-completion of tags happening.
I figured out the editor does the following steps :
take textarea.value in some string
use document.write() to copy that value to the texarea's div which in itself is a iframe.
upon submitting it takes object.innerHTML to get the contents and then I save it to the disk
the above issues doesnt happen for text - "i & lt ; 5".
why "& lt ;" is getting converted to '<'
The editor is disabling the escape character < and replacing it with the literal <
why is this auto-completion of tags happening.
The editor is converting the unescaped tag to valid XHTML
the above issues doesnt happen for text - "i & lt ; 5".
That is a numeric comparison, not markup

Crystal Reports printing pauses between pages

When we print a crystal report using crystalReportViewer1.PrintReport(); the printers pause between pages and the client have to press a button in the printer to print the next page. If the client uses the report viewer print button it works fine.
It happens in these printers:
-HP CLJ 3600
-OKI C5450
I've seen that happen when the report is set up for a different paper size than the printer is expecting - ie: your report is setup for A4 and the printer contains 8 1/2 x 11.
In the end we make it work by calling the reportdocument print function instead of the reportviewer's reportDoc.PrintToPrinter(1, true, 1, 1000);
Dont know if Graham awnser is ok thought if someone confirms this i will mark as correct answer too...