Automation to Manual Test Steps: A New Approach with Selenium WebDriver and TestCase Studio
The world of software testing is divided into two main approaches: manual testing and automated testing. While both have their strengths, they have traditionally been considered separate entities. However, what if we could bridge the gap between these two methods, extracting the best of both worlds? Well, now we can, thanks to the capabilities of Selenium WebDriver and TestCase Studio. This article introduces a way to generate exact manual test steps from automated testing scripts, providing a hybrid approach to software testing that could revolutionize your testing process.
Harnessing the Power of Selenium WebDriver
Selenium WebDriver is a popular open-source web testing framework that allows you to write automated tests for web applications. It is widely used because of its ability to work with different programming languages, operating systems, and browsers. One of the notable features of Selenium WebDriver is its ability to simulate a user’s interaction with a web application, just as if a real user were navigating through it. This feature forms the basis of our approach to generating manual test steps.
TestCase Studio: An Essential Tool for Test Documentation
TestCase Studio is a chrome extension designed to make the process of generating and managing test cases easier. One of its standout features is its ability to generate manual test steps, complete with screenshots, from your automated test execution. It can then compile these steps into Excel sheets according to the test cases written in your automation framework. This detailed documentation can be extremely useful for debugging, documentation, and defect logging, enhancing the clarity and efficiency of your testing process.
From Proof of Concept to Practice
Using Selenium WebDriver and TestCase Studio together, I have carried out a small proof of concept (POC) to showcase how this process can work. The automated test scripts were executed, and TestCase Studio was used to generate the manual test steps from these scripts, creating an Excel document filled with step-by-step instructions and screenshots. This POC illustrated how we can take an automated test and break it down into detailed manual steps, allowing for a clear and comprehensive view of the test process.
The beauty of this approach is that it can be integrated into your existing framework with a simple toggle or feature flag. This means you can choose to generate manual test steps when necessary, without disrupting your regular testing process.
Download Test Case Studio .crx file:
https://www.crx4chrome.com/crx/261809/
Sample Script:
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WindowType;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class ExtensionTest {
public static void main(String[] args) throws InterruptedException {
ChromeOptions co = new ChromeOptions();
//Inject the chrome extension with ChromeOptions class
co.addExtensions(new File("/Users/naveen/Downloads/extension_1_6_0_0.crx"));// .crx
WebDriver driver = new ChromeDriver(co);// browser
//Launch test case studio URL
driver.get("chrome-extension://loopjjegnlccnhgfehekecpanpmielcj/testCaseStudio/studioWindow.html");// TS ext
String testCaseStudioWID = driver.getWindowHandle();
driver.switchTo().newWindow(WindowType.TAB);// open a blank new tab
driver.get("https://www.google.com");// Enter google.com
driver.findElement(By.name("q")).sendKeys("Naveen Automation Labs");
driver.findElement(By.name("q")).submit();
driver.close(); //close google window
driver.switchTo().window(testCaseStudioWID);//switch back to test case studio window
System.out.println(driver.getTitle());
Thread.sleep(3000);
//Enter test name
driver.findElement(By.cssSelector("input[title='Edit test case name']")).sendKeys("GoogleTest");
driver.findElement(By.id("save_btn")).click(); //click on save (Test Case)
//Yay!! it will generate new excel sheet with all steps executed through automation
}
}

Now go to your download directory and open the GoogleTest.xls file:

Watch the full video here where I have implemented this in my framework and generating test wise excel sheets with manual test steps.
Conclusion
By harnessing the power of Selenium WebDriver and TestCase Studio, we can bring automation and manual testing closer together than ever before. The generation of detailed manual test steps from automated tests not only provides a useful tool for debugging and documentation, but also enhances our understanding of the testing process. If you’ve been searching for a way to optimize your testing framework, why not give this method a try? It could just be the solution you’ve been looking for.
Thanks Sanjay Kumar | Upgrade to SelectorsHub - XPathTool for creating this amazing tool — Test Case Studio.
Cheers!!
Naveen Automation Labs