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
/// <summary> | |
/// Extension method for IWebDriver that performs a drag-and-drop operation using JavaScript. | |
/// This method highlights the source and destination elements for visual feedback during the operation. | |
/// </summary> | |
/// <param name="_driver">The IWebDriver instance controlling the browser.</param> | |
/// <param name="source">The IWebElement representing the element to be dragged.</param> | |
/// <param name="destination">The IWebElement representing the target element where the source will be dropped.</param> | |
public static void DragAndDropUsingJS(this IWebDriver _driver, IWebElement source, IWebElement destination) | |
{ | |
// Highlight the source and destination elements for visual feedback during the drag-and-drop operation. |
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 com.guide.beginners.testng.theinternet.individualtestclass; | |
import io.github.bonigarcia.wdm.WebDriverManager; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.testng.annotations.*; | |
import java.util.stream.Collectors; |