I can't get IE to print my canvas (generated using excanvas)... I'm using the most recent version of excanvas.
http://dl.dropbox.com/u/997831/canvas.html
(Note: I already tried having the canvas element already on the page instead of creating it with document.createElement)
Unfortunately, there is no good answer here. There has been a ticket open for well over a year regarding the printing of excanvas that has yet to be answered. You could try the silverlight version of excanvas it's a little better but still suffers from similar problems.
The only way to get it printed properly now would be doing a print screen and then printing the image. Unless an newer version of excanvas comes out or IE9 is released, native printing on IE just isn't going to work.
my best shot currently is printing pre-rendered image
(see wkhtmltoimage on google code)
Related
Believe it or not, I have a UWP app that needs to print multi-part forms on a dot matrix printer. We got a print driver, and we can print just fine from Word/Notepad. However, from my application the fonts look really bad. The test docs used 'Courier New' at 12 pitch. This is exactly what I have in my style for the printed information. However, when it comes from my app, the font looks nasty. I have tried numerous font family combinations and nothing seems to help.
Any ideas/pointers would be appreciated. Thanks.
Turns out the problem was the printer driver. Switching to the Windows Update driver specific for that printer solved all the problems. Wish the inbox driver had worked, but happy it is resolved.
Is it just me, or is the angular-material "Getting Started" example broken?
On that page (link above), there's an inline codepen to show using angular-material. But the demo doesn't work! (In particular, I don't see a button to collapse the sidebar.)
Since I used this example in my started project, I spent quite some time troubleshooting it -- to no avail. Then, I realized the example itself it may be broken. And sure 'nuff, it is!
Does anyone know what the actual bug is, so I can work around it on my test app? It must have worked at some time; but I can't figure out why it's broken now.
Thanks!
That particular pen is working fine for me but I have noticed a few are not working, and it's due to the angular-material.js link being incorrect in the dependencies (under the pen's settings) the link provided redirects to the CSS.
This is intentional - the sidebar only becomes collapsable on smaller screens and is open on larger screens. Shrinking your browser window will show the collapse button.
That being said, the Getting Started page is definitely in need of an update. It is a good guide for a basic page structure, but the individual demo pages will be a lot better if you're looking to try out some of the components. (Every demo has a CodePen link to open an editable version.)
This is an issue I've been experiencing only for the last few days; when following a link to jsfiddle, or even going to the jsfiddle homepage (on IOS 6, iPad 2), jsfiddle doesn't initialise properly, and all I see is "initialising the awesome". Even logging in and creating a fiddle doesn't work. The issue only seems to have appeared since some recent downtime which I assume they were updating jsfiddle during it. Has anyone else experienced this issue/have a fix?
NB: this occurs on both safari and chrome.
Alright, I've sent an email to jsfiddle support, and I came up with this response:
We're working on that.
https://github.com/jsfiddle/jsfiddle-issues/issues/330
For the moment please use draft feature or add /embedded/result to the
URL.
http://doc.jsfiddle.net/basic/introduction.html#draft-page
Regards, Piotr
Hopefully this means that the issue will be fixed soon, however, in the meantime, use: (for example)
http://jsfiddle.net/ (your fiddle)/embedded/result
I.e, just add /embedded/result to the end of the url as Piotr suggested.
I'm getting a weird error while trying to click on a Capybara Element
I'm using find(:xpath,"//a[contains(text(),'Connect')]").click
(find(:xpath,"//a[contains(text(),'Connect')]").present? return true)
the error I get is:
Selenium::WebDriver::Error::MoveTargetOutOfBoundsError Exception: Element cannot be scrolled into view:javascript:void(0);
i did some research and the only solution i found is that setting the selenium version to 2.16 may fix this issue (i'm using 2.25).
anybody got an idea?
It may happen when the page being tested is not fit into the current window size. If you know such pages where usually these error happening, you may explicitly scroll down before doing the operation on such hidden elements(like click, clear etc). Here the code to explicitly scroll down the page.
In java,
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("javascript:window.scrollBy(250,350)");
From the times I used selenium webdriver to test .NET apps, I would get that error when the issue was exactly what it sounds like: It's looking for an object on the page that it cant scroll to for some reason. In my case it was because some dialogue boxes would appear without scrollbars and the driver had no way to "scroll the object into view"
Can you watch the execution of your test and see if that's the case? I had some luck rolling back to a previous version of firefox because 15+ was (as of about 2 months ago when I had the issue) unsupported by web driver and had this problem periodically. Rolling back selenium versions may help too.
First step though is definitely to watch the execution of the test and see whats happening though. And a good debugging idea may be to try to work through your steps manually yourself to make sure the test works by hand.
Its also worth noting that for the webdriver to be able to execute click the object actually has to be visible. IsPresent doesnt require that, it just searches the page files. Also an issue I ran into. IsPresent will still return true for objects that are not and cannot be made visible on the page (i.e. something at the bottom of the page that you cant see at the time)
Couple of tips here:
Webdriver should ideally be on the most recent update, it's what most use (Unless you're doing Ruby Automation)
Use css selectors, xpath (Whilst rendered), is almost always heavier on both resources and code.
Try defensive coding, first of all ascertain it exists. There are many ways to do that dependent on what package you are using. In ruby you would do page.has_css?('css_string')
I've been using pixel perfect for quite a long time, and grown to love it (despite it's annoyances). Now, when pp is no longer compatibile with fx 6, I'm looking for a tool to replace it.
I found x-precise and am one step from buying it, but I don't quite like the necessity to include something in source page.
I know that I can do it myself, maybe not as good as xprecise or pp, but I just don't have time right now.
I'm curious to know what do you use? Or do you stick to old fx, just to use pixel-prefect?
I have been working for 3 years as a developer and created my own script for pixel perfect mode. http://jek-fdrv.16mb.com/pixp/
In Chrome, try PerfectPixel
https://chrome.google.com/webstore/detail/dkaagdgjmgdmbnecmcefdhjekcoceebi
I haven't managed to add a layer in PixelPerfect under any of last Firefox ..27.x.x builds - checkbox is locked. I tried PP versions older than 1.8 it didn't help. I tried to find a decent alternative and failed. Eventually I simply wrote a bookmarklet that provides a similar service http://dsheiko.github.io/pixel-perfect-bookmarklet/.
Pixel Perfect 2 for Firefox native developer tools is available:
https://github.com/firebug/pixel-perfect/wiki
Honza
Using the "Compatibility Reporter" seems to work for me so far. The only issue I recognized is a needed reload of the page, to see recently added overlays in the pixel-perfect list.
Just change line 15 in install.rfd file to
<em:maxVersion>10.0.*</em:maxVersion>
Also there are little issue with left position. To fix it change file panelAction.js at line 108 to
this.setPrefValue("pixelPerfect.lastXPos", this.findPixelPerfectXPos(overlayDivId) + 1);
at line 355 to
xPos += 1;this.updatePanelDisplayOfXAndY(xPos, yPos);
After adding new overlay just refresh page or reopen firebug