This file contains hidden or 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
#/support/env.rb | |
require 'rubygems' | |
require 'watir' | |
Before do |scenario| | |
$browser = Watir::Browser.new :firefox | |
$browser.driver.manage.window.maximize | |
end | |
After do |scenario| |
This file contains hidden or 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
async function example() { | |
//To wait for browser to build and launch properly | |
let driver = await new Builder().forBrowser("chrome").build(); | |
try { | |
//To go to the test website from the browser with our code. | |
await driver.get("http://demo.automationtesting.in/FileDownload.html"); | |
//To enter data inside the text area | |
await driver |
This file contains hidden or 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 { By, Key, Builder } = require("selenium-webdriver"); | |
require("chromedriver"); | |
async function example() { | |
//To wait for browser to build and launch properly | |
let driver = await new Builder().forBrowser("chrome").build(); | |
try { | |
//To go to the test website from the browser with our code. | |
await driver.get("http://demo.automationtesting.in/FileDownload.html"); |
This file contains hidden or 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 { By, Key, Builder } = require("selenium-webdriver"); | |
require("chromedriver"); | |
const chromeDriver = require("selenium-webdriver/chrome"); | |
const webdriver = require("selenium-webdriver"); | |
async function example() { | |
//To set chromeOptions | |
var options = new chromeDriver.Options(); | |
options.setUserPreferences({ |
This file contains hidden or 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 USERNAME = "YOUR_USERNAME"; //replace with your username | |
const KEY = "YOUR_ACCESSKEY"; //replace with your accesskey | |
const GRID_HOST = "hub.lambdatest.com/wd/hub"; | |
const { By, Key, Builder } = require("selenium-webdriver"); | |
async function example() { | |
var capabilities = { |
This file contains hidden or 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
<template> | |
<li> | |
<nuxt-link :to="link" class="block hover:bg-gray-50"> | |
<div class="px-4 py-4 sm:px-6"> | |
<div class="flex items-center justify-between"> | |
<p class="text-md font-medium text-blue-500 truncate"> | |
{{ title }} | |
</p> | |
<div class="ml-2 flex-shrink-0 flex"> | |
<p class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800"> |
This file contains hidden or 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
pages/index.vue | |
<template> | |
<div class="max-w-sm mx-auto mt-8"> | |
<div> | |
<h2 class="text-xl"> | |
Job Board | |
</h2> | |
<span class="text-xs block pb-4">Awesome Jobs for awesome IT people</span> | |
</div> | |
<div class="shadow overflow-hidden sm:rounded-md"> |
This file contains hidden or 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 NUnit.Framework; | |
using OpenQA.Selenium; | |
using OpenQA.Selenium.Support.UI; | |
using System; | |
using OpenQA.Selenium.Remote; | |
namespace SeleniumTutorial | |
{ | |
public class DropDown | |
{ |
This file contains hidden or 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
[Test] | |
[TestCase("Monday")] | |
[TestCase("Tuesday")] | |
[TestCase("Wednesday")] | |
[TestCase("Thursday")] | |
[TestCase("Friday")] | |
[TestCase("Saturday")] | |
[TestCase("Sunday")] | |
[Parallelizable(ParallelScope.All)] | |
public void ValidateDropDownSelection(string dayOfTheWeek) |
This file contains hidden or 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
[Test] | |
public void ValidateMultipleSelection() | |
{ | |
driver.Navigate().GoToUrl("https://www.lambdatest.com/selenium-playground/select-dropdown-demo"); | |
string[] selectedStates = { "Florida", "New York", "Texas" }; | |
var multiSelect = new SelectElement(driver.FindElement(By.Id("multi-select"))); | |
Assert.IsTrue(multiSelect.IsMultiple, "The Select does not allow multiple selection."); | |
foreach (var state in selectedStates) | |
{ | |
multiSelect.SelectByText(state); |