How do I open any app from my web browser (Chrome) in Android? What do I have to do with the A Href link?

The basic syntax for an intent based URI is as follows: intent: HOST/URI-path // Optional host #Intent; package=[string]; action=[string]; category=[string]; component=[string]; scheme=[string]; end; Parsing details available in the Android source. To launch the ZXing barcode scanner app you can encode your href as follows: <p> <a href=”intent://scan/#Intent;scheme=zxing;package=com.google.zxing.client.android;end”>Take a qr code</a><br> <a href=”intent://scan/?ret=http%3A%2F%2Fexample.com#Intent;scheme=zxing;package=com.google.zxing.client.android;end”>Take a qr code … Read more

Circumventing Chrome Access-control-allow-origin on the local file system?

I think I’ve figured it out. All I really needed to do was add a callback into my <script> tag. Final code: I have an element named next… So, in the $(“#next”).click() function I have the following code. This only gets executed if they click “next”. //remove old dynamically written script tag- var old = … Read more

Set Chrome’s language using Selenium ChromeDriver

You can do it by adding Chrome’s command line switches “–lang”. Basically, all you need is starting ChromeDriver with an ChromeOption argument –lang=es, see API for details. The following is a working example of C# code for how to start Chrome in Spanish using Selenium. ChromeOptions options = new ChromeOptions(); options.addArguments(“–lang=es”); ChromeDriver driver = new … Read more

How to Make Select Element be Transparent in Chrome?

select { width:192px; padding:2px; border:none; background:url(http://imgur.com/MJyZM.png) 0 0 no-repeat; -webkit-appearance: none; } <select> <option value=”abcdefg”>abcdefg</option> <option value=”1234567″>1234567</option> <option value=”abcdefg”>abcdefg</option> </select> Not tested on firefox but it seems -webkit-appearance: none; disables specific behaviours webkit can apply.

document.documentElement.scrollTop return value differs in Chrome

The standards-based way of getting the scroll is window.scrollY. This is supported by Chrome, Firefox, Opera, Safari and IE Edge or later. If you only support these browsers, you should go with this property. IE >= 9 supports a similar property window.pageYOffset, which for the sake of compatibility returns the same as window.scrollY in recent … Read more

Network throttling with chrome and selenium

The API to control network emulation were added to ChromeDriver. And should be available for quite a while now. According to comment in the linked issue you should use version at least 2.26 because of some bugfix. According to Selenium changelog bindings are available for these languages: JavaScript as of version 3.4.0 (commit) Python as … Read more

How to access Google Chrome’s IndexedDB/LevelDB files?

Keys in leveldb are arbitrary binary sequences. Clients implement comparators to define ordering between keys. The default comparator for leveldb is something equivalent to strncmp. Chrome’s comparator for Indexed DB’s store is more complicated. If you try and use a leveldb instance with a different comparator than it was created with you’ll observe keys in … Read more