Created
November 20, 2023 19:49
-
-
Save harsha509/bedccc97c37992c38bc280479afc5baf to your computer and use it in GitHub Desktop.
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 org.openqa.selenium.*; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
public class TestSelenium { | |
public static void main(String[] args) throws InterruptedException { | |
WebDriver driver = new ChromeDriver(); | |
driver.get("https://www.surveymonkey.com/r/CHP86NN"); | |
Thread.sleep(2000); | |
WebElement option= driver.findElement(By.xpath("//*[@id='153853250_1164002632_label']/span[1]")); | |
option.click(); | |
Thread.sleep(1000); | |
WebElement submit= driver.findElement(By.xpath("(//button[@type='submit'])[3]")); | |
submit.click(); | |
Thread.sleep(1000); | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment