How to work with Dropdown using Selenium Webdriver with Java

How to work with Dropdown using Selenium Webdriver with Java Let’s See How to work with Dropdown using Selenium Webdriver with Java Here we shall see a small program to check the drop-down values and how to select the value with single select. Case History – the execution flow of the below code is: Launch site Locate Drop-down check whether […]

Registration Example Using Selenium WebDriver

Registration Example Using Selenium WebDriver Progrm to test registration process via Selenium Webdriver Java.  Launch https://www.mercurytravels.co.in/ site using chrome browser.  Click register link.  Fill fields and select INDIA as country.  Click register button.  Close site. //Launch site using chrome System.setProperty(“webdriver.chrome.driver”,”D:\\chromedriver.exe”); ChromeDriver driver=new ChromeDriver(); driver.manage().window().maximize(); driver.get(“https://www.mercurytravels.co.in/”); Thread.sleep(5000); //Click register link driver.findElement(By.linkText(“REGISTER”)).click(); Thread.sleep(5000); driver.findElement(By.name(“firstName”)).sendKeys(“xxxx”); driver.findElement(By.name(“lastName”)).sendKeys(“xxxx”); driver.findElement(By.name(“phone”)).sendKeys(“xxxx”); driver.findElement(By.name(“userName”)).sendKeys(“xxxx”); […]

Screenshot of Element in Selenium with Java

Screenshot of Element in Selenium with Java Lets see Screenshot of Element in Selenium with Java Here we will try to understand how to take a screenshot on selenium  using selenium webdriver 4.0 Alpha version. These is the new methods introduced in 4.0 Alpa version. // open browser and launch site System.setProperty(“webdriver.chrome.driver”, “C:\\chromedriver.exe”); ChromeDriver driver = new ChromeDriver(); driver.get(“https://www.gmail.com”); Thread.sleep(5000); […]

Interacting with Different Browsers using Selenium Java

Interacting with Different Browsers using Selenium Java Here we will see working example with different browsers using selenium java. Scanner sc=new Scanner(System.in); System.out.println(“Enter Browser name:”); String a=sc.nextLine(); WebDriver driver; if(a.equals(“chrome”)) { System.setProperty(“webdriver.chrome.driver”,”D:\\chromedriver.exe”); driver=new ChromeDriver(); driver.manage().window().maximize(); // Maximize the screen } else if(a.equals(“firefox”)) { System.setProperty(“webdriver.gecko.driver”,”D:\\geckodriver.exe”); driver=new FirefoxDriver(); } else if(a.equals(“ie”)) { System.setProperty(“webdriver.ie.driver”,”D:\\IEDriverServer.exe”); driver=new InternetExplorerDriver(); } else if(a.equals(“edge”)) { System.setProperty(“webdriver.edge.driver”,”D:\\MicrosoftWebDriver.exe”); driver=new EdgeDriver(); […]

How to check Website is Secured or Not?

There are two ways to check if the website is secured or not. Mannually we can check if the site is secured or not with the LOCK symbol beside URL, if its not secured then it would be mentioned on tab as “Not Secure” then the site is not secured. By automation also we can check if the site is […]

Steps to write the first selenium C-Sharp

Steps to write the first selenium C-Sharp Lets see the Steps to write the first selenium C-Sharp At the top of the program you need to add the selenium namespace. //Adding Namespace using OpenQA.Selenium; using OpenQA.Selenium.Firefox; Add the following code in your static void Main section. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; //Adding Namespace using OpenQA.Selenium; […]

×

Hello!

Click one of our representatives below to chat on WhatsApp or send us an email to mannavaadi@live.com

× How can I help you?