Found 190 Articles for Selenium Web Driver

How to launch Chrome Browser via Selenium?

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:40:16

17K+ Views

We can launch Chrome browser via Selenium. Java JDK, Eclipse and Selenium webdriver should be installed in the system before Chrome browser is launch.Follow the steps one by one to launch Chrome −Navigate to the link: https://chromedriver.chromium.org/downloads.Select the Chrome driver link which matches with the Chrome browser in our system.Next, we have to choose and click on the Chrome driver link which is compatible with the operating system we are using.A zip file gets downloaded. Extract and save the chromedriver.exe file in a location.We can configure the chromedriver.exe file in the following ways −By setting the System Properties in the ... Read More

How do you get selenium to recognize that a page loaded?

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:38:25

8K+ Views

We can get Selenium to recognize that a page is loaded. We can set the implicit wait for this purpose. It shall make the driver to wait for a specific amount of time for an element to be available after page loaded.Syntaxdriver.manage().timeouts().implicitlyWait();After the page is loaded, we can also invoke Javascript method document.readyState and wait till complete is returned.SyntaxJavascriptExecutor js = (JavascriptExecutor)driver; js.executeScript("return document.readyState").toString().equals("complete");After this, verify if the URL matches the one we are looking for.ExampleCode Implementation with implicit wait.import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; public class Pageload{    public static void main(String[] args) {   ... Read More

How to verify specific text exists within an attribute in Selenium IDE?

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:36:20

1K+ Views

We can verify specific text exists with an attribute in Selenium IDE. This can be done using the assert and verify commands −assert element present − Verifies if the element exists on the page. If assertion fails, the test terminates. It has the element locator as an argument.For example −assert element not present − Verifies if the element does not exist on the page. If assertion fails, the test terminates. It has the element locator as an argument.verify element present − Verifies if the element exists on the page. It has the element locator as an argument.verify element not present ... Read More

How to select value from a drop down using Selenium IDE?

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:34:37

2K+ Views

We can select value from a dropdown using Selenium IDE. The select command is used for this purpose. First of all, Selenium IDE add-on should be installed in Firefox.Launch Firefox and select the Tools menu. Then choose Selenium IDE.Selenium IDE window shall open. Choose the first row inside the test script edit box.Enter select in Command field. To identify the dropdown with the id locator, enter the Target field. The value/index of the option to be selected is to be entered inside the Value field.Once done, click on the Run option.

The Architecture of Selenium WebDriver.

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:31:31

531 Views

The architecture of Selenium webdriver are illustrated below −Image source:https://www.tutorialspoint.com/what−is−web−driver−in−seleniumSelenium webdriver has the following units −Selenium Binding Languages − Selenium can work on various libraries like Java, Python, Ruby, and so on. It has the language bindings for more than one language.JSON Wire Protocol − JSON is Javascript Object Notion. It is used for transferring data from the server to the client on the web page. It is based on the Rest API that transmits information among HTTP servers.Browser Driver − All the browsers have a specific browser driver. They interact with the browsers (hiding the logic of browser functionality). ... Read More

What is WebDriver in Selenium?

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:30:18

858 Views

The webdriver in Selenium is an automation framework used to carry out testing in the web in multiple browsers. It can support more than one operating system as well. It comes with no cost.Selenium can used with languages like −JavaPythonC#Ruby.NetPHPSelenium webdriver can be used HTMLUnit browsers which are headless in nature. Thus the execution can happen in invisible mode without a GUI. The headless execution is preferred as it consumes less resources.Selenium can be used with browsers like −ChromeFirefoxSafariIEHeadless modeEdgeThe structure of webdriver is illustrated below −As a test script is executed, a HTTP request is generated for every command ... Read More

How do I download Selenium RC?

Debomita Bhattacharjee
Updated on 28-Nov-2020 13:29:00

567 Views

We can download Selenium RC by downloading the Java jar file − selenium−server−standalone.jar. We have to download and extract the zip file to do the actual installation.Using the Java Client Driver, the installation can be done by the below steps −To run the Selenium RC server, Java should be installed properly and the path of the environment variable correctly set. To check if Java is installed run the command −java −versionNavigate to the link: https://www.selenium.dev/downloads/ and download the Selenium java client driver zip file.Then the selenium−java jar file is to be extracted.Open an IDE say, Eclipse.Create a Java project.Associate the ... Read More

How to group selected tests from a set of tests in pytest?

Debomita Bhattacharjee
Updated on 29-Jul-2020 12:47:19

206 Views

We can group selected tests for execution from a set of tests in pytest.Pytest is a test framework in python. To install pytest, we need to use the commandpip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test keyword and every line of code ... Read More

How to run a selected test from a set of tests in pytest?

Raju Kumar
Updated on 29-Jul-2020 11:46:46

332 Views

We can run a selected test from a set of tests in pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test keyword and every line of ... Read More

How to use fixtures in pytest?

Debomita Bhattacharjee
Updated on 29-Jul-2020 11:22:29

300 Views

The fixtures are methods which shall execute before each test method to which it is associated in pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test ... Read More

Previous 1 ... 3 4 5 6 7 ... 19 Next
Advertisements