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="UTF-8"?> | |
<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>selenium4</groupId> | |
<artifactId>selenium4</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<build> |
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
plugins { | |
id 'java' | |
} | |
group 'SeleniumGradleSample' | |
version '1.0-SNAPSHOT' | |
sourceCompatibility = 1.8 | |
repositories { |
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 {Builder,Buy,Key} = require("selenum-webdriver"); | |
async function searchTest(){ | |
// create and open a firefox driver object | |
let driver = await new Builder.forBrowser("firefox").build(); | |
// navigate to google.com | |
await driver.get("https://www.google.com"); | |
// locate the google search textbox and enter "Selenium 4", hit Enter key |
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
{ | |
"name": "google-sample-test", | |
"version": "1.0.0", | |
"description": "a sample selenium 4 with js ", | |
"main": "googleSearchTest.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"author": "Shama Ugale", | |
"license": "ISC", |
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 FullScreenExamples { | |
final static String PROJECT_PATH = System.getProperty("user.dir"); | |
public static void main(String[] args) throws IOException { | |
WebDriver driver = null; | |
System.setProperty("webdriver.chrome.driver", PROJECT_PATH+ "/src/main/resources/chromedriver"); | |
driver = new ChromeDriver(); | |
driver.manage().window().fullscreen(); |
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 org.openqa.selenium.firefox.FirefoxDriver; | |
import java.io.IOException; | |
import java.net.URISyntaxException; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
public class Addon { | |
final static String PROJECT_PATH = System.getProperty("user.dir"); |
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 org.openqa.selenium.By; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import static org.openqa.selenium.support.locators.RelativeLocator.withTagName; | |
public class RelativeLocatorsExample { | |
final static String PROJECT_PATH = System.getProperty("user.dir"); | |
public static void main(String[] args) { | |
System.setProperty("webdriver.chrome.driver", PROJECT_PATH+ "/src/main/resources/chromedriver"); |
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 org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import static org.openqa.selenium.support.locators.RelativeLocator.withTagName; | |
public class ApplitoolsBlogsEx { | |
final static String PROJECT_PATH = System.getProperty("user.dir"); |
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
<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>com.karate.sample</groupId> | |
<artifactId>karate-example</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<properties> |
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
plugins { | |
id 'java' | |
} | |
ext { | |
karateVersion = '0.9.6' | |
} | |
dependencies { | |
testCompile "com.intuit.karate:karate-junit5:${karateVersion}" |