Skip to content

Instantly share code, notes, and snippets.

View andreidbr's full-sized avatar

Andrei Dobra andreidbr

View GitHub Profile
@andreidbr
andreidbr / Portfolio.java
Created March 13, 2018 19:36
A Java class with basic Selenium tests organized with TestNG
package PortfolioTests;
import PortfolioTests.Utilities.Utils;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.*;
import org.openqa.selenium.interactions.Action;
import org.openqa.selenium.interactions.Actions;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
@andreidbr
andreidbr / Utils.java
Created March 13, 2018 19:06
An Utils class that instantiates a Webdriver object
package PortfolioTests.Utilities;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import java.util.concurrent.TimeUnit;
public final class Utils {
public static WebDriver driver;
@andreidbr
andreidbr / pom.xml
Created March 13, 2018 18:56
An example pom.xml file with Selenium and TestNG as dependencies
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
@andreidbr
andreidbr / SeleniumMavenDemo.java
Created September 4, 2017 17:41
Official Selenium test case
package demo;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
public class SeleniumMavenDemo {
@andreidbr
andreidbr / pom.xml
Last active September 5, 2017 11:39
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.andreidbr</groupId>
<artifactId>SeleniumMavenTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SeleniumMavenTest</name>
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@andreidbr
andreidbr / _resume.scss
Created May 14, 2017 07:14
Customized section of _resume.scss
.icon-link-item {
display: inline-block;
margin-left: 5px;
> a {
color: #c7c7c7;
}
> a:hover {
color: #333;
}