Debomita Bhattacharjee has Published 863 Articles

What is the difference between mocha and Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:51:55

469 Views

The differences between Mocha and Selenium are listed below −VsFunctionalitiesMochaSeleniumPurposeIt is an easy, workable and popular JavaScript framework developed for Node.js.It is a free automation tool used for testing the web.LanguageBased on JavaScript.Can be used with multiple languages like Java, Python, C#, Ruby, JavaScript, and so on.UsageUsed for integration, unit ... Read More

The best way to inspect HTTP response headers with Selenium

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:51:00

4K+ Views

We can inspect HTTP response headers with Selenium webdriver. To verify the HTTP header, we should get the response from a source. Some of the HTTP response codes are listed below −5XX − Represents server concerns.4XX − Represents issues in resource detection.3XX − Represents response redirection.2XX − Represents correct ocde.The ... Read More

How do I automatically download files from a pop up dialog using selenium-python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:47:42

2K+ Views

We can automatically download files from a pop up dialog using Selenium webdriver with Python. After clicking the download link, a dialog box appears for the user to select various options to Save the file.We have to programmatically configure the path where the download has to be performed such that ... Read More

How to set window size using phantomjs and selenium webdriver in Python?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:46:54

331 Views

We can set window size using PhantomJS and Selenium webdriver in Python. To work with the PhantomJS, we should create a driver object of the webdriver.PhantomJS class.Then pass the path of the phantomjs.exe driver file as a parameter to the Class. Next, to set the window size, we shall use ... Read More

How to get Firefox working with Selenium WebDriver on Mac OSX?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:46:38

4K+ Views

We can get Firefox working with Selenium webdriver on Mac OS. For Firefox versions which are greater than 47, the geckodriver.exe file is to be used. We shall be able to launch the browser only after creating an object of the FirefoxDriver class.SyntaxWebDriver driver=new FirefoxDriver();Visit the link −  https://www.selenium.dev/downloads/ and ... Read More

How to add custom ExpectedConditions for Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 01-Feb-2021 11:46:26

1K+ Views

We can add custom ExpectedConditions for Selenium webdriver. We require this custom ExpectedConditions when the default expected conditions provided by webdriver are not enough to satisfy some scenarios.The method until is used which is a part of the WebDriverWait class. Here, the ExpectedConditions are used to wait for a specific ... Read More

How to mute all sounds in chrome webdriver with selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Jan-2021 13:11:00

1K+ Views

We can mute all sounds in Chrome with Selenium webdriver. To mute the audio we have to set parameters for the browser. For Chrome, we shall use the ChromeOptions class.We shall create an object of the ChromeOptions class. Then utilize that object to invoke the addArguments method. Then pass −mute−audio ... Read More

Make Selenium wait 10 seconds.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Jan-2021 13:09:26

12K+ Views

We can make Selenium wait for 10 seconds. This can be done by using the Thread.sleep method. Here, the wait time (10 seconds) is passed as a parameter to the method.We can also use the synchronization concept in Selenium for waiting. There are two kinds of wait − implicit and ... Read More

Maximize WebDriver (Selenium 2) in Python.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Jan-2021 13:07:39

300 Views

We can maximize browser window with Selenium webdriver in Python. It is a good practise to maximize the browser while running the tests to reduce the chance of failure.Once a browser is maximized, the majority of elements become visible to the screen and the probability of interaction with the driver ... Read More

Take screenshot of full page with Selenium Python with chromedriver.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Jan-2021 13:06:31

4K+ Views

We can take a screenshot of a full page with Selenium webdriver in Python with chromedriver. First of all, we shall obtain the original window size with the get_window_size method.Then with the help of JavaScript Executor we shall fetch the complete height and width of the page which is opened ... Read More

Advertisements