Debomita Bhattacharjee

Debomita Bhattacharjee

590 Articles Published

Articles by Debomita Bhattacharjee

Page 47 of 59

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 707 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

Dynamic Dropdown verification with Cypress

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 2K+ Views

There are numerous types of dropdowns on the webpage. The types of dropdowns are static and dynamic. While the static dropdowns have with the tag, the dynamic dropdowns generally have the or tags.The static dropdowns having the tag is handled in Cypress with the help of the in built command called the select(). The dynamic dropdowns are mostly the auto suggestive dropdown where on typing the first few letters of our search, a list of suggested items get displayed.The logic is to type a few characters inside the dynamic dropdown. Based on that a list of ...

Read More

Get and Find commands in Cypress

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 2K+ Views

Cypress has the get() and find() methods to find elements based on locators on the page. The objective achieved by these two methods are almost identical. The get() method fetches one or a list of web elements with the help of the css locators specified as a parameter to that method.Syntaxcy.get(selector, args)The second parameter of the get() method is optional. There can be of three types of parameter as listed below −log − The default value of log parameter is true. This determines if there will be logging of the command on the console.cy.get('.product', { log: false });withinSubject − The ...

Read More

Handling with only visible elements in Cypress

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 1K+ Views

After a test case is run on Cypress, we need to debug and understand the logs in case of a failure. Cypress has the feature to provide information to the user on what incident took place before and after the failure had happened.The above screenshots show a full log of the test cases executed with pass/ fail results. If we investigate more into the step by clicking on it, the element on which an action has been performed gets highlighted with a red circle. For example the type command in the screenshot.On further investigation we found out that we have ...

Read More

What is Cypress for Test Automation?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 05-Aug-2020 2K+ Views

Cypress is the future tool for testing front end modern web applications. It aims to overcome the hurdles that the engineers and developers face while testing web applications based on React and AngularJS. It is a quick, effortless and dependable tool for testing any applications that run on browsers.Cypress is commonly compared with Selenium. But there are a lot of differences between Cypress and Selenium in terms of architecture and foundation. Cypress is targeted for the purposes listed below −Unit TestingIntegration TestingEnd to End flow TestingThus Cypress is used to test a wide range of applications that are operational in ...

Read More

How to skip a selected test from execution in pytest?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 572 Views

We can skip a selected test from execution in pytest. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest –version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts with test_ or ends with _test keyword and every line of code should be ...

Read More

How to run a test method without reporting as passed or failed in pytest?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 461 Views

We can run a test method without reporting as passed or failed in pytest. This test method is generally used as a prerequisite. Pytest is a test framework in python. To install pytest, we need to use the command pip install pytest. After installation, we can verify if python has been installed by the command pytest – version. The version of pytest shall be known.Pytest can be used for creating and executing test cases. It can be used in wide range testing API, UI, database and so on. The test file of pytest has a naming convention that it starts ...

Read More
Showing 461–470 of 590 articles
« Prev 1 45 46 47 48 49 59 Next »
Advertisements