There appears to be an issue with generating an HTML report using nosetests in Python as the option `--html--

Hi there, I'm having some trouble with my Selenium Python regression test script. My HTMLTestRunner isn't working as expected for generating the test report, so I decided to give the Nose plugin a try instead.

I've gone ahead and installed Nose, as well as the necessary package using pip: 'nose-html-reporting'.

Here's the command I attempted to run in Windows cmd in order to execute my test script and create the report:

nosetests.exe e:\test_runners\selenium_regression_test\ClearCore\Regression TestCase\RegressionProject_TestCase2.py --with-html --html-report=nose_report.html

Unfortunately, I received the following error message:

nosestests: error: no such option: --html-report

Could someone provide me with a sample command that I could use to successfully run my test script and generate the desired html report?

Update: I managed to get it working by using the following command:

nosetests.exe e:\test_runners\selenium_regression_test\ClearCore\Regression TestCase\RegressionProject_TestCase2.py --with-html --html-file=e:\report.html

Additionally, I'm interested in integrating this command into my test script, perhaps in the Main part. Is it possible to achieve this so that I can conveniently run it within the PyCharm IDE? Also, I'd like to include a date in the report file name. It would be beneficial to have a timestamp in the filename when running tests overnight. Any suggestions on how to go about this?

if __name__ == '__main__':

Thank you for your help! - Riaz

Answer №1

Looks like the nose-html-reporting tool has not been set up yet.

run this command: pip install nose-html-reporting

To confirm, use the following command to see the list of installed plugins.

execute nosetests --plugins

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Issue with clicking button using Selenium in Python

Greetings and well wishes to all! I have encountered a common issue and despite trying various solutions such as "wait/explicitly wait/wait until clickable etc", I have not been successful. Therefore, I am seeking a tailored solution for this particular p ...

Is it Possible to Find Multiple Values with Selenium's find_elements Method?

Having the following line in python: driver.find_elements(by=By.TAG_NAME, value='a') Is there a way to modify this line to include additional values like b, c, d, etc...? I attempted this approach but it was unsuccessful: driver.find_elements(b ...

Selenium GUI tests are not showing up when running in Jenkins on a Windows 7 machine

I am encountering an issue where when I run my Selenium test (mvn test) from Jenkins on a Windows system, I can only see the console output and not the actual browsers being opened. Is there a way to configure Jenkins so that I can view the browsers runn ...

Capture the content of a local webpage using Selenium and PhantomJS

Currently, I am utilizing Selenium with PhantomJS as the WebDriver to display webpages using Python. The webpages are located on my local drive and I am in need of capturing screenshots of them. However, at the moment, all the pages appear completely black ...

Unable to navigate between windows in Webdriver using C# and CSharp

I'm facing an issue with switching windows using the latest version of Selenium WebDriver in C#. The scenario is that I have a base window, and upon clicking a button, it opens a new window. Here is the code snippet for opening the new window: wind ...

Is it possible to invoke a Python local function from an HTML document?

After creating a Python file with multiple functions, I am now working on designing a web page where I aim to trigger one of the functions mentioned earlier by clicking a button. However, I am unsure about how to go about this process. Is there anyone who ...

Guide on setting an attribute value with JavaScriptExecutor in Selenium WebDriver

I am attempting to set an attribute value for all instances of the same type of <img> tag on My website, for example: <img src="images/temp/advertisement.png"> and I want to set style="display: none" so that I can hide them. I have tried the ...

Challenges often arise with Selenium, particularly when it comes to improving its optimization

Hey guys, I'm facing an efficiency issue with my code I am trying to extract specific data from a webpage containing land properties and apartments for analysis. However, my code is running extremely slow. Could you please help me out? PS: I am new ...

Problem encountered while trying to click on a hyperlink using Selenium Webdriver

I am experiencing difficulties when attempting to click on a hyperlink using Selenium Web-driver. I have tried both Selector and xPath methods, but unfortunately, neither seem to be effective. My goal is simply to click on the hyperlink. <a href="Jav ...

How do I input text into a Google Doc using an XPATH or element that is difficult to manipulate?

I'm currently working on a Python code that is designed to automatically open a Google Doc and input a specific set of combinations for a predetermined length. While I've successfully created the code to navigate to my Google Docs and open a new ...

Scrape the web using Python to automatically click the "load more" button until it no longer appears, collecting all tables and saving them in a CSV file

I am interested in downloading all tables from a specific website that lists all doctors in Paris. The website link is provided here: . To access all the names, it requires clicking on the "afficher plus de résultats" button multiple times until all resul ...

Protractor Throws Element Visibility Issue

When attempting to check a checkbox in the UI, I encounter an "ElementNotVisibleError: element not visible" error. Strangely, I am able to successfully capture and click the checkbox using the console in Chrome developer tools. Has anyone else experience ...

Is there a way to retrieve the parent id from HTML code when using Selenium WebDriver with Java?

Is it possible to retrieve the parent ID in the provided HTML code using the class name "description"? All div elements have a common class name of "card-box" and their IDs are generated during runtime. <div id="2321-79" class="card-box"></div> ...

Jenkins encountered a critical error: FATAL - The build script located at C:selenium tests for moveonmoveon4tests1uild.xml could not be found

My current setup involves using Jenkins and Ant to execute my selenium tests successfully on my local machine. However, I recently encountered an issue when trying to run the tests on a Jenkins server located in a different location. The problem arose be ...

Searching for the perfect way to choose 'mat-checkbox' using the selenium webdriver?

There are 4 checkboxes that I need to select using Angular code and Selenium for automation. Please refer to the provided code for assistance. I specifically need to select the checkbox labeled "Main st & 19th St". View image description here ...

iOS users can now enjoy the convenience of horizontal swiping

I am having trouble swiping through radio buttons on iOS devices. I attempted to slide horizontally using the code snippet below, but it only scrolled vertically within the "Account 1" section of the image. https://i.stack.imgur.com/CBwWq.png new TouchAc ...

Effectively managing multiple browser windows in Selenium with Java

I'm seeking help to tackle the issue of window handling in Selenium WebDriver using Java. In my application, there are 3 or 4 windows. While I managed to open 2 windows successfully with the code below, I encounter a problem when trying to execute th ...

Checking off all the boxes on the registration form

I am encountering an issue while attempting to select all check-boxes on the registration form. The error message displayed is org.openqa.selenium.NoSuchElementException. Below is the code snippet that I have tested: public class SelectCheckboxes { ...

Failed to initiate Selenium session

I'm facing an issue while testing the source code of selenium/tests.py from CS50 Web. When I run it, I get a message indicating that my chromedriver is more updated than required. What should I do in this situation? The current version of chromedriver ...

Python is struggling to scrape dynamically loaded elements from a webpage

Currently facing an issue with scraping a specific webpage. The link to the page is provided here. Within this webpage, there is a crucial Cross Reference section that I am trying to scrape. However, when attempting to collect the content using Python requ ...