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
// include all the required modules from selenium web driver and Protractor framework for Protractor tutorial // | |
import { browser, element, by, ElementFinder, ProtractorBrowser, Protractor} from 'Protractor' | |
// describing the test for the mouse action demonstration for Selenium test automation// | |
describe(' Keyboard Action Demonstration in Protractor ', function() { | |
// disable synchronization for non angular websites // | |
browser.ignoreSynchronization = true; | |
browser.manage().window().maximize() |
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 the 'modules' that are required for execution for Selenium test automation | |
import pytest | |
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.keys import Keys | |
import time | |
from time import sleep | |
import sys | |
#Fixture for Firefox |
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 Automation; | |
import java.io.BufferedInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import org.apache.pdfbox.pdmodel.PDDocument; | |
import org.apache.pdfbox.text.PDFTextStripper; |
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
image: node:10.19.0 | |
stages: | |
- install_dependencies | |
- build | |
- test | |
- deploy | |
install_dependencies: |
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 unittest | |
from selenium import webdriver | |
from selenium.webdriver.common.action_chains import ActionChains | |
import time | |
from selenium.webdriver.common.keys import Keys | |
class SwitchTab(unittest.TestCase): | |
def setUp(self): | |
# self.driver = webdriver.Firefox() | |
self.driver = webdriver.Chrome(chrome webdriver executable location) | |
def test_switch_tab(self): |
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
@Override | |
public void beforeNavigateTo(String url, WebDriver driver) { | |
System.out.println("Before navigating to : " + url); | |
} | |
@Override | |
public void afterNavigateTo(String url, WebDriver driver) { | |
System.out.println("After navigating to : " + url); | |
} |
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 listeners; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.OutputType; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.support.events.WebDriverEventListener; | |
public class WebDriverEventHandler implements WebDriverEventListener{ |
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 listeners; | |
import org.openqa.selenium.support.events.WebDriverEventListener; | |
public class WebDriverEventHandler implements WebDriverEventListener{ | |
} | |
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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>WebDriverEventListeners_Selenium_Java</groupId> | |
<artifactId>WebDriverEventListeners_Selenium_Java</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<build> | |
<sourceDirectory>src</sourceDirectory> | |
<plugins> | |
<plugin> | |
<artifactId>maven-compiler-plugin</artifactId> |
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 LambdaTest; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.remote.CapabilityType; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; |