Selenium Web Driver Articles

Page 5 of 13

How to get all the values in a worksheet in Selenium with python?

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

We can get all the values in a worksheet in Selenium. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous types of values and they are the main ...

Read More

How to get the maximum number of occupied rows and columns in a worksheet in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 7K+ Views

We can get the maximum number of occupied rows and columns in a worksheet in Selenium. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous types of values ...

Read More

How to get the value in a particular cell inside the worksheet in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 3K+ Views

We can get the value in a particular cell inside the worksheet in Selenium. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous types of values and they ...

Read More

How to get the active sheet in a workbook in Selenium with python?

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

We can get the active sheet in a workbook in Selenium. Excel is a spreadsheet which is saved with the .xlsx extension. An excel workbook has multiple sheets and each sheet consists of rows and columns.Out of all the worksheets, while we are accessing a particular sheet that is called as an active sheet. Each cell inside a sheet has a unique address which is a combination of row and column numbers.The column number starts from alphabetic character A and row number starts from the number 1. A cell can contain numerous types of values and they are the main ...

Read More

How to configure handling and formatting of log file in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 2K+ Views

A log configuration consists of formatter and FileHandler methods. We need to import a logging package and then create an object which will be responsible for entire logging.If we add the parameter _name_ inside the getLogger() method, we shall be able to add the test case name for which we want to create the log file. If this parameter is omitted in the argument, by default it prints root in the log file.Syntaxlogger = logging.getLogger(_name_)The different types of logger level are listed below. We can add all, some or at least one logger in our test case.logger.debug("Debug log")logger.info("Information log")logger.warning("Warning log")logger.error("Error ...

Read More

What is the importance of logging in Selenium with python?

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

While building our test cases in Selenium, we need to implement a logging feature in our framework. It is essential for monitoring the flow of the program and then include other edge scenarios which we might have missed.The logs can give more information whenever there are errors than stack trace by logging the prior test step execution status and details. Thus debugging becomes easy and quick. Most logs are maintained in separate files which can be shared with other non- technical team members for analyzing a root cause for a failure.There are six logging levels with each level assigned an ...

Read More

How to count the number of occurrences of a particular text inside a table in a page in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 2K+ Views

We can count the number of occurrences of a particular text inside a table in Selenium. First of all we need to locate the element by xpath. In xpath, we have a particular text() function that identifies elements based on the visible text on the screen.Then we have to use find_elements method to get the list of matching elements having the text we are looking for on the page. Finally we need to get the size of that list with the help of the len function of the list.This will give the number of occurrences of a particular text inside ...

Read More

How to get all the values including the headers inside a table in a page in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 11K+ Views

We can get all the values inside a table in Selenium with the help of find_elements method. The rows of a table are represented by tag in html code. To get all the rows, we shall use the locator xpath and then use find_elements_by_xpath method. The list of rows will be returned. Next we need to compute the size of the list with the help of len method.Syntaxdriver.find_elements_by_xpath("//table/tbody/tr")Once we get all the rows, we now have to compute the number of columns.The headers of a table are represented by tag in html and always in the first row ...

Read More

What are assertions available to test relational comparisons in Selenium with python?

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

There are numerous assertions available to test relational comparisons in Selenium. They are listed below −assertGreater – This assertion has two parameters. A comparison is done between the first and second parameter. In case the first parameter is greater than the second one, the test case is considered a pass; else the test case is failed.The third parameter of assertGreater is an optional one. It is mostly used for informational purposes for result analysis.SyntaxassertGreater(3, 2)assertGreaterEqual – This assertion has two parameters. A comparison is done between the first and second parameter. In case the first parameter is greater than equal ...

Read More

What are assertions in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 29-Jul-2020 8K+ Views

There are assertions in Selenium which are verification or checkpoints for the test case. In the absence of an assertion, there is no option of determining if a test case has failed or not.Sometimes, we may use the conditional statements like if – else and so on and then print the result of pass/ fail in the console. But that can only solve the problem of checking logs and not for actual reporting.Thus assertion is used for generating test execution reports. In case, our test case passes all the test steps, the assertions do not impact the test cases in ...

Read More
Showing 41–50 of 130 articles
« Prev 1 3 4 5 6 7 13 Next »
Advertisements