Debomita Bhattacharjee

Debomita Bhattacharjee

590 Articles Published

Articles by Debomita Bhattacharjee

Page 39 of 59

How to verify specific text exists within an attribute in Selenium IDE?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Nov-2020 2K+ Views

We can verify specific text exists with an attribute in Selenium IDE. This can be done using the assert and verify commands −assert element present − Verifies if the element exists on the page. If assertion fails, the test terminates. It has the element locator as an argument.For example −assert element not present − Verifies if the element does not exist on the page. If assertion fails, the test terminates. It has the element locator as an argument.verify element present − Verifies if the element exists on the page. It has the element locator as an argument.verify element not present ...

Read More

How to select value from a drop down using Selenium IDE?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Nov-2020 3K+ Views

We can select value from a dropdown using Selenium IDE. The select command is used for this purpose. First of all, Selenium IDE add-on should be installed in Firefox.Launch Firefox and select the Tools menu. Then choose Selenium IDE.Selenium IDE window shall open. Choose the first row inside the test script edit box.Enter select in Command field. To identify the dropdown with the id locator, enter the Target field. The value/index of the option to be selected is to be entered inside the Value field.Once done, click on the Run option.

Read More

The Architecture of Selenium WebDriver.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Nov-2020 868 Views

The architecture of Selenium webdriver are illustrated below −Image source:https://www.tutorialspoint.com/what−is−web−driver−in−seleniumSelenium webdriver has the following units −Selenium Binding Languages − Selenium can work on various libraries like Java, Python, Ruby, and so on. It has the language bindings for more than one language.JSON Wire Protocol − JSON is Javascript Object Notion. It is used for transferring data from the server to the client on the web page. It is based on the Rest API that transmits information among HTTP servers.Browser Driver − All the browsers have a specific browser driver. They interact with the browsers (hiding the logic of browser functionality). ...

Read More

How do I download Selenium RC?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Nov-2020 896 Views

We can download Selenium RC by downloading the Java jar file − selenium−server−standalone.jar. We have to download and extract the zip file to do the actual installation.Using the Java Client Driver, the installation can be done by the below steps −To run the Selenium RC server, Java should be installed properly and the path of the environment variable correctly set. To check if Java is installed run the command −java −versionNavigate to the link: https://www.selenium.dev/downloads/ and download the Selenium java client driver zip file.Then the selenium−java jar file is to be extracted.Open an IDE say, Eclipse.Create a Java project.Associate the ...

Read More

How do I change focus to a new popup tab in Selenium?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Oct-2020 4K+ Views

We can change focus to a new popup tab with Selenium webdriver. The getWindowHandles and getWindowHandle methods are available to handle new popup tabs. The getWindowHandles method stores all the currently opened window handles in Set data structure.The getWindowHandle method stores the window handle of the opened browser in focus. The iterator method is used to iterate over all the window handle ids. We have to add import java.util.Set to accommodate Set and import java.util.List and import java.util.Iterator statements to accommodate the iterator in our code.Selenium driver object can access the elements of the parent window. In order to switch ...

Read More

How to wait until an element no longer exists in Selenium?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Oct-2020 8K+ Views

We can wait until an element no longer exists in Selenium webdriver. This can be achieved with synchronization in Selenium. We shall add an explicit wait criteria where we shall stop or wait till the element no longer exists.Timeout exception is thrown once the explicit wait time has elapsed and the expected behavior of the element is still not available on the page. To check if an element no longer exists on the page, we can take the help of the expected condition invisibilityOfElementLocated.To implement explicit wait conditions, we have to take help of the WebDriverWait and ExpectedCondition class.ExampleCode Implementation.import ...

Read More

Selenium Web Test Automation Framework Best Practices.

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Oct-2020 480 Views

The best practices for Selenium web test automation framework are listed below −Use of dynamic waits like implicit wait and explicit wait instead of using Thread.sleep in the framework to handle sync issues in the application.Usage of Page Object Model framework design to segregate the test scripts from the locators. In case of changes in the webelement properties, test scripts need not be modified only the locators undergo change.Usage of Behavior Driven Development framework. This allows the participation of all members in the agile team to participate in product development.Encourage testing to start from very early phases and in regular ...

Read More

How do you click on an element which is hidden using Selenium WebDriver?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Oct-2020 10K+ Views

We can click on an element which is hidden with Selenium webdriver. The hidden elements are the ones which are present in the DOM but not visible on the page. Mostly the hidden elements are defined by the CSS property style="display:none;". In case an element is a part of the form tag, it can be hidden by setting the attribute type to the value hidden.Selenium by default cannot handle hidden elements and throws ElementNotVisibleException while working with them. Javascript Executor is used to handle hidden elements on the page. Selenium runs the Javascript commands with the executeScript method. The commands ...

Read More

How to navigate back to current page from Frame in selenium webdriver?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Oct-2020 2K+ Views

We can navigate back to the current page from frame with Selenium webdriver. A frame is defined with , or tag in html code. A frame is used to embed an HTML document within another HTML document.Selenium by default has access to the main browser driver. In order to access a frame element, the driver focus has to shift from the main browser window to the frame. To again focus back to the current page from frame, the method switchTo().defaultContent() is used.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; public class SwitchBackFrame{    public static ...

Read More

How to use regex in selenium locators?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 26-Oct-2020 8K+ Views

We can use regex in locators in Selenium webdriver. This can be achieved while we identify elements with the help of xpath or css locator. Let us have a look at the class of an element in its html code. The class attribute value is gsc-input.Here, with the css expression, we can use the * and perform a partial match with the class attribute value. The css value shall be input[class*='input']. This means the subtext input is present in the actual text gsc-input. We can also use the ^ and perform a match with the class. The css value shall ...

Read More
Showing 381–390 of 590 articles
« Prev 1 37 38 39 40 41 59 Next »
Advertisements