Do Web Animations work in Dart? - dart

Dartium raises a "Not Supported" exception when calling Element.animate(), and Chrome, via dart2js, doesn't do anything at all.
Web Animations via JavaScript work completely fine in the aforementioned browsers.
Does Dart actually support Web Animations?

There seems to be a bug in the Element.animate API. It looks like the problem is that it takes Map arguments, and it's not being correctly converted, so in dart2js we're passing a Dart LinkedHashMap to JS, and it doesn't understand it. So it's just a matter of convincing the generation script to add the right type conversions. At least for dart2js, I haven't yet investigated Dartium.

I get Exception: Unsupported operation: [info: ../../third_party/WebKit/Source/bindings/core/dart/custom/DartElementCustom.cpp:100] even with an example that worked months ago.
Please create a bug report.

Related

How do I get polyfills to work with Relay?

I have a PHP app and I'm trying to use it with GraphQL and Relay, but trying to get Relay working I keep getting this error in my Browser (Chrome and Safari)
warning.js:36 Warning: Relay relies on polyfills for ES6 features in older browsers. Babel provides a good one: https://babeljs.io/docs/usage/polyfill/
I've tried all sorts of things, and I can't seem to get it to work.
Change webpack configuration, include the polyfill.js as a script.
I can't ignore that warning, because later on I will get:
RelayTaskQueue.js:97 Uncaught TypeError: _promise2.default is not a constructor
I managed to fix the problem myself. The problem was that I was running on Mac OS X with a case insensitive file system.
I tried creating a disk image with case sensitivity, and it worked. Followed instructions here. https://gist.github.com/dixson3/8360571 #

iOS 8 Safari indexedDB.open returns null

We are developing web app, that uses framework that uses indexedDB. All was going fine, but then we tested it on iPad and suddenly it didn't load the page at all. Thought it would be some minor issue, but after some tests we found out, that the app is crashing on:
TypeError: null is not an Object validating 'request'
It crashes on the line :
var request = indexedDB.open("FMVare",415);
This stores null in the request variable so then after that there is:
request.onerror(...)
Which will get us the error message, written above.
I spent one day looking for a fix, but only found that iOS implemetation of indexedDb is "buggy". But I cant even open a database, so there probably is problem somewhere else. My colleague also told me, that it was working fine like 1 month before, but the file with this implementation (according to git) didn't change... ever.
I tried using pollyfill to change it to the WebSQL, again it worked everywhere except iPad browsers (Safari, Chrome). This time it was throwing different error, which I only could google as far as some SQL syntax error, which obviously couldn't be the case, if it is working everywhere else.
I have tried some suggestions, which said to replace in that pollyfill indexedDB with _indexedDB etc. but again, it worked everywhere but iPad.
When I log the variable request, it returns null. If I log indexedDB or window.indexedDB, it returns IDBFactory object, so it's there, but the .open method is failing, without calling .onerror or .onsucess method.
Since I really found many people complaining about indexedDB bad implementation on iOS, it means they were able to use it. So what could be the problem in my iPad? I mean I can try update to iOS 9, but that's not exactly what are we trying to achieve.
I tried deleting cache, changing version number(greater and smaller), creating different database (different name), pollyfill... but still can't get it working, everytime i call indexedDB.open(databasename), it returns null and crashes.
Any ideas?
EDIT:
The error I'm getting with shim is
Error in sysdb transaction - when creating dbVersions.
Then I get the SQLError object with
"code: 5"
and
"message: could not prepare statement (1 not authorized)"
The error happens in createSysDB(success, failure) function of the shim.
UPDATE:
I tried an app on iPad called WebView Rendering so i could try if WKWebView would be capable of running my app. And it was! So the problem really was the UIWebView support of IndexedDB.
Seems very strange to me though, that you can't use IndexedDB on iOS Safari even after update on latest iOS version.

DOM ready in Dartium

Calling focus() inside main() doesn't stick when Dartium is first run (OS X via Dart Editor). There is something async going on that changes focus to the URL bar. Works if Dartium already running. Is there some event I can hook to reliably set focus? Thanks.
Based on the comments in Issue 12283, seems like this would require changes in Chrome to fix. It's not clear if it's a bug, or missing feature, but I think the chances of it being addressed are probably slim :-/

Selenium Web Driver Error

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')

Typo in SOAP WebServExp.GenerateXMLSchema?

We've recently setup out own webservice using SOAP and it all works like a charm.
Because the service is only used from within our own applications, I usually don't allow for a WSDL to be generated.
Today i started some tests with SoapUI and needed a WSDL of our own service. So I enabled the Default action of the TWSDLHTMLPublish component and tried to get the WSDL exported. All I got was an access violaton in WebServExp.GenerateXMLSchema, line 1636:
if (ParentInfo = nil) and ((GetTypeData(ATypeInfo).ParentInfo)^ <> nil) then
Debugging this, reveiled that GetTypeData(ATypeInfo).ParentInforeturned a nil, so of course using ^ on nil raises an access violation.
After removing the carret i had no problems generating the WSDL.
So did I find myself a bug here or am I missing something?
BTW: We have created our own SOAP.bpl, containing all original Delphi soap sources, to correct it for a known problem with exception derived from TRemotableException
So did I find myself a bug here or am I missing something?
Yes, that's a bug. And Subversion reveals it's been like that for many years - for as long as we've been on Subversion:(. [I am not setup to access the previous Starteam repository anymore].
I'm making to a note to remedy and check in unit tests for this. Please feel free to file a QC if time allows. And I'd like to hear more about the issue with TRemotableException-derived types.
Cheers,
Bruneau

Resources