Debomita Bhattacharjee has Published 863 Articles

How to handle authentication popup with Selenium WebDriver using Java?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Nov-2020 10:23:19

4K+ Views

We can handle authentication popup with Selenium. To do this, we have to pass the user credentials within the URL. We shall have to add the username and password to the URL.Syntaxhttps://username:password@URL https://admin:admin@the−nternet.herokuapp.com/basic_auth Here, the admin is the username and password. URL − www.the-internet.herokuapp.com/basic_authLet us work and accept the below ... Read More

Why do we use WebDriver instead of Selenium IDE?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Nov-2020 10:21:11

446 Views

We can use webdriver instead of Selenium IDE. The Selenium IDE is a record and playback tool but not dependable. The web elements which are dynamic cannot be handled well with Selenium IDE.Selenium IDE can be used for an easy solution to automation, but for a full regression suite, Selenium ... Read More

Can I set any of the attribute value of a WebElement in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Nov-2020 10:20:07

6K+ Views

We can set any attribute value of a webelement in Selenium. Selenium can run Javascript commands by the executeScript method. The command to be executed is passed as an argument to the method.Next, we have to identify the element with the help of the Javascript method document.getElementsByClassname. It returns a ... Read More

How to wait for options in a select to be populated in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 30-Nov-2020 10:17:16

3K+ Views

We can wait for options in a select tag to be populated with Selenium. This can be done with the explicit wait concept in synchronization. The explicit wait is designed on the expected condition for an element.To wait for the options, we shall verify if presenceOfNestedElementsLocatedBy is available within the ... Read More

Best way to take screenshot of a web page into Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Nov-2020 13:58:03

294 Views

We can take screenshots of a web page with Selenium. It is a three way process. Taking a screenshot is one of the most essential steps towards defect and failure analysis.First, we have to convert the driver object to the TakeScreenshot interface.SyntaxTakesScreenshot s = (TakesScreenshot)driver;Next, we have to take the ... Read More

How do you use Selenium to execute javascript within a frame?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Nov-2020 13:55:57

741 Views

We can use Javascript within a frame with Selenium. It can run Javascript commands by the executeScript method. The command to be executed is passed as an argument to the method.Next, we have to return the values from the Javascript command with the return keyword. We have to take the ... Read More

How to record a video in Selenium webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Nov-2020 13:54:20

1K+ Views

We can record a video with Selenium. There is no default technique in Selenium to record videos. The videos can be captured in the below processes−ATUTestRecorder.jar and ATUReporter_Selenium_testNG.jar files need to be downloaded and saved within the project folder.Next, add the above two jars to the project Build path. Right-click ... Read More

How to select the Date Picker In Selenium WebDriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Nov-2020 13:52:45

7K+ Views

We can select the date picker in Selenium. It is slightly difficult to handle calendar controls as the day, month and year selection can be represented via different UI.Sometimes they are represented by the dropdown or by forward and backward controls. Let us select the date picker as shown below.From ... Read More

How do you focus on new windows with selenium ide?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Nov-2020 13:49:53

680 Views

We can focus on new windows with Selenium IDE. On clicking a link, a new tab or a window opens. After accessing the new window, we can close it and shift to the parent window.Click on a link with the below step. Visit site is the name of the link ... Read More

Best practice to wait for a change with Selenium Webdriver?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 28-Nov-2020 13:48:19

4K+ Views

The best practice to wait for a change in Selenium is to use the synchronization concept. The implicit and explicit waits can be used to handle a wait. The implicit is a global wait applied to every element on the page.The default value of implicit wait is 0. Also it ... Read More

Advertisements