This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$x("<xpath>") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
command that will look for files with an extension “c”, and has the occurrence of the string “apple” in it. | |
Find ./ -name “*.c” | xargs grep –i “apple” | |
To find a file: | |
find . -name "foo*" | |
************************************************************************* | |
rm -rf lampp (remove recursively and forcefully) | |
unmae -a | |
zip -r myfiles.zip myfiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="iso-8859-1"?> | |
<!-- WARNING: Eclipse auto-generated file. | |
Any modifications will be overwritten. | |
To include a user specific buildfile here, simply create one in the same | |
directory with the processing instruction <?eclipse.ant.import?> | |
as the first entry and export the buildfile again. --> | |
<project name="Automation" default="run" basedir="."> | |
<!-- ________________________initialize properties____________________________ --> | |
<property environment="env"/> | |
<property name="ws.home" value="."/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@And("^we login to the UI with correct credentials$") | |
public void weLoginToTheRiskViewUIWithCorrect() throws Throwable { | |
homePage = loginPage.doLogin(context.get("USER").toString(), context.get("PASSWORD").toString(), false); | |
} | |
@And("^we login to the UI with incorrect credentials$") | |
public void weLoginToTheRiskViewUIWithIncorrectCredentials() throws Throwable { | |
loginPage = loginPage.doLogin(context.get("USER").toString(), context.get("INCORRECT_PASSWORD").toString(), true); | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/16333790/node-js-quick-file-server-static-files-over-http | |
npm install http-server -g | |
http-server D:\Folder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package testng; | |
import org.testng.annotations.DataProvider; | |
import org.testng.annotations.Test; | |
import java.util.*; | |
public class testngListOfMaps_DataProvider { | |
@DataProvider(name = "Passing List Of Maps") | |
public Iterator<Object[]> createDataforTest3() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sahajamit.selenium.utils; | |
import com.sahajamit.selenium.driver.DriverManager; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.StaleElementReferenceException; | |
import org.openqa.selenium.WebElement; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.lang.reflect.InvocationTargetException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm view <package> version - returns the latest available version on the package. | |
npm list --depth=0 - returns versions of all installed modules without dependencies. | |
npm list - returns versions of all modules and dependencies. | |
npm list -g - returns versions of all modules and dependencies globally | |
node -v | |
npm info YOUR_PACKAGE version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const makeRequest = () => { | |
try { | |
getJSON() | |
.then(result => { | |
// this parse may fail | |
const data = JSON.parse(result) | |
console.log(data) | |
}) | |
// uncomment this block to handle asynchronous errors | |
// .catch((err) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const makeRequest = async () => { | |
try { | |
// this parse may fail | |
const data = JSON.parse(await getJSON()) | |
console.log(data) | |
} catch (err) { | |
console.log(err) | |
} | |
} |