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
import { browser, Config } from "protractor"; | |
export const config: Config = { | |
seleniumAddress: "http://127.0.0.1:4444/wd/hub", | |
baseUrl: "http://localhost:8080/", | |
framework: "custom", | |
frameworkPath: require.resolve("protractor-cucumber-framework"), |
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
Show hidden characters
{ | |
"compilerOptions": { | |
/* Basic Options */ | |
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ | |
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ | |
"declaration": false, /* Generates corresponding '.d.ts' file. */ | |
"sourceMap": false, /* Generates corresponding '.map' file. */ | |
"outDir": "e2ejs", /* Redirect output structure to the directory. */ | |
"removeComments": false, /* Do not emit comments to output. */ |
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
{ | |
"cucumberautocomplete.steps": [ | |
"e2e/step_definitions/*.ts", | |
], | |
"cucumberautocomplete.syncfeatures": "e2e/features/*feature", | |
"cucumberautocomplete.strictGherkinCompletion": 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
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint:recommended" | |
], | |
"jsRules": {}, | |
"rules": { | |
"no-var-requires": false, | |
"no-console": true, | |
"object-literal-sort-keys": false |
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
using OpenQA.Selenium; | |
using OpenQA.Selenium.Interactions; | |
using OpenQA.Selenium.Support.UI; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ToolsList.Pages |
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
- task: NodeTool@0 | |
displayName: 'Run API Tests' | |
inputs: | |
versionSpec: '8.x' | |
- script: npm install newman -g | |
displayName: 'Install newman' |
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 test_automation.actions; | |
import Utils.Waits; | |
import org.openqa.selenium.Alert; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.JavascriptExecutor; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.interactions.Action; | |
import org.openqa.selenium.interactions.Actions; | |
import org.openqa.selenium.support.ui.Select; |
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
public static WebElement waitForElement(By locator, WebDriver driver){ | |
// Maximum time to wait in seconds | |
int WAIT = 30; | |
try { | |
// Wait for the element to appear | |
new WebDriverWait(driver, WAIT) | |
.until(ExpectedConditions |
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
public class Screenshots { | |
public static String generateScreenShotFileName(){ | |
// create filename | |
return new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date()) + ".png"; | |
} | |
public static void capturescreenshot(WebDriver driver, String fileName) { |
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
pipeline { | |
// Here we set which CI node/agent we want to run on | |
agent any | |
// Here we can set what environment we're running on, which browser etc... | |
parameters { | |
string(name: 'tests', defaultValue: 'RunCucumberTest', description: 'cucumber tests') | |
string(name: 'url', defaultValue: 'http://toolslist.safebear.co.uk:8080', description: 'test environment') | |
string(name: 'browser', defaultValue: 'chrome_headless', description: 'chrome headless') |
NewerOlder