Found 519 Articles for Selenium

How does Selenium Webdriver handle the SSL certificate in Edge?

Debomita Bhattacharjee
Updated on 25-Jun-2021 12:58:44

756 Views

We can handle SSL certificates in Edge browser with Selenium webdriver. This is done with the help of the EdgeOptions class. We shall create an object of this class and set the parameter setAcceptInsecureCerts to the true value.Finally, this information has to be passed to the webdriver object to get the desired browser settings. An SSL is a protocol designed to establish a secured connection between the server and the browser.SyntaxEdgeOptions e = new EdgeOptions(); e.setAcceptInsecureCerts(true);Code Implementationimport org.openqa.selenium.WebDriver; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.edge.EdgeOptions; public class EdgeBrwserSSL{    public static void main(String[] args) {       System.setProperty("webdriver.edge.driver",       "C:\Users\ghs6kor\Desktop\Java\msedgedriver.exe"); ... Read More

How to automate instagram login page using java in selenium?

Debomita Bhattacharjee
Updated on 25-Jun-2021 12:57:53

2K+ Views

We can automate Instagram login page with Selenium webdriver in Java. To achieve this, first we have to launch the Instagram login page and identify the elements like email, password and login with the findElement method and interact with them.Let us have the look at the Instagram login page −Code Implementationimport org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; public class InstagramLogin{    public static void main(String[] args) {       System.setProperty("webdriver.gecko.driver",       "C:\Users\ghs6kor\Desktop\Java\geckodriver.exe");       WebDriver driver = new FirefoxDriver();       //implicit wait       driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);       //URL ... Read More

Why use Selenium WebDriver for Web Automation?

Debomita Bhattacharjee
Updated on 25-Jun-2021 12:56:44

314 Views

Selenium webdriver is used widely for web automation. This because of the reasons listed below −Selenium webdriver comes without any cost and we do not need to buy a license for its usage. We can just download and start using it for automating the test cases.Selenium webdriver can be used to stimulate human-like actions like drag and drop, keypress, click and hold, and so on. This is done with the help of the Actions class.Selenium webdriver has a very friendly API which makes it easier for the users.Selenium webdriver can support multiple languages like Java, Python, JavaScript, C# and so ... Read More

Why Selenium IDE is not used for dynamic Website testing?

Debomita Bhattacharjee
Updated on 25-Jun-2021 12:56:06

523 Views

Selenium IDE is not used for dynamic testing. It can be used for a quick solution for a simple automation scenario, but not for developing an entire regression suite. The reasons for doing so are listed below −Selenium IDE is a Firefox plugin and hence mostly compatible with only Firefox browser.Selenium IDE is majorly used for prototyping purpose and can be used to automate static web pages only. There can be multiple issues if we try to test a dynamic page with Selenium IDE.Instead of Selenium IDE, Selenium webdriver can be used since it provides a programming interface to identify ... Read More

How to automate gmail login process using selenium webdriver in java?

Debomita Bhattacharjee
Updated on 25-Jun-2021 12:54:15

11K+ Views

We can automate the Gmail login process using Selenium webdriver in Java. To perform this task, first we have to launch the Gmail login page and locate the email, password and other elements with the findElement method and then perform actions on them.Let us have the look at the Gmail login page −Code Implementationimport org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; public class GmailLogin{    public static void main(String[] args) {       System.setProperty("webdriver.gecko.driver",       "C:\Users\ghs6kor\Desktop\Java\geckodriver.exe");       WebDriver driver = new FirefoxDriver();       //implicit wait       driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);   ... Read More

How to use Selenium IDE?

Debomita Bhattacharjee
Updated on 25-Jun-2021 12:53:23

254 Views

We can use Selenium IDE with the help of the Firefox browser. The steps required to install it are listed below −Step1 − Open the Firefox browser and launch the URL − https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/..Step2 − Click on the Add to Firefox button.Step3 − A browser pop-up gets opened. Click on Add.Step4 − The success message - Selenium IDE has been added to Firefox gets displayed along with the Selenium IDE icon created on the browser menu.Step5 − Click on the icon, to launch the Selenium IDE.

How to do session handling in Selenium Webdriver?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:08:55

5K+ Views

We can perform session handling with the help of Selenium webdriver with a TestNG framework. To trigger different sessions, we shall use the attribute parallel in the TestNG XML file.A TestNG execution configuration is done in the TestNG XML. To create multiple sessions, we shall add the attributes – parallel and thread-count in the XML file.The attribute thread-count controls the number of sessions to be created while executing the tests in a parallel mode. The value of parallel attribute is set to methods.In our example, we would have three methods with three different session ids which are executing in parallel.Exampleimport ... Read More

How does Selenium Webdriver handle SSL certificate in Chrome?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:09:31

2K+ Views

We can handle SSL certificate with Selenium webdriver in Chrome browser. A SSL is the standardized protocol used to create a connection between the browser and server.The information exchanged via a SSL certificate is encrypted and it verifies if the information is sent to the correct server. It authenticates a website and provides protection from hacking.An untrusted SSL certificate error is thrown if there are problems in the SSL certificate. We shall receive such an error while we launch a website. In Chrome, we use the ChromeOptions class to work with SSL certificates.We shall create an instance of this class ... Read More

How to automate google Signup form in Selenium using Python?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:10:14

872 Views

We can automate Google Signup form with Selenium webdriver in Python. To automate this page, we have to first launch the Google Signup page and identify each element on the form.Let us have a look at the Google Signup form −Examplefrom selenium import webdriver #set chromodriver.exe path driver = webdriver.Chrome(executable_path="C:\chromedriver.exe") #implicit wait driver.implicitly_wait(0.5) #launch URL driver.get("https://accounts.google.com/signup") #identify elements within form f = driver.find_element_by_id("firstName") f.send_keys("Test") l = driver.find_element_by_id("lastName") l.send_keys("One") u = driver.find_element_by_id("username") u.send_keys("test124ewin") p = driver.find_element_by_name("Passwd") p.send_keys("test124@") c = driver.find_element_by_name ("ConfirmPasswd") c.send_keys("test124@") #get value entered s = f.get_attribute("value") t = l.get_attribute("value") v = u.get_attribute("value") w = p.get_attribute("value") print("Values entered in form: ... Read More

How to install Selenium package in Anaconda?

Debomita Bhattacharjee
Updated on 08-Apr-2021 08:01:25

5K+ Views

We can install the Selenium package in Anaconda. The conda has multiple packages so that it can be integrated with Selenium, Selenium-pytest, and so on from the below link − https://anaconda.org/searchA conda is a command line tool in the form of a package which is used for Anaconda.It has some similarities with pip. Selenium is present within the community based conda-forge channel available from the below link − https://anaconda.org/conda-forge/seleniumTo complete installation of this package, we can execute any of the below commands −conda install -c conda-forge seleniumconda install -c conda-forge/label/gcc7 seleniumconda install -c conda-forge/label/cf201901 seleniumconda install -c conda-forge/label/cf202003 seleniumRead More

Advertisements