Skip to content

Instantly share code, notes, and snippets.

View ckzgraphics's full-sized avatar
🎯
Focusing

chimi ckzgraphics

🎯
Focusing
View GitHub Profile
@ckzgraphics
ckzgraphics / 1_pom.xml
Created May 29, 2020 04:55 — forked from kathyrollo/1_pom.xml
Lean BrowserFactory Pattern with Selenium WebDriver
<!-- https://mvnrepository.com/artifact/org.reflections/reflections -->
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.12</version>
</dependency>
@ckzgraphics
ckzgraphics / resultset_to_map.java
Last active April 23, 2020 17:02 — forked from rrguntaka/resultset_to_map.java
JDBC Result set to Java HashMap
try {
Class.forName(driver);
Connection con = DriverManager.getConnection(url + db, user, pass);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
ResultSetMetaData rsmd = rs.getMetaData();
List<String> columns = new ArrayList<String>(rsmd.getColumnCount());
for(int i = 1; i <= rsmd.getColumnCount(); i++){
columns.add(rsmd.getColumnName(i));
}
@ckzgraphics
ckzgraphics / .gitignore Java
Created January 26, 2020 13:08 — forked from dedunumax/.gitignore Java
A complete .gitignore file for Java
##############################
## Java
##############################
.mtj.tmp/
*.class
*.jar
*.war
*.ear
*.nar
hs_err_pid*
@ckzgraphics
ckzgraphics / selenium-php-webdriver-cheatsheet.md
Created November 29, 2019 09:53 — forked from aczietlow/selenium-php-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);