Skip to content

Instantly share code, notes, and snippets.

View diemol's full-sized avatar
🏠
Working from home

Diego Molina diemol

🏠
Working from home
View GitHub Profile
@diemol
diemol / Example.java
Created July 3, 2017 12:03
Code to improve
class Sample {
public String solution(String S) {
int len = S.length();
if (len >= 2 && len <= 100) {
char[] charList = new char[len];
charList = S.toCharArray();
int charDash = 0;
String sol = "";
int count = 0;
version: '2'
services:
# Used for my local environment
selenium:
image: selenium/standalone-chrome:3.4.0
ports:
- "4444:4444" # WebDriver
- "5900:5900" # VNC
environment:
- TZ=Europe/Moscow
@diemol
diemol / HowTo.md
Last active January 31, 2018 09:38
How to use a Firefox custom profile with https://github.com/seleniumhq/docker-selenium

Steps to follow in the host machine (most likely, your machine).

Create a Firefox Profile

Copy the created profile to a given folder

  • In OSX, the profiles are located at ~/Library/Application Support/Firefox/Profiles. Find where they are in your operating system.
  • In the profiles folder you will find the profile you just created, for this case we will use the folder name hcqx24zh.selenium.
  • Copy the profile to a folder called firefox in a given location. E.g.:
@diemol
diemol / TestCaseForIssue465.java
Last active April 23, 2017 21:44
Simple test case to reproduce #465 and #87 in SeleniumHQ/docker-selenium
public class TestCaseForIssue465 {
// Setting the url for the WebDriver
private static final String URL = "http://localhost:4444/wd/hub";
@Test
public void checkPageTitle() throws MalformedURLException {
for (int i = 0; i < 100; i++) {
System.out.println("Execution # " + i);
DesiredCapabilities desiredCapabilities = DesiredCapabilities.chrome();
version: '2.1'
services:
app:
extends:
file: ../../docker-compose.yml
service: app
environment:
# Path is relative to the location of the dev server.
- WEBPACK_CONFIG=./acceptance/webpack.config.acceptance.js