Raghav excellent and in detailed information's. Thank you for sharing your knowledge. Better than paid courses. keep sharing and helping us. are 41 videos enough for building framework or your advance training will be coming soon.
Good morning sir, thank you for your all very helpful tutorial videos. Next time can you please to fit all scripts on the screen, so we can see them, thank you again.
Thanks for the video; it is really helpful; Can you please let me know how to include the all the detail information about the passed test cases for an example include the all the options in the drop-down list or any println information etc
Hi Alak, whatever you want to add you will have to do mention in the code with test.log command as below extent = new ExtentReports("file-path", true); // creates a toggle for the given test, adds all log events under it ExtentTest test = extent.startTest("My First Test", "Sample description"); // log(LogStatus, details) test.log(LogStatus.INFO, "This step shows usage of log(logStatus, details)"); // report with snapshot String img = test.addScreenCapture("img-path"); test.log(LogStatus.INFO, "Image", "Image example: " + img); // end test extent.endTest(test); // calling flush writes everything to the log file extent.flush();
Hi, Raghav. I believe [word used advisedly because I have a stubborn plugin error] these steps can be done via the adapter, making setup quick and easier than in previous versions
Error: java.lang.IllegalArgumentException: The plugin specification 'com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html' has a problem: Could not load plugin class 'com.cucumber.listener.ExtentCucumberFormatter'. Plugin specifications should have the format of PLUGIN[:[PATH|[URI [OPTIONS]]]
Hi Raghav i am using latest version of extent report 5.0.9 but the syntax statements mentioned in this video is not working .I will try to test in lower version.But can you please make a video on latest changes in extent reporter?Thanks in advance
Hi, Thank you for your free tutorial. Now extent reports moved to version 5 and many methods are deprecated. Do you have any video for the new one. Thank you
Hi Raghav, this is very nice video as your other videos.I've one query that what is the difference between relevant code extent report and avenstack extent report? For both, implemntation is different. Csn you please clarify and suggest which one is good to go with?
Hi Meenal if I goto maven repository and search for extent reports i get the one from aventstack. Also on the website of extent its from aventstack, Maybe relevant is some older version or earlier name. Not completely sure.
Nice video, but I have two questions: 1: I have several tests in my suite, do I have to insert the lines extentReports.createTest(...) and extentTest.log(Status...) for every one of them? 2: What's the meaning of extentTest.log(Status.FAIL)? Why would I expect a test to fail? I mean, let's say if I have 100 tests I expect that all of them should pass
Hi Felipe, 1. Yes you need to start a test for extentReports, so that it starts capturing the results 2. This is done usually in Exception block or in the Listener block. We can use this along with iTestListener of TestNg
@@RaghavPal Thank you for the details session. have you added a session for the detailed tutorial on Allure report using testNG and selenium? if yes, please share the Link. thank you
Hi Abdul, extent is java library so we cannot use it for python, You can check options here stackoverflow.com/questions/10218679/seleniumpython-reporting
Hi raghav sir, i tried adding maven dependancies in my file, i am getting an atrifact descriptor exception error , please let me know how to resolve it. All your previous videos are fabulous by the way. Thanks and regards anand yashwanth.
Hi Anand, did you try clean and refresh project. Check here - stackoverflow.com/questions/39845810/artifactdescriptorexception-failed-to-read-artifact-descriptor/39869435
Hi Chandan, look at this way. there will always be need to people with automation skills irrespective of the tools used. In Katalon Studio as well when you need to do any custom action we need to script for it. As long as you are ready to learn and enhance your skills w.r.t job market and time, there should be no problem
Hi Raghav, After running the Test,unable to click the Google search button even though locator is mentioned correct as per the VEDIO and checked from my side. Exception coming "element not interactable".
@@nainsikumari6272 The reason is because when you enter your search text, google expand a dropdown list with some sites you may go to and searchButton is not enabled. Please after sendKeys method use sendKeys(Keys.RETURN) or ...(Keys.ENTER) but without cklicking on searchButton.
Ajay To prepare for an interview with 13 years of experience (4 years in automation and 9 years in manual testing): Review manual testing concepts, tools, and methodologies Brush up on automation concepts, frameworks, and tools Prepare examples of your work, successes, and challenges Review your resume and practice answering behavioral questions using the STAR method Show enthusiasm and interest in the company and position -
Raghav, can you please speak how to create a generic method for the report so that it can be call in every test case and based on the result (pass/fail) it create entry in the report. Actually, i am trying to create but facing so many issues. It would be great in you can help in this
Hi Raghav. Thanks for the video. I have a question asked in interview- what are the parameters to (or how do you) decide which framework you want to design whether it is POM, Datadriven, cucumber?
Hi Ankit, it will depend on the needs and scenario. example: If the team using the framework is comfortable in adding new scripts for new test cases, then a DataDriven framework is the best. If the team using the framework needs option to create all tests using keywords in external files like excel then keyword or hybrid framework is the option. POM is the test design technique to store objects and test scripts separately BDD or Cucumber framework will be useful if the organizationis BDD ready. Actually most of org today implement BDD framework without understanding the real need for it. I will create a video soon to cover this.
Hello Raghav, (a.k.a. The Test Automation Angel.) I am getting this error message: "The type ExtentHtmlReporter is deprecated") in ExtentReports version 4. Should I use ExtentSparkReporter as an alternative or ExtentLoggerReporter? These are the options that I have discovered. However, (1.) When I replace ExtenthtmlReporter with these other Extent___Reporters, the dashboard does not display as many features. (2.) Also, The Html file outputs as index.html and dashboard.html . Thanks so much for all that you do!!
Hi Raghav, I am getting warning that ExtentHtmlReporter is depreciated. Should i suppress the warnings and go with extenthtml reporter or do you know if we can use the extendSparkreporter and follow the video?
Thank you, I don't use maven but the same class as you, I got the error: Caused by: java.lang.ClassNotFoundException: freemarker.template.TemplateModelException should t add freemarker jar ? and which version? what about dependancy
Hi, if you are not using Maven or similar thing, you will have to download and use all the libraries manually, That can be a tricky task, Not sure what lib exactly will help here, you can try the one you have mentioned
Hi Raghav, nice session. When am practicing am unable to find the attachReporter() method. Receiving an error. I tried with Highest & Lowest Extent pom maven dependencies but no luck. Please suggest.
@@RaghavPal Hi Raghav, thanks for your response, my issue is am unable to import attachReporter() method. not sure how to check version of extent reports. kindly help me and please suggest the correct POM versions to resolves this issue.
Hi Raghav Sir...I m using extent report latest version "4.1.6" ...when I use the ExtentHtmlReporter in my extentdemoclass than it will auto cut "ExtentHtmlReporter" and "import com.aventstack.extentreports.reporter.ExtentHtmlReporter;" option. So, I started using the older version "4.1.2" of extent report but now after running the extentdemoclass I m only getting "Test" option in the dashboard of extentreport.html and "Steps" option is MISSING from dashboard. Is this due to latest version range of Extent Report?
Hi sir... How can i add logs in extent report.. With the framework including POM.. ? I used listener class... But I am not getting any logs in report ...
Hi Raghav , I am trying to add extent report to my project for api automation framework cucumber but getting avent stack plugin error...any solution is much appreciated
Raghav, while doing handson on extent reports, i cant able to import "import com.aventstack.extentreports.reporter.ExtentHtmlReporter;". I have added the dependencies too in maven project. What would be the mistake ?
Hello, How can I generate report for more then 1 test case? For example under 1 class, I have 10 test cases, how can I create unique extent test report for all of them? Thanks in advanced.
Hi, You can generate report for any number of test cases, Just need to create a new ExtentTest object for every test e.g. ExtentTest test = extent.createTest("MyFirstTest", "Sample description"); Make sure for the next test use a diff variable like test1 etc else it will get overridden. And then make sure you flush the report after all testa are done. If you are using TestNG, do it as the teardown extent.flush(); extentreports.com/docs/versions/3/java/#basic-example
@@RaghavPal Thanks man, I am using Junit4! Unfortunately I already done that, but from some reason the last test is overriding the others, I will try to find some way how to do it. I am able to generate separate reports, but still not able to generate unique report for all tests. Interesting thing is that I still did not discover tutorial, how to generate extent test report, for more than 1 t.c. All tutorials coverage only 1 t.c. :)
@@RaghavPal I checked and tried on many ways, but always the last overwrite the 1st. I am sending you my codes, can you please tell me where I am making mistake? I also try to write and htmlReporter1 but still notning. @Test public void Yahoo() throws Exception{ // start reporters ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("./Reports/TestIzvestaj.html"); // create ExtentReports and attach reporter(s) ExtentReports extent = new ExtentReports(); extent.attachReporter(htmlReporter); // creates a toggle for the given test, adds all log events under it ExtentTest test = extent.createTest("YAHOO TEST", "YAHOO REPORT"); System.out.println("******************** YAHOO **********************"); // log(Status, details) test.log(Status.INFO, "This step shows usage of log(status, details)"); // info(details) test.info("This step shows usage of info(details)"); extent.flush(); @Test public void Google()throws Exception{ // start reporters ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("./Reports/TestIzvestaj.html"); // create ExtentReports and attach reporter(s) ExtentReports extent = new ExtentReports(); extent.attachReporter(htmlReporter); // creates a toggle for the given test, adds all log events under it ExtentTest test1 = extent.createTest("GOOGLE TEST", " GOOGLE REPORT"); System.out.println("******************** GOOGLE **********************"); // log(Status, details) test1.log(Status.INFO, "This step shows usage of log(status, details)"); // info(details) test1.info("This step shows usage of info(details)"); extent.flush();
Hello Sir I have implemented Rerun functionality in my Cucumber framework. I am able to generate extent report but after rerun ,its latest results are not updated in extent report . is there any way to do so ?
Hi Archana, check if the following helps you: When rerun is performed, clear the Extent Reports object and initialize it again. This will ensure that the latest results are being reported You can use maven-surefire-plugin and configure it to delete the target directory before rerun You can use the after hook to clear the extent report after each run, so that latest run results can be updated You can try to use different reporting plugins like Allure or Cucumber HTML reporter, they might give you the flexibility to update the report You can also try to merge the rerun report with the original report using some library like extentmerger You may also want to check the configurations of Extent Report and Cucumber if they are properly set to handle rerun
Hi Sir, Facing one issue while using extent report in my project. When I ran test scripts in parallel mode, extent report not generating properly. Can you please help me into this or provide some suggestions? Thank you
Hi Ragav, After executing ....am getting below error Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable please guide me!
If I am generating reports using ITestListener and want to integrate logging information in report itself, then do I need to write these log.info lines in between code of my each TC?
Hey Raghav, Can you help me out, how to share the html report with others when screenshot have been appended to the extent report. Usually these images are saved in our local machine, but when you share them with others(stake holders) they cant see that images. I heard that we need to store image in kind of BASE64 format. If am not wrong ? Please do help me. Thanks in Advance.
Hi, yes as you said, you can convert to base64 images. These links will help you. I will also do a session on this when I get some time. stackoverflow.com/questions/43062006/extent-report-not-able-to-see-the-screenshots-on-other-machine stackoverflow.com/questions/42115372/how-do-i-email-an-html-report-as-an-attachment-with-images-embedded
Sir, I am using extent report version 2.14.1. I am giving the below code but the report does not show the test cases in the order in which it was executed.. extent = new ExtentReports(outputDirectory + File.separator + "TestResult_ExtendReport"+System.currentTimeMillis() + ".html", false,DisplayOrder.OLDEST_FIRST); Can you please help
sir i am getting error at attach reporter that is the method attach reporter in extent report is not applicable for arguments(extent html reporter)..plz rply its urgent sir
hi, thanks for the video. How can I make extent report code reusable in a framework and apply to all my test cases. Also I am new to selenium and building a framework from scratch on my own through youtube videos. I am using POM pattern. all the steps are in pom method for any functionality. so How can i give description in my pom class.
Hi Ankita, you can use testng listeners and put your code for reporting in extent in testng listener functions. There is a video on that. I did not get your 2nd query. If you are using POM method, then you just need to keep creating a separate class for each web page and put the locators and functions in that class and use them in test classes.
Thank you Sir for the explanation , actually I have question ,how to expand all test childs in the extent report ? I have used this code but it does not work : htmlReporter.config().setCSS(".node.level-1 ul{ display:none;} .node.level-1.active ul{display:block;}");
When i am trying to do report = new ExtentReports(System.getProperty("user.dir")+"\\ExtentReportResults.html"); i am getting remove argument,if there is no file path given i am not getting any html file Can you please suggest something here
Hi Sir, I tried this and after running the test but I am not able to see the extent report even after refreshing the project multiple times . Kindly advise sir
Hi Wasim, I will plan a session. For now pls check this www.softwaretestingmaterial.com/screenshots-extent-reports/ automationtesting.in/capture-screenshot-in-extent-reports-java/
Hi, Im using extent reports for my framework, but I keep getting Java.lang.AbstractMethodError when I run from my testng xml file. The test doesn't even run and just throws this exception. Can you please help me resolve this issue and why it has occured.
Hi Saquib Here are the steps on how to get a PDF for the Extent Report in Selenium Java: 1. Install the Extent Report library. You can install the Extent Report library from the Maven Central repository. Code snippet com.relevantcodes extentreports 4.1.9 2. Create an ExtentTest object. The ExtentTest object is the root object of the Extent Report. Code snippet ExtentTest test = new ExtentTest("My Test"); 3. Add test steps to the ExtentTest object. The test steps are the individual steps that make up the test. Code snippet test.log(LogStatus.PASS, "This is a pass test step"); test.log(LogStatus.FAIL, "This is a fail test step"); 4. Generate the PDF report. You can generate the PDF report by calling the generateReport() method on the ExtentReports object. Code snippet ExtentReports extentReports = new ExtentReports(); extentReports.attachReporter(new ExtentHtmlReporter("myreport.html")); extentReports.addTest(test); extentReports.generateReport(); This will generate a PDF report called myreport.html. Here are some additional things to keep in mind: * The Extent Report library provides a number of different reporters, including HTML, XML, and PDF. * The PDF reporter can be used to generate a PDF report of the Extent Report. * The PDF report can be opened in any PDF viewer. I hope this helps
hlo sir how can we open a element in next tab? in manual process we right click on element chose a option open link in new tab . for doing this we can open any element in next tab.i want to do this using selenium,tried so many codes that a correct according to websites but still they don't work.can u help in doing this.
@@RaghavPal yes its working but only for when we open a link on new tab.but if u right click on some element and want to open in new window? is it possible sir??
I am trying alot finding answers online pal, but not able to do. currently I need to integrate Extent report to JUNIt project.Can I get help with this?
Hi Ifeoma, Pls check if you have added annotations and Also check for every test you will have to add statement to mark it as test in extent ExtentReports reports = new ExtentReports("Path of directory to store the resultant HTML file", true/false); ExtentTest test = reports.startTest("TestName");
@@RaghavPal So this is my utility package UTILITY CLASS public class ExtentFactory { public static ExtentHtmlReporter reporter; public static com.aventstack.extentreports.ExtentReports extent; private static WebDriver driver; static ExtentTest logger; public static ExtentReports Instance() throws IOException { ExtentReports extent; String Path = "/Users/Desktop/cwjobs/src/main/java/ExtentReport1.html"; extent = new ExtentReports(Path, false); extent.addSystemInfo("Selenium Version", "3.152"); reporter.config().setTheme(Theme.DARK); reporter.config().setChartVisibilityOnOpen(true); reporter.config().setTestViewChartLocation(ChartLocation.BOTTOM); reporter.config().setEncoding("utf-8"); reporter.config().setTimeStampFormat("EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'"); //loading the external xml file (i.e., extent-config.xml) which was placed under the base directory //You could find the xml file below. Create xml file in your project and copy past the code mentioned below extent.loadConfig(new File(System.getProperty("user.dir")+"/extent-config.xml")); return extent; } //This method is to capture the screenshot and return the path of the screenshot. public static String getScreenShot(WebDriver driver, String screenshotName) throws IOException { String dateName = new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()); TakesScreenshot ts = (TakesScreenshot) driver; File source = ts.getScreenshotAs(OutputType.FILE); // after execution, you could see a folder "FailedTestsScreenshots" under src folder String destination = System.getProperty("user.dir") + "/Screenshots/" + screenshotName + dateName + ".png"; File finalDestination = new File(destination); FileUtils.copyFile(source, finalDestination); return destination; } public void takeScreenShot() throws IOException { // To capture a Full page Screenshot fpScreenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver); ImageIO.write(fpScreenshot.getImage(),"PNG",new File("/Users/alisonhawker/Desktop/cwjobs/src/main/java/ExtentReport/ScreenShots.png")); } public static void getResult(ITestResult result) throws IOException { if (result.getStatus() == ITestResult.FAILURE) { logger.log(LogStatus.FAIL, "Test Case Failed is " + result.getName()); logger.log(LogStatus.FAIL, "Test Case Failed is " + result.getThrowable()); //To capture screenshot path and store the path of the screenshot in the string "screenshotPath" //We do pass the path captured by this mehtod in to the extent reports using "logger.addScreenCapture" method. String screenshotPath = ExtentFactory.getScreenShot(driver, result.getName()); //To add it in the extent report logger.log(LogStatus.FAIL, logger.addScreenCapture(screenshotPath)); } else if (result.getStatus() == ITestResult.SKIP) { logger.log(LogStatus.SKIP, "Test Case Skipped is " + result.getName()); } } TEST public class DropDownTest extends BaseTest { String option1 = "Option 1"; String option2 = "Option 2"; // Initialize the HtmlReporter ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("/Users/Desktop/cwjobs/src/main/java/ExtentReportings1.html"); // Initialize ExtentReports and attach the HtmlReporter ExtentReports extent = new ExtentReports(); @Test public void testSelectOptionOne() throws IOException { extent.attachReporter(htmlReporter); // Create a toggle for the given test and add all the Log events under ExtentTest test = extent.createTest("Test Option One", "Test that user can select options from dropdown list"); test.log(Status.INFO, "Click on dropDown"); var dropDownPage = homePage.clickDropDown(); test.pass("Click on the dropDown link"); dropDownPage.selectFromDropDown("Option 1"); test.pass("Select Option One from the dropDown List"); var selectedOptions = dropDownPage.getSelectedOptions(); assertEquals(selectedOptions.size(), 1, "Incorrect number of selections"); test.pass("Correct number of field selected"); assertTrue(selectedOptions.contains(option1), "Option not selected"); test.pass("Correct assertion passed"); extent.flush(); } @Test public void testSelectOptionTwo() throws IOException { extent.attachReporter(htmlReporter); // Create a toggle for the given test and add all the Log events under ExtentTest test = extent.createTest("Select Option Two", "Test user can select option two from dropdown list"); test.log(Status.INFO, "Navigate to homepage and click dropDown"); var dropDownPage = homePage.clickDropDown(); test.pass("Dropdown link"); dropDownPage.selectFromDropDown("Option 2"); test.pass("Option Two selected"); var selectedOptions = dropDownPage.getSelectedOptions(); // Assert that only one option is selected assertEquals(selectedOptions.size(), 1, "Incorrects number of selections"); test.pass("Correct assertion message is displayed"); // Assert that list contains option two and if it fails then error message is displayed assertTrue(selectedOptions.contains(option2), "Option not selected"); test.pass("One option is selected"); extent.flush(); } } And when I run the test, I only get one report instead of two and also am using Junit
hlo sir, i m trying to test failure case in extent reports using if else, but failed to do sir. can u put some video on that if our action like click on some button is true if not click then false ,please use if else statement.and all the code do in single test not in before or after because in after result we can use ITestResult class,but when i do all the code in one test then it will show mismatch ,hope u understand what i m trying to say.
@@RaghavPal can u please make single video sir,from last 5-6 days ,i m stuck on these extent reports issue like fail case ,merge reports etc.so if u can make a single video for these it will be very thankful sir.
Hi Raghav Sir, I am unable to create Extentreport.html.. Getting an error message, element not intractable.. I have added mvn repository in pom file.. extentreport-4.1.5 jar.. Plz help me out.. Thank you I can share you screenshot if you need
Hi Rehan, if you are using java, you can search for java libraries that can do this conversion. For e.g. see this stackoverflow article - www.quora.com/Is-there-any-free-Java-API-for-HTML-with-css-and-images-to-PDF-conversion
@@RaghavPal extant reports look very cool ,but if we fail to join these reports,then there is no profit for creating extant reports,so please help me sir .
As you run your test, you will see some logs running at the bottom, you can also write steps to print on console. Can also check - ruclips.net/video/Tkj_rh0AEgE/видео.html
Hi, cannot say anything without any logs or error details. Pls check all the steps again and try to do the setup again from scratch. Can also refer some online examples
Your videos are so clear and good to understand. I'm so delight to found your videos. Seriously i'm learning automation easily with ur videos
Great to hear that Sairam, Can get all here - automationstepbystep.com/
He is the Rahul Dravid of teaching 👌another masterclass thank you sir
Grateful & humbled Mzamo
Raghav, the way you explain is awesome, thank you so much, Sir.
we need real-time interview questions and answers like scenario-based would be great.
Noted Rustam, will do it
your way of explanation is perfect thanks a lot!!!
You're welcome Ben
What an awesome explanation about the extent report. Thanks a lot for such videos.
You're welcome Nitin
Hi Raghav,
Videos are fantastic, they are so easy to understand.
So happy to know this Yogi
Thank you for sharing these valuable tutorials for all of us.
Thanks for watching
the best tutorial in the whole world !!! the most amazing explanation....
Thanks a lot Jawad, humbled
Your teaching style is awesome.
Thanks a lot Jyoti
I yessss you, your tutorials are on point.
Glad to know
Thank you so much, sir,
You're welcome Zaid. Humbled to see your message
@@RaghavPal Hi sir...I have 10 steps,but the dashboard is showing 0 steps..i google it but couldn't get any concrete answer...can you help?
Thank you so much sir for made this video. This video is very useful sir.
You are most welcome Sakthi
It's a very helpfull video ever . Nice explanation sir
happy to know Sachin
You are literally amazing
Thanks a lot Shivani
Thanks a lot for your awesome tutorial.
You are welcome Abdul
Thank you for your precious time, its really very useful.
Most welcome Heena
Amazing video and ur learning, thanks a lot of u sir🙏🙏
Most welcome
Raghav excellent and in detailed information's. Thank you for sharing your knowledge. Better than paid courses. keep sharing and helping us. are 41 videos enough for building framework or your advance training will be coming soon.
Thanks for your message Abdul. This is enough to get started and it will great a strong base from where you can add more features as needed.
Thanks a lot for your awesome content
So nice of you Aditi
Good morning sir, thank you for your all very helpful tutorial videos. Next time can you please to fit all scripts on the screen, so we can see them, thank you again.
Noted, I will try my best
Great videos, your simple and easy way of explaining is commendeble.Topic wise video segregation helps a lot. Please keep on helping us ..
Most welcome Arpita
@@RaghavPal Cracked an offer for movement inside my organization through your videos
so happy to know Arpita
Thanks for the video; it is really helpful; Can you please let me know how to include the all the detail information about the passed test cases for an example include the all the options in the drop-down list or any println information etc
Hi Alak, whatever you want to add you will have to do mention in the code with test.log command as below
extent = new ExtentReports("file-path", true);
// creates a toggle for the given test, adds all log events under it
ExtentTest test = extent.startTest("My First Test", "Sample description");
// log(LogStatus, details)
test.log(LogStatus.INFO, "This step shows usage of log(logStatus, details)");
// report with snapshot
String img = test.addScreenCapture("img-path");
test.log(LogStatus.INFO, "Image", "Image example: " + img);
// end test
extent.endTest(test);
// calling flush writes everything to the log file
extent.flush();
what a explanation sir nice 👌👌👌👌👌👌
Thanks and welcome
Thank u for posting
My pleasure!
Hi, Raghav. I believe [word used advisedly because I have a stubborn plugin error] these steps can be done via the adapter, making setup quick and easier than in previous versions
Error: java.lang.IllegalArgumentException: The plugin specification 'com.cucumber.listener.ExtentCucumberFormatter:target/cucumber-reports/report.html' has a problem:
Could not load plugin class 'com.cucumber.listener.ExtentCucumberFormatter'.
Plugin specifications should have the format of PLUGIN[:[PATH|[URI [OPTIONS]]]
I will check on this and update
Very detailed explanation 🙏🏼
Glad it was helpful Hema
Very well explained.
Glad it was helpful!
Hi Raghav i am using latest version of extent report 5.0.9 but the syntax statements mentioned in this video is not working .I will try to test in lower version.But can you please make a video on latest changes in extent reporter?Thanks in advance
Hi Rajesh, You can try with the version shown in the video
Hi, Thank you for your free tutorial. Now extent reports moved to version 5 and many methods are deprecated. Do you have any video for the new one. Thank you
Hi Gayathri, not yet, I will plan a new tutorial on this
@@RaghavPal Thank you so much
@@RaghavPal Was there another alternative to using Extent Reports as it's no longer free now?
Hi Raghav, this is very nice video as your other videos.I've one query that what is the difference between relevant code extent report and avenstack extent report? For both, implemntation is different. Csn you please clarify and suggest which one is good to go with?
Hi Meenal if I goto maven repository and search for extent reports i get the one from aventstack. Also on the website of extent its from aventstack, Maybe relevant is some older version or earlier name. Not completely sure.
@@RaghavPal Thanks Raghav for replying.
¡Buen trabajo!
Gracias
Nice video, but I have two questions:
1: I have several tests in my suite, do I have to insert the lines extentReports.createTest(...) and extentTest.log(Status...) for every one of them?
2: What's the meaning of extentTest.log(Status.FAIL)? Why would I expect a test to fail? I mean, let's say if I have 100 tests I expect that all of them should pass
Hi Felipe,
1. Yes you need to start a test for extentReports, so that it starts capturing the results
2. This is done usually in Exception block or in the Listener block. We can use this along with iTestListener of TestNg
Hi Raghav, Thank you for the easy explanation. Could you please make a detailed tutorial on Allure report using testNG and selenium?
Sure I will do it Mimi. I have covered allure reporting in Python Selenium course. Will do here too
@@RaghavPal , First of all, Happy New Year! Thanks a lot for your reply, it encourages a lot!
@@RaghavPal Thank you for the details session. have you added a session for the detailed tutorial on Allure report using testNG and selenium? if yes, please share the Link. thank you
Thank you MR.Raghav, Can you please answer if we can generate a Extend report with Selenium Python and if we can't why, reason please
Hi Abdul, extent is java library so we cannot use it for python, You can check options here stackoverflow.com/questions/10218679/seleniumpython-reporting
Also I want to join ur channel, so can you please give briefing about that
Sure Abhinandan, you can join here - ruclips.net/channel/UCTt7pyY-o0eltq14glaG5dgjoin
Really good
Thanks!
Hi raghav sir, i tried adding maven dependancies in my file, i am getting an atrifact descriptor exception error , please let me know how to resolve it.
All your previous videos are fabulous by the way.
Thanks and regards anand yashwanth.
Hi Anand, did you try clean and refresh project. Check here - stackoverflow.com/questions/39845810/artifactdescriptorexception-failed-to-read-artifact-descriptor/39869435
Great tutorial!
Thank you!
Hello Raghav,
Will Katalon studio kill the market of selenium and api testing?
Hi Chandan, look at this way. there will always be need to people with automation skills irrespective of the tools used. In Katalon Studio as well when you need to do any custom action we need to script for it. As long as you are ready to learn and enhance your skills w.r.t job market and time, there should be no problem
Hi Raghav,
After running the Test,unable to click the Google search button even though locator is mentioned correct as per the VEDIO and checked from my side.
Exception coming "element not interactable".
@@nainsikumari6272 The reason is because when you enter your search text, google expand a dropdown list with some sites you may go to and searchButton is not enabled. Please after sendKeys method use sendKeys(Keys.RETURN) or ...(Keys.ENTER) but without cklicking on searchButton.
Can we use it for Junit tests also? Also my tests are based on Junit/Spring and running on Jenkins. Can I see this report on Jenkins also?
Hi Vivek, not exact extent report, can check some plugins for Jenkins
Hi @raghavpal what to prepare for an interview with 13 years of experience in which 4 years is automation and rest is Manual. Can you please guide
Ajay
To prepare for an interview with 13 years of experience (4 years in automation and 9 years in manual testing):
Review manual testing concepts, tools, and methodologies
Brush up on automation concepts, frameworks, and tools
Prepare examples of your work, successes, and challenges
Review your resume and practice answering behavioral questions using the STAR method
Show enthusiasm and interest in the company and position
-
@@RaghavPal Thanks a lot appreciate it
please put a video on Extent report version 5. Thanks
I will check and plan Devi
Thanks a lot Raghav .Helpful :-)
Glad it was helpful Bala
this is awesome
Thanks Divyang
hello raghav jii this is sai krishna ,
can you tell me HOW TO DO BATCH EXECUTION IN SELENIUM MAKE VIDEO ABOUT THIS topic
Hi Sai, sure I will make a video on that
Raghav, can you please speak how to create a generic method for the report so that it can be call in every test case and based on the result (pass/fail) it create entry in the report. Actually, i am trying to create but facing so many issues. It would be great in you can help in this
Hi Ankit, I hope you are using ITestListeners, I will plan a session on this
Thank you sir.....
Most welcome Bala
Hi Raghav. Currently HTML reports are depreciated and are changed to Spark Reports. Will above methods work same on Spark Reports too?
Hi Satish, I have not checked, you can try or check online
sir for different jars version will there be a different way of writing code??
There can be based on the changes in the libraries
Hi sir.. nice explanation..is it mandatory to use testng or can we use junit to generate extent report?..
Hi Santhosh, you can use JUnit as well for generating extent reports
Hi Raghav. Thanks for the video. I have a question asked in interview- what are the parameters to (or how do you) decide which framework you want to design whether it is POM, Datadriven, cucumber?
Hi Ankit, it will depend on the needs and scenario.
example:
If the team using the framework is comfortable in adding new scripts for new test cases, then a DataDriven framework is the best.
If the team using the framework needs option to create all tests using keywords in external files like excel then keyword or hybrid framework is the option.
POM is the test design technique to store objects and test scripts separately
BDD or Cucumber framework will be useful if the organizationis BDD ready. Actually most of org today implement BDD framework without understanding the real need for it.
I will create a video soon to cover this.
Automation Step by Step - Raghav Pal Thank you so much raghav... I needed this detailed answer... cheers
@@RaghavPal if you have covered a detailed session then please share the link. thank you so much.
Hello Raghav, (a.k.a. The Test Automation Angel.) I am getting this error message: "The type ExtentHtmlReporter is deprecated") in ExtentReports version 4. Should I use ExtentSparkReporter as an alternative or ExtentLoggerReporter? These are the options that I have discovered. However, (1.) When I replace ExtenthtmlReporter with these other Extent___Reporters, the dashboard does not display as many features. (2.) Also, The Html file outputs as index.html and dashboard.html . Thanks so much for all that you do!!
Hi Hayden, did you try to use the same ver as shown in the video. Pls check.
Hi Raghav,It is a very nice video..Could you please tell is there any difference between test.log(Status.info) and test.info..Or both are same??
Hi Odia, thanks for watching Status.info will print the status of the test like Pass/Fail, test.info is to print some user defined statement.
Hi Raghav, I am getting warning that ExtentHtmlReporter is depreciated. Should i suppress the warnings and go with extenthtml reporter or do you know if we can use the extendSparkreporter and follow the video?
Hi Jobin, that may be because you are using a diff ver than the video. It is fine, you can use the latest one and refer the documentation if required.
Thank you very much
You are welcome Faten
Hi Raghav, can we share this report to other team members?
Yes, you can
Thank you, I don't use maven but the same class as you, I got the error: Caused by: java.lang.ClassNotFoundException: freemarker.template.TemplateModelException
should t add freemarker jar ? and which version? what about dependancy
Hi, if you are not using Maven or similar thing, you will have to download and use all the libraries manually, That can be a tricky task, Not sure what lib exactly will help here, you can try the one you have mentioned
Hi Raghav, nice session.
When am practicing am unable to find the attachReporter() method. Receiving an error. I tried with Highest & Lowest Extent pom maven dependencies but no luck. Please suggest.
Hi Ramesh, check if you are using the same ver of extent reports
@@RaghavPal Hi Raghav, thanks for your response, my issue is am unable to import attachReporter() method. not sure how to check version of extent reports. kindly help me and please suggest the correct POM versions to resolves this issue.
Hi Ramesh, when you downloaded extent reports or added the dependency you must have given a version no, check from the video if you are using the same
Hi Raghav Sir...I m using extent report latest version "4.1.6" ...when I use the ExtentHtmlReporter
in my extentdemoclass than it will auto cut "ExtentHtmlReporter" and "import com.aventstack.extentreports.reporter.ExtentHtmlReporter;" option.
So, I started using the older version "4.1.2" of extent report but now after running the extentdemoclass I m only getting "Test" option in the dashboard of extentreport.html and "Steps" option is MISSING from dashboard.
Is this due to latest version range of Extent Report?
Hi, yes, this may be due to the ver. If you are using diff ver you can check its documentation
@@RaghavPal Ok, Thanks :)
Hi sir... How can i add logs in extent report.. With the framework including POM.. ? I used listener class... But I am not getting any logs in report ...
Hi Abhishek, you can try adding log4j
is this deprecated now? in 2022?
Please let me know as i have an interview :P and I'm learning selenium from your channel
do you mean Extent reports
Hi Raghav , I am trying to add extent report to my project for api automation framework cucumber but getting avent stack plugin error...any solution is much appreciated
Hi, will need to check the setup
Please show how to use test with sanpshot, log with Sanpshot
For the whole test process.
And where are the screenshot stored?
How to access them.?
Hi Tanmay, I will check and add.
Raghav, while doing handson on extent reports, i cant able to import "import com.aventstack.extentreports.reporter.ExtentHtmlReporter;". I have added the dependencies too in maven project. What would be the mistake ?
What is the error, Try looking at latest documentation
It works well with the chromedriver but if you try this with firefox it immediately closes before searching the text. I'm not sure why
Hi, try to use WebDriver Manager - ruclips.net/video/8vWTgyoG0nc/видео.html
Hello, How can I generate report for more then 1 test case? For example under 1 class, I have 10 test cases, how can I create unique extent test report for all of them? Thanks in advanced.
Hi, You can generate report for any number of test cases, Just need to create a new ExtentTest object for every test e.g.
ExtentTest test = extent.createTest("MyFirstTest", "Sample description");
Make sure for the next test use a diff variable like test1 etc else it will get overridden.
And then make sure you flush the report after all testa are done. If you are using TestNG, do it as the teardown
extent.flush();
extentreports.com/docs/versions/3/java/#basic-example
@@RaghavPal Thanks man, I am using Junit4! Unfortunately I already done that, but from some reason the last test is overriding the others, I will try to find some way how to do it. I am able to generate separate reports, but still not able to generate unique report for all tests. Interesting thing is that I still did not discover tutorial, how to generate extent test report, for more than 1 t.c. All tutorials coverage only 1 t.c. :)
I am sure there is some small thing that is missed. Do check again
@@RaghavPal
I checked and tried on many ways, but always the last overwrite the 1st. I am sending you my codes, can you please tell me where I am making mistake? I also try to write and htmlReporter1 but still notning.
@Test
public void Yahoo() throws Exception{
// start reporters
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("./Reports/TestIzvestaj.html");
// create ExtentReports and attach reporter(s)
ExtentReports extent = new ExtentReports();
extent.attachReporter(htmlReporter);
// creates a toggle for the given test, adds all log events under it
ExtentTest test = extent.createTest("YAHOO TEST", "YAHOO REPORT");
System.out.println("******************** YAHOO **********************");
// log(Status, details)
test.log(Status.INFO, "This step shows usage of log(status, details)");
// info(details)
test.info("This step shows usage of info(details)");
extent.flush();
@Test
public void Google()throws Exception{
// start reporters
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("./Reports/TestIzvestaj.html");
// create ExtentReports and attach reporter(s)
ExtentReports extent = new ExtentReports();
extent.attachReporter(htmlReporter);
// creates a toggle for the given test, adds all log events under it
ExtentTest test1 = extent.createTest("GOOGLE TEST", " GOOGLE REPORT");
System.out.println("******************** GOOGLE **********************");
// log(Status, details)
test1.log(Status.INFO, "This step shows usage of log(status, details)");
// info(details)
test1.info("This step shows usage of info(details)");
extent.flush();
Hi you are doing extent.flush(); after every test case. This needs to be done only once at the end
Hello Sir
I have implemented Rerun functionality in my Cucumber framework. I am able to generate extent report but after rerun ,its latest results are not updated in extent report . is there any way to do so ?
Hi Archana, check if the following helps you:
When rerun is performed, clear the Extent Reports object and initialize it again. This will ensure that the latest results are being reported
You can use maven-surefire-plugin and configure it to delete the target directory before rerun
You can use the after hook to clear the extent report after each run, so that latest run results can be updated
You can try to use different reporting plugins like Allure or Cucumber HTML reporter, they might give you the flexibility to update the report
You can also try to merge the rerun report with the original report using some library like extentmerger
You may also want to check the configurations of Extent Report and Cucumber if they are properly set to handle rerun
@@RaghavPal sure sir will try thanks much for your time
Hi Sir,
Facing one issue while using extent report in my project.
When I ran test scripts in parallel mode, extent report not generating properly. Can you please help me into this or provide some suggestions?
Thank you
Hi Saurabh, can get some inputs here - stackoverflow.com/questions/52811017/extent-report-issue-parallel-testing
Hi Ragav,
After executing ....am getting below error
Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: element not interactable
please guide me!
Hi Kranthi, you can try using implicit waits. There is a video on that. Can also try to add some delay before this step
If I am generating reports using ITestListener and want to integrate logging information in report itself, then do I need to write these log.info lines in between code of my each TC?
Hi Kshipra, I will suggest to check some example on this
@@RaghavPal Hi Raghav! I tried looking many examples but no one is giving complete information
Ok, I will try to do a session when I get time, For now you will need to try with any online help you can get
Hey Raghav,
Can you help me out, how to share the html report with others when screenshot have been appended to the extent report. Usually these images are saved in our local machine, but when you share them with others(stake holders) they cant see that images.
I heard that we need to store image in kind of BASE64 format. If am not wrong ?
Please do help me.
Thanks in Advance.
Hi, yes as you said, you can convert to base64 images. These links will help you. I will also do a session on this when I get some time.
stackoverflow.com/questions/43062006/extent-report-not-able-to-see-the-screenshots-on-other-machine
stackoverflow.com/questions/42115372/how-do-i-email-an-html-report-as-an-attachment-with-images-embedded
Sir,
I am using extent report version 2.14.1. I am giving the below code but the report does not show the test cases in the order in which it was executed..
extent = new ExtentReports(outputDirectory + File.separator +
"TestResult_ExtendReport"+System.currentTimeMillis() + ".html",
false,DisplayOrder.OLDEST_FIRST);
Can you please help
Hi Shalini, what do you get in the logs. Also check the documentation as per the ver you are using
sir i am getting error at attach reporter that is the method attach reporter in extent report is not applicable for arguments(extent html reporter)..plz rply its urgent sir
Hi Kasthuri, you are not using the function correctly, Mostly its related to the argument type you are sending, Pls check
how to capture skipped test method in this report please make one video
I will plan on this Brahmendra
hi, thanks for the video. How can I make extent report code reusable in a framework and apply to all my test cases. Also I am new to selenium and building a framework from scratch on my own through youtube videos. I am using POM pattern. all the steps are in pom method for any functionality. so How can i give description in my pom class.
Hi Ankita, you can use testng listeners and put your code for reporting in extent in testng listener functions. There is a video on that.
I did not get your 2nd query. If you are using POM method, then you just need to keep creating a separate class for each web page and put the locators and functions in that class and use them in test classes.
Thank you Sir for the explanation , actually I have question ,how to expand all test childs in the extent report ?
I have used this code but it does not work : htmlReporter.config().setCSS(".node.level-1 ul{ display:none;} .node.level-1.active ul{display:block;}");
Hi Ahmed, I will need to check online for this.
@@RaghavPal Yes sure , I will be waiting . Thanks
When i am trying to do report = new ExtentReports(System.getProperty("user.dir")+"\\ExtentReportResults.html"); i am getting remove argument,if there is no file path given i am not getting any html file
Can you please suggest something here
Hi, did you try giving path only until reports folder and not the file name
Hi Raghav.. I don't want steps execution.. Where I need to modify the code..?? Please reply Raghav
Hi Roopa, I did not get you when you say steps execution
Hi Sir, I tried this and after running the test but I am not able to see the extent report even after refreshing the project multiple times . Kindly advise sir
Hi Nivetha, do you see any error in logs. Pls check all the steps again
Hi sir, if we want to take screenshots for failed and passed cases how to do that and where we can see that screenshots in Extent report dashboard
Hi Wasim, I will plan a session. For now pls check this
www.softwaretestingmaterial.com/screenshots-extent-reports/
automationtesting.in/capture-screenshot-in-extent-reports-java/
Thank q soo much for your replay sir
Automation Step by Step - Raghav Pal if we run program with testng.xml does extend reports work does it give exact report which we expect
Hi, it will work as you have configured.
Hi, Im using extent reports for my framework, but I keep getting Java.lang.AbstractMethodError when I run from my testng xml file. The test doesn't even run and just throws this exception. Can you please help me resolve this issue and why it has occured.
Hi Sadia, pls check detailed logs to see where exactly this error is thrown from. Also check if you find caused by section in the logs
And if i am trying to create ExtentHtmlReports object then there is no import suggestion coming and error is coming for this
can also check other comments on this video
thank you
You're welcome Yahia
Hi,
Can we get pdf for the extent report?
If yes please provide code or link...
Thanks
Hi Saquib
Here are the steps on how to get a PDF for the Extent Report in Selenium Java:
1. Install the Extent Report library. You can install the Extent Report library from the Maven Central repository.
Code snippet
com.relevantcodes
extentreports
4.1.9
2. Create an ExtentTest object. The ExtentTest object is the root object of the Extent Report.
Code snippet
ExtentTest test = new ExtentTest("My Test");
3. Add test steps to the ExtentTest object. The test steps are the individual steps that make up the test.
Code snippet
test.log(LogStatus.PASS, "This is a pass test step");
test.log(LogStatus.FAIL, "This is a fail test step");
4. Generate the PDF report. You can generate the PDF report by calling the generateReport() method on the ExtentReports object.
Code snippet
ExtentReports extentReports = new ExtentReports();
extentReports.attachReporter(new ExtentHtmlReporter("myreport.html"));
extentReports.addTest(test);
extentReports.generateReport();
This will generate a PDF report called myreport.html.
Here are some additional things to keep in mind:
* The Extent Report library provides a number of different reporters, including HTML, XML, and PDF.
* The PDF reporter can be used to generate a PDF report of the Extent Report.
* The PDF report can be opened in any PDF viewer.
I hope this helps
hlo sir how can we open a element in next tab? in manual process we right click on element chose a option open link in new tab . for doing this we can open any element in next tab.i want to do this using selenium,tried so many codes that a correct according to websites but still they don't work.can u help in doing this.
Hi Dinesh, this will help - stackoverflow.com/questions/34829329/how-to-open-a-link-in-new-tab-chrome-using-selenium-webdriver/45973561
@@RaghavPal yes its working but only for when we open a link on new tab.but if u right click on some element and want to open in new window? is it possible sir??
Hello Raghav, can you show how to implement Extent by JUNIT please
I will try a session on that Abhinandan. For a quick reference, pls check the documentation
I am trying alot finding answers online pal, but not able to do. currently I need to integrate Extent report to JUNIt project.Can I get help with this?
I have joined your Channel Raghav, so any advantages I get?
Raghav one small help, I get any documents/links regarding extent report with JUNiT, since I am not able to find any proper one so, if u have any
Hi Abhinandan, as a member, you will get priority on chats during my live sessions. I will also be posting members only post frequently
sir it will does not show anything it shows only js reports,css reports ,testng.xml and default suite
Kishore
will need to check the setup and details of the steps
I have a question I have three tests but only one is displayed after the test completed. Are there any reason why such is happening.
Hi Ifeoma, Pls check if you have added annotations and Also check for every test you will have to add statement to mark it as test in extent
ExtentReports reports = new ExtentReports("Path of directory to store the resultant HTML file", true/false);
ExtentTest test = reports.startTest("TestName");
@@RaghavPal So this is my utility package
UTILITY CLASS
public class ExtentFactory {
public static ExtentHtmlReporter reporter;
public static com.aventstack.extentreports.ExtentReports extent;
private static WebDriver driver;
static ExtentTest logger;
public static ExtentReports Instance() throws IOException {
ExtentReports extent;
String Path = "/Users/Desktop/cwjobs/src/main/java/ExtentReport1.html";
extent = new ExtentReports(Path, false);
extent.addSystemInfo("Selenium Version", "3.152");
reporter.config().setTheme(Theme.DARK);
reporter.config().setChartVisibilityOnOpen(true);
reporter.config().setTestViewChartLocation(ChartLocation.BOTTOM);
reporter.config().setEncoding("utf-8");
reporter.config().setTimeStampFormat("EEEE, MMMM dd, yyyy, hh:mm a '('zzz')'");
//loading the external xml file (i.e., extent-config.xml) which was placed under the base directory
//You could find the xml file below. Create xml file in your project and copy past the code mentioned below
extent.loadConfig(new File(System.getProperty("user.dir")+"/extent-config.xml"));
return extent;
}
//This method is to capture the screenshot and return the path of the screenshot.
public static String getScreenShot(WebDriver driver, String screenshotName) throws IOException {
String dateName = new SimpleDateFormat("yyyyMMddhhmmss").format(new Date());
TakesScreenshot ts = (TakesScreenshot) driver;
File source = ts.getScreenshotAs(OutputType.FILE);
// after execution, you could see a folder "FailedTestsScreenshots" under src folder
String destination = System.getProperty("user.dir") + "/Screenshots/" + screenshotName + dateName + ".png";
File finalDestination = new File(destination);
FileUtils.copyFile(source, finalDestination);
return destination;
}
public void takeScreenShot() throws IOException {
// To capture a Full page
Screenshot fpScreenshot = new AShot().shootingStrategy(ShootingStrategies.viewportPasting(1000)).takeScreenshot(driver);
ImageIO.write(fpScreenshot.getImage(),"PNG",new File("/Users/alisonhawker/Desktop/cwjobs/src/main/java/ExtentReport/ScreenShots.png"));
}
public static void getResult(ITestResult result) throws IOException {
if (result.getStatus() == ITestResult.FAILURE) {
logger.log(LogStatus.FAIL, "Test Case Failed is " + result.getName());
logger.log(LogStatus.FAIL, "Test Case Failed is " + result.getThrowable());
//To capture screenshot path and store the path of the screenshot in the string "screenshotPath"
//We do pass the path captured by this mehtod in to the extent reports using "logger.addScreenCapture" method.
String screenshotPath = ExtentFactory.getScreenShot(driver, result.getName());
//To add it in the extent report
logger.log(LogStatus.FAIL, logger.addScreenCapture(screenshotPath));
} else if (result.getStatus() == ITestResult.SKIP) {
logger.log(LogStatus.SKIP, "Test Case Skipped is " + result.getName());
}
}
TEST
public class DropDownTest extends BaseTest {
String option1 = "Option 1";
String option2 = "Option 2";
// Initialize the HtmlReporter
ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter("/Users/Desktop/cwjobs/src/main/java/ExtentReportings1.html");
// Initialize ExtentReports and attach the HtmlReporter
ExtentReports extent = new ExtentReports();
@Test
public void testSelectOptionOne() throws IOException {
extent.attachReporter(htmlReporter);
// Create a toggle for the given test and add all the Log events under
ExtentTest test = extent.createTest("Test Option One", "Test that user can select options from dropdown list");
test.log(Status.INFO, "Click on dropDown");
var dropDownPage = homePage.clickDropDown();
test.pass("Click on the dropDown link");
dropDownPage.selectFromDropDown("Option 1");
test.pass("Select Option One from the dropDown List");
var selectedOptions = dropDownPage.getSelectedOptions();
assertEquals(selectedOptions.size(), 1, "Incorrect number of selections");
test.pass("Correct number of field selected");
assertTrue(selectedOptions.contains(option1), "Option not selected");
test.pass("Correct assertion passed");
extent.flush();
}
@Test
public void testSelectOptionTwo() throws IOException {
extent.attachReporter(htmlReporter);
// Create a toggle for the given test and add all the Log events under
ExtentTest test = extent.createTest("Select Option Two", "Test user can select option two from dropdown list");
test.log(Status.INFO, "Navigate to homepage and click dropDown");
var dropDownPage = homePage.clickDropDown();
test.pass("Dropdown link");
dropDownPage.selectFromDropDown("Option 2");
test.pass("Option Two selected");
var selectedOptions = dropDownPage.getSelectedOptions();
// Assert that only one option is selected
assertEquals(selectedOptions.size(), 1, "Incorrects number of selections");
test.pass("Correct assertion message is displayed");
// Assert that list contains option two and if it fails then error message is displayed
assertTrue(selectedOptions.contains(option2), "Option not selected");
test.pass("One option is selected");
extent.flush();
}
}
And when I run the test, I only get one report instead of two and also am using Junit
Hi Ifeoma, you are doing extent.flush() in every test, that is the issue, Do flush() at the end, when all tests are done.
@@RaghavPal I have removed the flush on the first test but the test result only display the second result. Can you assist me with this
Thanks
Hi sir,
Extent reports' last version is 5.0.2, but can I use 4.0.9 ? Because over 4.0.9 I get different error.
Yes you can Eyyup
@@RaghavPal thank u sir :)
Hi Eyyup, I too faced error in 5.0.3 but now I can able to resolve it. Can you tell me what error did u faced?
@@mohammednawaz8019 I dont remember but when I used 4.0.9 it worked
hlo sir, i m trying to test failure case in extent reports using if else, but failed to do sir. can u put some video on that if our action like click on some button is true if not click then false ,please use if else statement.and all the code do in single test not in before or after because in after result we can use ITestResult class,but when i do all the code in one test then it will show mismatch ,hope u understand what i m trying to say.
Hi Dinesh, will try to create a session on this.
@@RaghavPal can u please make single video sir,from last 5-6 days ,i m stuck on these extent reports issue like fail case ,merge reports etc.so if u can make a single video for these it will be very thankful sir.
Hi Dinesh, I will but can take some time, In middle of few engagements
@@RaghavPal helo sir got any solution of my question??
Hi Raghav Sir,
I am unable to create Extentreport.html.. Getting an error message, element not intractable.. I have added mvn repository in pom file.. extentreport-4.1.5 jar..
Plz help me out.. Thank you
I can share you screenshot if you need
Hi Syed, can you check the logs. I believe there is some specific object locator that is not working
@@RaghavPal I have a screenshot that would help you out.. Can I have your email address plz
raghav.qna@gmail.com
I shall email you the screenshot
How to generate extent report In PDF format like here .html is creating exact this should be in.pdf ??
Hi Rehan, I believe there is no in-built feature in Extent to generate pdf files. You can write code to convert html to pdf
@@RaghavPal any examples do you have please share
Hi Rehan, if you are using java, you can search for java libraries that can do this conversion. For e.g. see this stackoverflow article - www.quora.com/Is-there-any-free-Java-API-for-HTML-with-css-and-images-to-PDF-conversion
i am not able to get the ExtentHTml import while writing the code
Hi Rahul, check the error logs, can use diff ver
hlo sir, can u please tell me how to join two or more extent reports ??
I have to check that online Dinesh, not sure what is your scenario
@@RaghavPal scenario is very clear sir ,we have so many pages and so many extant reports,so we have to combine all these reports in a single reports.
@@RaghavPal like this relevantcodes.com/Tools/ExtentReports2/ExtentMerge.html#!
@@RaghavPal extant reports look very cool ,but if we fail to join these reports,then there is no profit for creating extant reports,so please help me sir .
Ok Dinesh, I will try to do a demo on this
hii raghv in intellij it will not show the report.html
Kishore
I will need details on your steps and logs
Hi sir
Is it compatible for jdk 7
Yes should be, you can try
@@RaghavPal sir i tried but it is giving error as "major minor version 52" .
Thanks for your quick response.
Okay, not checked with java 7 recently, You can go ahead and get later ver. This can help - ruclips.net/p/PLhW3qG5bs-L_qj1L5hnHvJYeFpQ_g4UuU
unable to generate Extent Report after execution plz help
Will need to check logs
@@RaghavPal I am new to selenium sir. I am learning this by watching your videos so don't know how to check logs 😔
As you run your test, you will see some logs running at the bottom, you can also write steps to print on console. Can also check - ruclips.net/video/Tkj_rh0AEgE/видео.html
@@RaghavPal ❤️ thank u...
:)
There is no error but still don’t run
Hi, cannot say anything without any logs or error details. Pls check all the steps again and try to do the setup again from scratch. Can also refer some online examples
Automation Step by Step - Raghav Pal thank you so much I follow again and it’s working now
You are too much, if you were a woman I would ask you to marry me!..
Silvio, I hope you find someone like me in a female :). Thanks for your message.