Debomita Bhattacharjee has Published 863 Articles

How to get Selenium to wait for ajax response?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:37:47

4K+ Views

We can get Selenium to wait for Ajax response. The determination of the load time of the page due to an Ajax response is a difficult task. This can be achieved with the help of synchronization concepts and wait methods in Selenium are −Implicit wait − It allows the web ... Read More

How to disable Javascript when using Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:34:27

4K+ Views

We can disable JavaScript using Selenium webdriver. We have to use the Options class to achieve this task. Firstly, we have to create an object of the Options class.Then apply the set_preference method on that object. For disabling the JavaScript, we shall set the browser parameter javascript.enabled to False. Also ... Read More

Understanding execute async script in Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:33:22

3K+ Views

We can use the executeAsyncScript method in Selenium webdriver. For an executeAsyncScript method, JavaScript Executor runs an asynchronous part of JavaScript with the reference to the present selected window or frame. In contrast to executeScript, the scripts which run with executeAsyncScript method, should be completed by invoking the given callback.The ... Read More

Can Selenium be used for .NET applications?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:32:50

3K+ Views

We can use Selenium for .NET applications. We should have Visual Studio 2019 installed in the system along with Selenium webdriver and any browser like Firefox, Chrome, and so on. Then we must utilize the NUnit framework.Launch Visual Studio 2019 and then click on Create a new project.Type NUnit in ... Read More

How to check if dom has a class using WebDriver (Selenium 2)?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:26:58

426 Views

We can check if DOM has a class using Selenium webdriver. We can use the findElements method to obtain the list of elements having a particular class. Then pass By.className or By.xpath or By.cssSelector as a parameter to the method.The class name we want to search is passed as a ... Read More

WebDriver executeAsyncScript vs executeScript in Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:26:16

2K+ Views

There are differences between executeAsyncScript and executeScript methods. For an executeScript method, JavaScript Executor runs the JavaScript with the reference to the present selected window or frame. The script within the method shall run as the body of the unnamed function.Inside the script, the documents are used to point to ... Read More

How do you make Selenium 2.0 wait for the page to load?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:25:54

559 Views

We can make Selenium wait for the page to load. We can use the synchronization concept in Selenium to wait for page loading. The implicit wait is a type of synchronization applied to elements to wait for a specified amount of time.Syntaxdriver.manage().timeouts().implicitlyWait();We can also call the JavaScript method document.readyState and ... Read More

What is the best way to take screenshots of tests in Selenium 2?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:25:40

132 Views

We can take screenshots of tests in Selenium webdriver. Capturing a screenshot is one of the most essential steps in failure analysis of failed tests. It is a three way step process to take screenshots.Firstly, we shall convert the webdriver object to the interface called the TakeScreenshot. Then we have ... Read More

How do I verify that an element does not exist in Selenium 2?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:19:14

7K+ Views

We can verify if an element does not exist in Selenium webdriver. To achieve this, we shall use the method getPageSource which gets the entire page source. So we can obtain a complete page source and check if the text of the element exists.We also use the findElements method and ... Read More

How to integrate Sikuli scripts into Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 12:17:42

2K+ Views

We can integrate Sikuli scripts into Selenium webdriver. Sikuli is an automation tool which is open-source. It has the feature to capture the images on the elements as well as perform operations on them.Some of the advantages of Sikuli are −Desktop or Windows applications can be automated.Can be used for ... Read More

Advertisements