Debomita Bhattacharjee has Published 863 Articles

Selenium and Python to find elements and text?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:15:25

732 Views

We can find elements and its text with Selenium webdriver. First of all we have to identify the element with the help of any of the locators like id, classname, css and so on. Then to obtain the text we have to take the help of the text method.Syntaxs = ... Read More

How can I close a specific window using Selenium WebDriver with Java?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:13:15

2K+ Views

We can close a specific window with Selenium webdriver. The getWindowHandles and getWindowHandle methods can be used to handle child windows. The getWindowHandles method is used to store all the opened window handles in the Set data structure.The getWindowHandle method is used to store the window handle of the browser ... Read More

How do I select elements inside an iframe with Xpath?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:10:52

12K+ Views

We can select elements inside an iframe with xpath in 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. Let us see the html code of a frame.Selenium by default has ... Read More

How to set “value” to input web element using selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:08:32

15K+ Views

We can set value to input webelement using Selenium webdriver. We can take the help of the sendKeys method to enter text to the input field. The value to be entered is passed as an argument to the method.Syntaxdriver.findElement(By.id("txtSearchText")).sendKeys("Selenium");We can also perform web operations like entering text to the edit ... Read More

How to set style display of an html element in a selenium test?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:05:29

3K+ Views

We can set the style display of an html element with Selenium webdriver. The DOM interacts with the elements on the page with the help of Javascript. Selenium executes the Javascript commands by taking the help of the executeScript method. The commands to be executed are passed as arguments to ... Read More

How to get HTML code of a WebElement in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:03:40

4K+ Views

We can get the html code of a webelement with the help of Selenium webdriver. We can obtain the innerHTML attribute to get the HTML content of the web element.The innerHTML is an attribute of a webelement which is equal to the content that is present between the starting and ... Read More

Selenium WebDriver StaleElementReferenceException.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 07:01:51

833 Views

We have StaleElementReferenceException in Selenium webdriver. As the name suggests, the word stale refers to something which is not new and perished. There may be a scenario in which an element which was present in DOM previously is now no longer available due to modification in DOM.In such a condition, ... Read More

Selenium WebDriver and DropDown Boxes.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 06:59:59

558 Views

We can handle dropdown with Selenium webdriver. The static dropdown in Selenium is handled with the Select class and the dropdown should be identified in the html code with the tag.Let us see the html code of a static dropdown.We have to add the import org.openqa.selenium.support.ui.Select statement in the code ... Read More

Selenium and iframe in html.

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 06:58:02

496 Views

We can work with iframe in 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 parent browser driver. In order to access a frame element, ... Read More

How to locate element by partial id match in Selenium?

Debomita Bhattacharjee

Debomita Bhattacharjee

Updated on 26-Oct-2020 06:56:06

10K+ Views

We can locate elements by partial id match with Selenium webdriver. This can be achieved while we identify elements with the help of xpath or css locator. With the css and xpath expression, we use the regular expression to match id partially.Let us have a look at the id of ... Read More

Advertisements