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
| public class HomePage { | |
| public LoginPage navigateToLoginPage () { | |
| openMyAccountMenu ().loginLink () | |
| .click (); | |
| return new LoginPage (); | |
| } | |
| private HomePage openMyAccountMenu () { | |
| getDriver ().findElement (By.linkText ("My account")) | |
| .click (); | |
| return this; |
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
| package io.github.mfaisal, the expected text is updated tostatic io.github.mfaisalkhatri.drivers.DriverManager.getDriver; | |
| import static org.testng.Assert.assertEquals; | |
| import io.github.mfaisalkhatri.listeners.Retry; | |
| import io.github.mfaisalkhatri.pages.lambdatestecommerce.HomePage; | |
| import io.github.mfaisalkhatri.pages.lambdatestecommerce.LoginPage; | |
| import io.github.mfaisalkhatri.pages.lambdatestecommerce.SearchResultPage; | |
| import io.github.mfaisalkhatri.tests.base.BaseSuiteSetup; | |
| import org.testng.annotations.BeforeClass; |
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
| package test; | |
| import java.util.set; | |
| import java.util.Iterator; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; | |
| import org.testng.Assert; |
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
| package test; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; | |
| import org.testng.Assert; | |
| import org.testng.annotations.Test; | |
| public class TestModalDialogBox extends BaseTest |
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
| package test; | |
| import java.net.*; | |
| import java.time.Duration; | |
| import java.util.HashMap; | |
| import org.openqa.selenium.remote.RemoteWebDriver; | |
| import org.openqa.selenium.support.ui.WebDriverWait; |
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
| <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>ModalDialogBoxSeleniumJava</groupId> | |
| <artifactId>ModalDialogBoxSeleniumJava</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <build> | |
| <sourceDirectory>src</sourceDirectory> | |
| <plugins> |
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
| export default class MainPage { | |
| static elExists(text){ | |
| cy.get('body') | |
| .then($body => { | |
| if ($body.find(text).length) { | |
| return 'text' | |
| } | |
| return '.both.text-reset' |
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
| import config from './config.json' | |
| import MainPage from '../../page-objects/components/MainPage' | |
| describe('Elements Exist', () => { | |
| it('Elements exist across the pages', () =>{ | |
| cy.visit(`${config.URL3}`) | |
| //Element Exists | |
| cy.get('body') | |
| .then($body => { | |
| if ($body.find('.compare-total').length) { | |
| return '.compare-total' |
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
| { | |
| "URL3": "https://ecommerce-playground.lambdatest.io/index.php?route=product/category&path=57" | |
| } |
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
| { | |
| "lambdatest_auth": { | |
| "username": "username", | |
| "access_key": "access_key" | |
| }, | |
| "browsers": [ | |
| { | |
| "browser": "Chrome", | |
| "platform": "Windows 11", | |
| "versions": [ |