Skip to main content

Posts

Scrolling to place on webpage for Protractor or Webdriver testing.

Sometimes when using a Selenium by product like Protractor for testing Angular applications, I run into issues trying to access certain elements. In some cases it is because our UI folks may have another element that hovers over an area rather than actually take up that space. In cases like these I need to move the content on the page similar to how a user would so that the content I need is the front most element on the page. To do this I made a simple scrollTo function that will take a Selenium element and tell the browser with executeScript to goto those coordinates. I also have an offset so that I can move it around the would be elements that cover my element. function scrollToElement(element, offset) { offset = offset || 0; element.getLocation() .then( function(loc) { browser.executeScript(('window.scrollTo('+loc.x+','+ (loc.y - offset) +');')) }); }

Crude Ruby Script to ask for a Password to use for Private git Repo

The Intro Good ole Docker. It is a powerful tool to setup your environments whether in production, dev or test. Plowing through and building a new container I discovered I had the need or want to pass an argument to the Dockerfile and let it log me into a private repo. The Environment Variable.  Looking through the Dockerfile documentation on the docker.io website I saw this wonderful looking thing called an environment variable. When I first looked at it I thought that meant that we could pass them in from the host cli running the docker command. I was dead wrong. The environment variable does create a variable but its only for the container's environment. So what does that mean for us. Well if you think about the reason for Docker is for an unattended setup of an environment. Now if I were going to do this completely automated then I would probably create a ssh key and copy it over using Dockerfile. This is not what I wanted. I really wanted a seperation where I didn't...

Speedometer

Ukulele Chords

Select your Chord and Match your fingers to the diagram.