Found 719 Articles for Testing Tools

How do I use Selenium with Ruby?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:41:54

1K+ Views

We can use Selenium with Ruby. First of all we have to install Ruby in the system. For installation in Windows, we have to take the help of the RubyInstaller package by navigating to the link −https://rubyinstaller.org/Click on Download.The various versions of Ruby Installers links get displayed. Select the latest version and click on it.Click on the Save File button to download the corresponding rubyinstaller.exe file.Once the download is completed, accept the license agreement and proceed to the next steps till installation is completed.To have Selenium webdriver package for Ruby, run the command −gem install selenium−webdriverTo have Rest−Client package for ... Read More

How to Stop the page loading in firefox programmatically in Selenium ?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:41:38

359 Views

We can stop the page loading in Firefox programmatically. This can be done by first setting page load time with the help of the pageLoadTimeout method.The time to wait for the page load is passed as a parameter to that method.Syntaxdriver.manage().timeouts().pageLoadTimeout(10, TimeUnit.MILLISECONDS);The page is forced to stop from loading with the help of the Javascript Executor. Selenium executes JavaScript command (window.stop() to stop page load) with the help of the executeScript method.Syntax((JavascriptExecutor)driver).executeScript("window.stop();");Exampleimport org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; public class StopPageLdWait{    public static void main(String[] args) {       System.setProperty("webdriver.gecko.driver",       "C:\Users\ghs6kor\Desktop\Java\geckodriver.exe");       ... Read More

What is meant by Selenium RC?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:31:58

2K+ Views

Selenium RC is a key part in Selenium. It is a framework for testing that allows testers and developers to design test scripts in multiple languages to automate frontend UI test cases. It has a client library and a server that starts and quits the browser sessions by defaultServer injects Selenium core (a program in JavaScript) to the browser. The Selenium Core gets the commands from the RC server. Selenium Core executes the commands in JavaScript. Then the JavaScript commands provide instructions to the browser. Finally, the browser runs the instructions given by the Selenium Core and sends a complete ... Read More

Can Google Chrome be supported by Selenium IDE?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:31:11

332 Views

Initially Selenium IDE was used as a Firefox plugin. But the latest Selenium IDE version supports both Chrome and Firefox. For installation in Chrome, navigate to the below link −ttps://chrome.google.com/webstore/detail/seleniumide/mooikfkahbdckldjjndioackbalphokdThen click on Add to Chrome.Click on Add extension.Once installed, we shall get the below message as shown in the image −Also an icon gets created in the menu bar.Click on that icon, and the Selenium IDE gets launched with the below welcome screen.

How to create nested test suites for Selenium IDE?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:26:38

322 Views

We can create nested test suites for Selenium IDE. A group of tests constitutes a test suite. First, to create a test suite we have to follow the below steps as listed below −Step1: Launch Selenium IDE. Then click on Create a new project link.Step2 − Provide the PROJECT NAME. Then click on OK.Step3 − Select Test Suites from the dropdown under the Project name. Then click on + button.Step4 − Add SUITE NAME, then click on ADD.Step5 − The new suite Test_Suite1 gets created. Click on it and select the option Add tests.Repeat the steps 3 and 4, to ... Read More

How do I use Selenium IDE?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:25:55

269 Views

We can use and install Selenium IDE by following a few steps one by one. It is for integrated development of Selenium scripts. It is primarily used as an extension of Firefox.Some facts about Selenium IDE are listed below −Requires no technical knowledge of the testers.Record and playback feature available.Has the option to run either a single test case or all test cases in a suite.Allows usage of breakpoints for debugging.Auto−completion feature for commands in Selenium.Supports multiple locators like xpath, css, id, and so on.Tests can be saved in multiple formats like Python, C#, and so on.Initially used as a ... Read More

Handle Firefox Not Responding While Using Selenium WebDriver With Python?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:25:36

567 Views

We can handle the situation in which the Firefox is not responding with the help of the Selenium webdriver in Python. This can be achieved with the help of the FirefoxProfile class.We shall create an object of this class and apply the set_preference method on it. Then pass these preferences − dom.max_script_run_time and dom.max_chrome_script_run_time with their values set to 0 as parameters to that method.Finally, this information shall be sent to the webdriver object.Syntaxf = webdriver.FirefoxProfile() f.set_preference("dom.max_chrome_script_run_time", 0) f.set_preference("dom.max_script_run_time", 0)We can get the above parameters of the browser by following the below steps −Open the Firefox browser.Type about:config in browser ... Read More

Save a Web Page with Python Selenium

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:19:00

11K+ Views

We can save a webpage with Selenium webdriver in Python. To save a page we shall first obtain the page source behind the webpage with the help of the page_source method.We shall open a file with a particular encoding with the codecs.open method. The file has to be opened in the write mode represented by w and encoding type as utf−8. Then use the write method to write the content obtained from the page_source method.Syntaxn = os.path.join("C:\Users\ghs6kor\Downloads\Test", "PageSave.html") f = codecs.open(n, "w", "utf−8") h = driver.page_source f.write(h)Let us make an attempt to save the below webpage −Examplefrom selenium import webdriver ... Read More

Can Selenium use multi threading in one browser?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:18:44

3K+ Views

Selenium can use multi−threading in one browser with the help of TestNG framework. TestNG provides the feature of parallel execution which works on the concept of Java multi−threading.To execute tests based on various parameters, the TestNG has an XML file where we have the configurations. The attributes parallel and thread−count are used for parallel execution.The parallel attributes can have the following values −Classes − to execute all tests in a class within a one thread.Instances − to execute all methods in the same instance within one thread.Tests − to execute all methods in the same tag within one thread.Methods − ... Read More

How to programmatically configure Chrome extension through Selenium WebDriver?

Debomita Bhattacharjee
Updated on 02-Feb-2021 12:13:01

4K+ Views

We can programmatically configure Chrome extension through Selenium webdriver. We can have multiple extensions of the Chrome browser while we manually open the browser and work on it.However, while the Chrome browser is opened through Selenium webdriver, those extensions which are available to the local browser will not be present. To configure an extension, we have to obtain the .crx extension file of the extension.Then we have to add that extension to the browser which is launched by Selenium webdriver. To get all the extensions available to the browser enterchrome://extensions on the browser.To get add an extension for example: Momentum, ... Read More

Advertisements