Skip to content

Instantly share code, notes, and snippets.

*** Settings ***
Resource ../../Resources/PageObject/KeyDefs/Common.robot
Resource ../../Resources/PageObject/KeyDefs/SeleniumDrivers.robot
Variables ../../Resources/PageObject/Locators/Locators.py
Test Teardown Common.Close local test browser
*** Settings ***
Resource ../../Resources/PageObject/KeyDefs/Common.robot
Resource ../../Resources/PageObject/KeyDefs/SeleniumDrivers.robot
Variables ../../Resources/PageObject/Locators/Locators.py
# Test Teardown Common.Close local test browser
exec_platform = os.getenv('EXEC_PLATFORM')
@pytest.mark.usefixtures('driver')
class TestSimpleSelenium:
def test_simple_selenium(self, driver):
resultant_str = "Thanks for contacting us, we will get back to you shortly."
driver.get(locators.test_sel_playground_url)
package CLoudGRid;
import java.net.*;
import java.util.HashMap;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.testng.annotations.*;
package LocalGrid;
import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.annotations.Test;
public class TwoInputFieldTests extends BaseTest
{
package LocalGrid;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.*;
public class BaseTest {
public static WebDriver driver;
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>demo.lambdaTest</groupId>
<artifactId>JavaTestCase</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
import Main from "./main.js"
const signupUrl = "https://ecommerce-playground.lambdatest.io/index.php?route=account/register";
class SignupPage extends Main {
constructor() {
super();
this.url = signupUrl;
this.firstNameInput = "input-firstname";
package WithThreadLocal.advanced-scenarios;
import org.openqa.selenium.By;
import org.testng.annotations.Test;
import WithThreadLocal.BaseTest;
package WithThreadLocal.advanced-scenarios;
import org.openqa.selenium.By;
import org.testng.annotations.Test;
import WithThreadLocal.BaseTest;