Posts

Showing posts with the label browser

Running Selenium with chromedriver inside a Windows container

Image
Running Selenium for Web UI testing in a Windows container is a little bit tricky. I spent a week on this and finally could make it to work thanks to the idea in [1]. Woohuu! Let's take a look at this sample Java application that runs Selenium with chromedriver. 1. Make sure your Desktop Docker running with Windows Container mode 2. In your Dockerfile, make sure: Install the needed fonts (googlechrome) => this is the most important thing!   ADD files/fonts.tar /Fonts/ WORKDIR /Fonts/ RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command ".\Add-Font.ps1 Fonts" Enable Web-WebSockets feature using Powershell RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "Add-WindowsFeature Web-WebSockets" Install chocolatey to install openjdk8, and googlechrome RUN @powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%...

Texts in SVG do not show up in browsers

If you create a SVG vector image using Inkscape with text(s) you may encounter this: all the texts do not show up in any browser. It is because Inkscape using flowed-text by default which is an un-finished function and is not implemented yet in any other vector renderers (like the browsers). So, what you can do now is to convert those texts into regular texts or non-flowed-text by: 1. Select the text(s) 2. In Text menu, select Convert to text References: [0]  https://bugs.launchpad.net/inkscape/+bug/747441 [1]  http://wiki.inkscape.org/wiki/index.php/FAQ#What_about_flowed_text.3F

Problem with iframes in iOS devices

iframes in iOS devices behave a little bit strange as you all knew. The content displays outside of the iframe. There are many way to fix that issue, here is a quick one: Just replace the iframe tag with  embed and everything will be fine. <embed src="..." type="text/html" ...></embed> Reference: http://stackoverflow.com/questions/10528760/iframe-content-is-displaying-outside-the-iframe-on-ios