Selenium Articles

Page 35 of 37

Test if element is present using Selenium WebDriver?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Aug-2020 4K+ Views

We can verify if an element is present using Selenium. This can be determined with the help of findElements() method. It returns the list of elements matching the locator we passed as an argument to that method.In case there is no matching element, an empty list [having size = 0] will be returned. We are not using the findElement() method since if there is no matching element, this method gives NoSuchElementException.In an event of any exception, we have to handle it with a try catch block.ExampleCode Implementation.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; import java.util.List; public class ...

Read More

How to take partial screenshot (frame) with Selenium WebDriver?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Aug-2020 715 Views

Whenever we encounter a failure during testing, it is a common nature to capture the screenshots wherever there is a deviation from the expected result. Thus it is considered a mandatory step to attach a screenshot for creating a bug.While automating a bunch of test cases of a considerable number, capturing screenshot is critical to infer why a test case has failed for both the development and testing team. As they debug the failures, going through the screenshot and conclude if the failure is due to script issue or defect in the application.Sometimes we may need to capture the screenshot ...

Read More

Can selenium handle Windows based pop up?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Aug-2020 4K+ Views

Selenium can handle Windows based pop up. There may be scenarios where a web page opens more than one window after performing some actions on it. The child windows that get opened may be a pop up containing some information or advertisement.Selenium uses the getWindowHandles () and getWindowHandle () methods to work with child windows. The getWindowHandles () method contains all the window handle ids of the opened windows. The window id handles are held in the form of Set data structure [containing data type as String].The getWindowHandle () method is used to store the window handle id of the ...

Read More

Difference between selenium IDE, RC & WebDriver.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Aug-2020 5K+ Views

The differences between selenium IDE, RC & Webdriver are listed below :FunctionalitiesSelenium IDESelenium RCSelenium WebdriverRecord and playbackIt has the record and playback feature.It does not have a record and playback.It does not have a record and playback.ServerIt requires no server to start execution of test cases.It requires the server to start execution of test cases.It requires no server to start execution of test cases.BrowserIt can be used for testing only in Firefox.It can be used for testing in the majority of browsers.It can be used for testing in the majority of browsers including in headless mode.Object OrientedIt is based on ...

Read More

What are different selenium versions?

Adiya Dua
Adiya Dua
Updated on 06-Jul-2020 2K+ Views

Selenium 1 or known as RC (Remote Control) and Web Driver differ in many aspects but the key difference comes in the implementation layer or in simple words the architecture of both of them.As name suggest, RC is a Remote Control which works by taking the remote of the browser and then injects the automation code to be tested by injecting the custom scripts written.The Web Driver (known as Selenium 2) works on the browser directly and uses browsers in-built features to trigger the automation test written by tester. Web driver is the successor of Remote Control.The architecture of Selenium ...

Read More

What is the difference between selenium and automation?

Adiya Dua
Adiya Dua
Updated on 02-Jul-2020 2K+ Views

Automation − It is the technique to run the test cases without human intervention. If we are sticking to the IT industry, Automation is not just confined to Automation of test scripts. Automation is the basic control system in which human intervention is expected the least. Various many tasks such as Data Migration, Decision making for AI, deploying the code automatically in the latest builds for testing etc.Goals −The ultimate goal of Automation is to re-run the regression flows without intervention of manual tester. Initializing some amount of human effort is required to design the scripts. But the end result ...

Read More

What is Maven in selenium?

Adiya Dua
Adiya Dua
Updated on 02-Jul-2020 3K+ Views

Maven is Yiddish Word which means Accumulator of Knowledge. Maven is a tool which is used for building and managing Java Based Projects. Basically to put it in simple words is a way to manage dependency for Java Based Project. Maven can be used when building project with POM (Page Object Model) when working on big projects.Below are the objectives which can be achieved with maven −Easier and Uniform build process.Providing quality project informationEasy DocmentationBest practices developmentManage the dependenciesLets understand them one by oneEasier and Unfirom Build Process −Maven provides pom.xml configuration files where all information such as construction directory, ...

Read More

Which is the selenium latest version?

Adiya Dua
Adiya Dua
Updated on 02-Jul-2020 527 Views

Selenium started with version 1 and now version 3 is the currently the latest released version available in the market. Let’s has a comparative study of the different features of each of the version.Selenium 1 or RC: As name suggest, RC is a Remote Control which works by taking the remote of the browser and then injects the automation code to be tested by injecting the custom scripts written.Selenium 2 or Web driver: The Web Driver (known as Selenium 2) works on the browser directly and uses browsers in-built features to trigger the automation test written by tester. Web driver ...

Read More

How does selenium interact with the Web browser?

Adiya Dua
Adiya Dua
Updated on 01-Jul-2020 3K+ Views

Selenium is an open source framework used for automation of web applications. Apart from this, it can also work on various administrative tasks such as monitoring of websites.There are 4 flavors of Selenium −Selenium-IDE.Selenium-RC.Selenium Grid.Selenium Web Driver.Let’s have a look at the uses of each of them −Selenium IDE − It is the Integrated Development Environment which has easy to use interface used for building and running Selenium Test Cases. It is a prototyping tool for building test scripts in a way that it records the user actions as they are performed. The recorded actions are stored as a script ...

Read More

Selenium WebDriver- Revisiting Important Features

Sharon Christine
Sharon Christine
Updated on 17-Jan-2020 305 Views

It’s been more than a decade since Selenium automation tool is here to automate our testing needs. As a free to use tool with dedicated community, it has lot of features to make our automation testing more reliable and comfortable. Seeing the growing popularity of Selenium webdriver, let’s revisit some of the important features of it, which proves why Selenium webdriver still stand out in the crowd.Key Features – Selenium WebDriverCompatibility with Many Web BrowsersSelenium WebDriver supports wide range of web browsers available in the market such as Firefox, Chrome, Internet Explorer, Opera, Safari and many more. Unless the other ...

Read More
Showing 341–350 of 362 articles
Advertisements