Rahul Rathore
Rahul Rathore
  • Видео 327
  • Просмотров 1 954 042
30. Karate Framework || Request Chaining.
Request chaining in REST API is a technique where you make a series of programmatic API requests in a specific order, using the output from one request as the input for the next. This allows for a sequential workflow that can handle complex tasks by passing data from one API call to another.
✅ Support my Channel www.paypal.me/Rathore73
#karate #apitesting #karateframework
✅ [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git
The complete playlist is available here
➡ API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc
➡ Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU
➡ Rest API Testing using RestSharp in C# ruc...
Просмотров: 140

Видео

29. Karate Framework || Delete Request.
Просмотров 2292 месяца назад
The DELETE method is used to delete a resource from the server. Unlike GET requests, the DELETE requests may change the server state. ✅ Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ✅ [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ➡ API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOy...
28. Karate Framework || Patch Request.
Просмотров 4535 месяцев назад
The PATCH method is a request method in HTTP for making partial changes to an existing resource. The PATCH method provides an entity containing a list of changes to be applied to the resource requested using the HTTP. ✅ Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ✅ [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is availab...
20. RestSharp - JSON Object Validation.
Просмотров 9916 месяцев назад
► Support my Channel www.paypal.me/Rathore73 #restsharp #csharp #apitesting #httpclient #udemy ► [GitHub] github.com/rahulrathore44/RestSharpFramework.git The complete playlist is available here ► Rest API Testing using RestSharp in C# ruclips.net/p/PLlsKgYi2Lw73ox9LF5VfYMrA1eo9e7rIq ► API Testing Using C# Http Client ruclips.net/p/PLlsKgYi2Lw722PMqESdivKJQgRtJAdbzn ► Selenium Webdriver with C#...
JUnit Framework - JUnit Pioneer - Environment Variables - Part - 2.
Просмотров 6726 месяцев назад
► Support my Channel www.paypal.me/Rathore73 #junit5 #junit #unittests #junitpioneer ► [GitHub] gist.github.com/rahulrathore44/5d3c29a128fd45b30197e1cd5a15f8fb ► [JUnit Pioneer] junit-pioneer.org/ The complete playlist is available here ► Rest API Testing using RestSharp in C# ruclips.net/p/PLlsKgYi2Lw73ox9LF5VfYMrA1eo9e7rIq ► API Testing Using C# Http Client ruclips.net/p/PLlsKgYi2Lw722PMqESdi...
JUnit Framework || JUnit Pioneer || Environment Variables || Part - 1.
Просмотров 1246 месяцев назад
► Support my Channel www.paypal.me/Rathore73 #junitpioneer #junit #unittesting ► [GitHub] gist.github.com/rahulrathore44/5d3c29a128fd45b30197e1cd5a15f8fb ► [JUnit Pioneer] junit-pioneer.org/ The complete playlist is available here ► Rest API Testing using RestSharp in C# ruclips.net/p/PLlsKgYi2Lw73ox9LF5VfYMrA1eo9e7rIq ► API Testing Using C# Http Client ruclips.net/p/PLlsKgYi2Lw722PMqESdivKJQgR...
27. Karate Framework || Query Parameter.
Просмотров 6978 месяцев назад
Query parameters are a defined set of parameters attached to the end of a URL. They are extensions of the URL that are used to help define specific content or actions based on the data being passed ► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testin...
26. Karate Framework || Parallel Runner || Running the test in Parallel.
Просмотров 9698 месяцев назад
Karate can run tests in parallel, and dramatically cut down execution time. This is a 'core' feature and does not depend on JUnit, Maven or Gradle. ► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw73...
25. Karate Framework || Calling other feature file || Passing Variables.
Просмотров 1,5 тыс.10 месяцев назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
24. Karate Framework || Calling other feature file || Access the variables.
Просмотров 58011 месяцев назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
23. Karate Framework || Calling other feature file || feature file as a re-usable unit.
Просмотров 1,4 тыс.Год назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
22. Karate Framework || Put Request.
Просмотров 503Год назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
21. Karate Framework || Scenario Outline || Data Driven || CSV Files.
Просмотров 1,1 тыс.Год назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
20. Karate Framework || Scenario Outline.
Просмотров 1,3 тыс.Год назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
19. Karate Framework || File Upload || multipart/form-data.
Просмотров 2,2 тыс.Год назад
► Support my Channel www.paypal.me/Rathore73 #karate #apitesting #karateframework ► [GitHub] github.com/rahulrathore44/KarateFrameworkTutorial.git The complete playlist is available here ► API Testing using Katalon Studio ruclips.net/p/PLlsKgYi2Lw732Snuu4qPlkvnOykiiatKc ► Web Service Testing with Apache HttpClient ruclips.net/p/PLlsKgYi2Lw70d9TqU0w08yxI27stw1vKU ► Rest API Testing using RestSha...
18. Karate Framework || Complex Schema Validation.
Просмотров 2,2 тыс.Год назад
18. Karate Framework || Complex Schema Validation.
19. RestSharp || Session Based Authentication || E2E Flow || JIRA Client.
Просмотров 534Год назад
19. RestSharp || Session Based Authentication || E2E Flow || JIRA Client.
18. RestSharp || Session Based Authentication || JIRA Client Design.
Просмотров 541Год назад
18. RestSharp || Session Based Authentication || JIRA Client Design.
17. RestSharp || Session Based Authentication.
Просмотров 788Год назад
17. RestSharp || Session Based Authentication.
16. RestSharp || JSON Web Token || Custom Authenticator with RestClient.
Просмотров 1,5 тыс.Год назад
16. RestSharp || JSON Web Token || Custom Authenticator with RestClient.
15. RestSharp || JSON Web Token || Custom Authenticator Implementation.
Просмотров 834Год назад
15. RestSharp || JSON Web Token || Custom Authenticator Implementation.
14. RestSharp || JSON Web Token || Custom Authenticator Design.
Просмотров 823Год назад
14. RestSharp || JSON Web Token || Custom Authenticator Design.
13. RestSharp || JWT Authentication Flow.
Просмотров 1,8 тыс.Год назад
13. RestSharp || JWT Authentication Flow.
12. RestSharp || Http Tracer Client.
Просмотров 1,2 тыс.Год назад
12. RestSharp || Http Tracer Client.
17. Karate Framework || Understanding Embedded Expression.
Просмотров 725Год назад
17. Karate Framework || Understanding Embedded Expression.
16. Karate Framework || Java Script Function.
Просмотров 2,5 тыс.Год назад
16. Karate Framework || Java Script Function.
Cucumber Data Tables || Excel Data to Data Table || Implementation.
Просмотров 5 тыс.2 года назад
Cucumber Data Tables || Excel Data to Data Table || Implementation.
Cucumber Data Tables || Excel Data to Data Table || Introduction and Design.
Просмотров 6 тыс.2 года назад
Cucumber Data Tables || Excel Data to Data Table || Introduction and Design.
Selenium WebDriver || Java || Handle Stale Element Reference Exception.
Просмотров 1,1 тыс.2 года назад
Selenium WebDriver || Java || Handle Stale Element Reference Exception.
15. Karate Framework - Interview Assessment Question.
Просмотров 4,1 тыс.2 года назад
15. Karate Framework - Interview Assessment Question.

Комментарии

  • @annenshiaflorence6393
    @annenshiaflorence6393 4 дня назад

    I have json array returned in one feature file.. now for each array i want to make a post call.. how do i do it

  • @ymnaa6546
    @ymnaa6546 6 дней назад

    I am so grateful for your videos.... you are so talented in teaching and you explain things in detail I wish you were my professor in the college

  • @vkaur151
    @vkaur151 9 дней назад

    thanks for the video it is helpful! Have a question : how to pass a xml request in karate

    • @RahulRathore41
      @RahulRathore41 6 дней назад

      Refer to the following piece of code. github.com/rahulrathore44/KarateFrameworkTutorial/blob/main/src/test/java/com/api/automation/postrequest/createJobEntry.feature#L16

  • @asikhoful
    @asikhoful 11 дней назад

    I have a API call and respnse is in the form of downloadable csv file. If only allows to down a csv file and does not provide the data in streaming csv format. Now, how to handle this, what can be done that when client.GetAsync(path) is called then it opens a dialog box to save the csv file

    • @RahulRathore41
      @RahulRathore41 6 дней назад

      Could you please provide more details?

  • @anjalipahariya4084
    @anjalipahariya4084 12 дней назад

    Test method RestSharpAutomation.RestGetEndPoint.TestGetEndPoint.TestGetUsingRestSharp threw exception: System.Net.Http.HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:8081) ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it. i am getting this error message. what is the problem

    • @RahulRathore41
      @RahulRathore41 6 дней назад

      It appears that the application you are trying to send a request to is not currently running on port 8081.

  • @birdseyes6691
    @birdseyes6691 28 дней назад

    Can you do video on RestSharp Interceptors?

    • @RahulRathore41
      @RahulRathore41 23 дня назад

      Could you please elaborate your scenario?

    • @birdseyes6691
      @birdseyes6691 23 дня назад

      @@RahulRathore41 I search whole youtube, even your udmy Channel, but could not find any tutorial with regard to Restsharp Interceptors. Actually I want to modify Http headers and response using Restsharp interceptors. I did it through Fiddler and fluxzy sdk, looks both failed. Is there some thing which is not proxy based and also intercept https with custom headers and response? There are different softwares available but almost all are proxy based. I am looking for proxyless HTTP interceptor just like HTTPDebugger. Any Idea, ...

    • @RahulRathore41
      @RahulRathore41 21 день назад

      ​@@birdseyes6691 Could you please provide me with an exact use case that you need (using RestSharp Interceptor)? I can create a video on that.

    • @birdseyes6691
      @birdseyes6691 21 день назад

      @@RahulRathore41 is there any way to contact you, Will pay u for your time.

  • @jeremyfeliciano2664
    @jeremyfeliciano2664 Месяц назад

    @RahulRathore41 how do you make this kind of string body format? def stringBody = "{" + "\"BrandName\":\"Alienware\", " + "\"Features\":{ " + "\"Feature\":[ " + "\"8th Generation Intel® Core™ i5-8300H\"," + "\"Windows 10 Home 64-bit English\","+ "\"NVIDIA® GeForce® GTX 1660 Ti 6GB GDDR6\","+ "\"8GB, 2x4GB, DDR4, 2666MHz\" " + "]" + "}," + "\"Id\":" + test_id + ", " + "\"LaptopName\":\"Alienware M17\" " + "}"

    • @RahulRathore41
      @RahulRathore41 Месяц назад

      You can use the following website for that www.freeformatter.com/json-escape.html

  • @easyautomationtesting9180
    @easyautomationtesting9180 Месяц назад

    Karate framework is no more free. It is paid.

    • @RahulRathore41
      @RahulRathore41 Месяц назад

      The software has both an open source version and a paid version. Please refer to the following link: www.karatelabs.io/pricing

  • @PavanKumar-wx6nl
    @PavanKumar-wx6nl Месяц назад

    Awesome bro... This is what I need

    • @RahulRathore41
      @RahulRathore41 Месяц назад

      I'm glad I could help. Please consider subscribing and sharing.

  • @AllTypeShorts..
    @AllTypeShorts.. 2 месяца назад

    Nice video sir....One suggestion if u can give the basic overview of what is log and whyvwe use it, it will be very very beneficial for beginners like me who has just joined the testing industry

  • @petriandy
    @petriandy 2 месяца назад

    I have added picocontainer to my pom.xml & followed this pattern but I get an error saying a zero argument constructor is required… but if I add a 0 arg constructor, it uses that and doesn’t inject the dependency! Please help!

    • @RahulRathore41
      @RahulRathore41 Месяц назад

      Could you please share the code snippet along with the exception?

  • @sarmadawan2161
    @sarmadawan2161 3 месяца назад

    Amazing

  • @user-in5wp8yo2i
    @user-in5wp8yo2i 3 месяца назад

    Is this basic level of automation?

  • @user-rr5uk6qe7r
    @user-rr5uk6qe7r 3 месяца назад

    Its a nice video ,Can you make video on how to do API integration testing framework in c# without network and with network

    • @RahulRathore41
      @RahulRathore41 3 месяца назад

      Can you please elaborate?

    • @user-rr5uk6qe7r
      @user-rr5uk6qe7r 3 месяца назад

      When developer completed his unit test for api such get or post method in his location host , So Secario is here ,Integration testing should do if both api work together or component ,how a system will behave.LIke During inegration testing we generally comnnect with db or any dependency. So we can find bug earily before code check

    • @RahulRathore41
      @RahulRathore41 3 месяца назад

      You have to follow the testing pyramid. And you can also use mocking framework.

  • @user-sy4zw7eq8p
    @user-sy4zw7eq8p 4 месяца назад

    Hi, I have an excel as many sheets as Module1TestData TestCaseID TestData1 TestData2 TestData3 TestData4 MOD1_001 A1 BBB1 MOD2_001 A2 BBB2 555 Module2TestData TestCaseID TestData1 TestData2 TestData3 TestData4 MOD2_001 A1 BBB1 BBB3 MOD2_001 A2 BBB2 BBB3 MOD3_001 A3 BBB3 TTT how to get data in HashMap as {MOD1_001(TestCaseID= MOD_001, TestData1=A1, TestData2=BB1, TestData3=,TestData4=), MOD1_002 (TestCaseID= MOD_002, TestData1=A2, TestData2=BB1,TestData3=,TestData4=555), )} public class ExcelReaderTest2 { public static void main(String[] args) throws IOException { TestCaseExcelDataReader ex = new TestCaseExcelDataReader("C:\\HomeTestData - Copy.xlsx", "Module1TestData"); Map<String, Map<String, String>> excelData =ex.getExcelAsMap(); } import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import java.io.FileInputStream; import java.io.IOException; import java.util.*; public class TestCaseExcelDataReader { private String dataSheetName; private String filePath; private int sheetIndex; TestCaseExcelDataReader(String filePath, String dataSheetName) { this.filePath = filePath; this.dataSheetName = dataSheetName; } private XSSFSheet getSheet() throws IOException { FileInputStream fis = new FileInputStream(filePath); XSSFWorkbook workbook = new XSSFWorkbook(fis); XSSFSheet sheet = workbook.getSheetAt(sheetIndex); return sheet; } public Map<String, Map<String, String>> getExcelAsMap() throws IOException { XSSFSheet sheet = getSheet(); Map<String, Map<String, String>> completeSheetData = new HashMap<String, Map<String, String>>(); List<String> columnHeader = new ArrayList<String>(); Row row = sheet.getRow(0); Iterator<Cell> cellIterator = row.cellIterator(); while (cellIterator.hasNext()) { columnHeader.add(cellIterator.next().getStringCellValue()); } int rowCount = row.getLastCellNum(); int columnCount = row.getLastCellNum(); for (int i = 1; i <= columnCount; i++) { Map<String, String> singleRowData = new HashMap<String, String>(); Row row1 = sheet.getRow(i); for (int j = 0; j < columnCount; j++) { Cell cell = row1.getCell(j); System.out.println(cell); singleRowData.put(columnHeader.get(j), getCellValueAsString(cell)); } completeSheetData.put(singleRowData.get("TestCaseID"),singleRowData); } return completeSheetData; // Getting Exception here as loop is running till the end of total column but rows not matching } public String getSheetName(int index) throws IOException { FileInputStream file = new FileInputStream(filePath); HSSFWorkbook workbook = new HSSFWorkbook(file); String sheet = workbook.getSheetName(index); return sheet; } public int getSheetCount() throws IOException { FileInputStream file = new FileInputStream(filePath); HSSFWorkbook workbook = new HSSFWorkbook(file); int sheetCount = workbook.getNumberOfSheets(); return sheetCount; } public int totolColumnCount() throws IOException { XSSFSheet sheet = getSheet(); Row row = sheet.getRow(0); int lastColumnNum = row.getLastCellNum(); return lastColumnNum; } public String getCellValueAsString(Cell cell) { String cellValue = null; switch (cell.getCellType()) { case NUMERIC: cellValue = String.valueOf(cell.getNumericCellValue()); break; case STRING: cellValue = cell.getStringCellValue(); break; case BOOLEAN: cellValue = String.valueOf(cell.getBooleanCellValue()); break; case FORMULA: cellValue= cell.getCellFormula(); case BLANK: cellValue="BLANK"; default: cellValue ="DEFAULT"; } return cellValue; } } // Getting Exception as loop is running till the end of total column but rows not matching

    • @RahulRathore41
      @RahulRathore41 3 месяца назад

      What is the exception you are getting?

  • @user-wi6ir3jy4l
    @user-wi6ir3jy4l 4 месяца назад

    Do you have any recordings on Basic Authentication?

    • @RahulRathore41
      @RahulRathore41 4 месяца назад

      You can refer to the following piece of code. github.com/rahulrathore44/RestSharpFramework/blob/master/RestSharpAutomation/RestGetEndPoint/TestGetEndPoint.cs#L233

  • @ajrealnews
    @ajrealnews 4 месяца назад

    Message: Bad Request, ExceptionType: AggregateException ExcperionMessage:One or more errors occured

    • @RahulRathore41
      @RahulRathore41 4 месяца назад

      Can you please provide complete stack trace and your code snippet?

  • @ajrealnews
    @ajrealnews 4 месяца назад

    I am getting 400 bad request

    • @RahulRathore41
      @RahulRathore41 4 месяца назад

      Can you please provide more details?

  • @user-wh2ky4tj5r
    @user-wh2ky4tj5r 5 месяцев назад

    Would this setup work with sites that check for robots, i.e. CAPTCHA ?

    • @RahulRathore41
      @RahulRathore41 4 месяца назад

      Nope, You need to add an extra layer of code to handle CAPTCHA.

  • @virendraswami9491
    @virendraswami9491 5 месяцев назад

    Hi Rahul, i wanted to read data from a file in the target folder path of file:- /api_automation/target/a.txt......and the file in which i want to read a.txt file is path /api_automation/src/test/java/com/jcapi/functional/readhere.feature can u help me

    • @RahulRathore41
      @RahulRathore41 4 месяца назад

      You should not rely on the target folder. Its content is dynamically generated when you build your application. You should keep all the resources under src/java/resource or src/test/resource directory. Then use the classpath to find the resource absolute path. For your use case, keep the text file in the src/test/resource directory. Write a Java utility to read the file and call the Java function in the feature file. Reading the file from resource directory - github.com/rahulrathore44/SeleniumCucumber/blob/master/src/main/java/com/cucumber/framework/utility/ResourceHelper.java#L18 Calling the Java function from a feature file - github.com/rahulrathore44/KarateFrameworkTutorial/tree/main/src/test/java/com/api/automation/call/javafun

  • @divyadivya2812
    @divyadivya2812 5 месяцев назад

    This worked perfectly with older version of cucumber. please help on adding tags at run time in io cucumber testng. Thank you!

    • @RahulRathore41
      @RahulRathore41 5 месяцев назад

      Glad it was helpful! Kindly like, subscribe & share. Soon, I will create a video on the same topic.

    • @divyadivya2812
      @divyadivya2812 5 месяцев назад

      @@RahulRathore41 Thank you!

    • @divyak274
      @divyak274 3 месяца назад

      @@RahulRathore41Have you found any solution for new version of cucumber. Thanks!

  • @user-gm2ps2wl1m
    @user-gm2ps2wl1m 5 месяцев назад

    Excellent guide to learn httpClient in C#, thanks so much for producing such helpful content! I noticed that some materials are missing in this tutorial, could you let me know where I can find the complete course. I could not find it from the Udemy site. Happy New Year!

    • @RahulRathore41
      @RahulRathore41 5 месяцев назад

      Glad it was helpful! Kindly like, subscribe & share. Here is the link to the full course. www.udemy.com/course/rest-api-automation-with-restsharp-http-client/

  • @AakashSaxena2090
    @AakashSaxena2090 6 месяцев назад

    Why null pointer exception is raised: public static boolean isElementPresent(By xpath) { return driver.findElements(xpath).size() >= 1; } java.lang.NullPointerException: Cannot invoke "org.openqa.selenium.WebDriver.findElements(org.openqa.selenium.By)" because "com.kpit.automation.helpers.WebGridHelper.driver" is null ======================================================================= I am using below code:- package com.kpit.automation.helpers; import java.util.ArrayList; import java.util.List; import org.apache.log4j.Logger; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import com.kpit.automation.utilities.LoggerUtility; public class WebGridHelper extends LoggerUtility { Logger log = getLogger(WebGridHelper.class); public static WebDriver driver; // public WebGridHelper(WebDriver driver) { // this.driver = driver; // } public static String getTableXpath(String locator, int row, int col) { return locator + "//div[@role='row'][" + row + "]//div[@role='gridcell'][" + col + "]"; } private static WebElement getGridElement(String locator, int row, int col) { if (isElementPresent(By.xpath(getTableXpath(locator, row, col) + "//img"))) { return driver.findElement(By.xpath(getTableXpath(locator, row, col) + "//img")); } else { return driver.findElement(By.xpath(getTableXpath(locator, row, col))); } } public static String getColumnValue(String locator, int row, int col) { return getGridElement(locator, row, col).getText(); } public static List<String> getAllValues(String locator) { ArrayList<String> list = new ArrayList<String>(); int row = 1; int col = 1; while (getTableXpath(locator, row, col) != null) { while (getTableXpath(locator, row, col) != null) { list.add((getColumnValue(locator, row, col))); col++; } row++; col = 1; } return list; } public static void clickOnGrid(String locator, int row, int col) { getGridElement(locator, row, col).click(); } public static boolean isElementPresent(String locator) { boolean status = false; boolean flag = false; if (locator.contains("/")) flag = true; if (driver.findElements(By.id(locator)).size() >= 1) { status = true; } else if (driver.findElements(By.name(locator)).size() >= 1) { status = true; } else if (!flag && driver.findElements(By.cssSelector(locator)).size() >= 1) { status = true; } else if (driver.findElements(By.xpath(locator)).size() >= 1) { status = true; } else status = false; return status; } public static boolean isElementPresent(By xpath) { return driver.findElements(xpath).size() >= 1; } }

  • @AakashSaxena2090
    @AakashSaxena2090 6 месяцев назад

    Thnaks.

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      Glad it helped! Kindly subscribe and share.

  • @AakashSaxena2090
    @AakashSaxena2090 6 месяцев назад

    Good video Rahul.. Thanks.

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      Glad it helped! Kindly subscribe and share.

  • @saxenahimanshu6584
    @saxenahimanshu6584 6 месяцев назад

    i dont why this video have very less LIKES but This video teaches a lot of concepts

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      Glad it helped! Kindly subscribe and share.

    • @saxenahimanshu6584
      @saxenahimanshu6584 6 месяцев назад

      @@RahulRathore41 Yes Sure Subscribed Can you also mention any Karate framework from which i could refresh my 2 years old learnt concepts again!!! Any Git link

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      @@saxenahimanshu6584 Refer to the description of the video

  • @maheshh6179
    @maheshh6179 6 месяцев назад

    Im getting 400 bad request when stubbing data

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      Can you please share your code snippet?

    • @maheshh6179
      @maheshh6179 6 месяцев назад

      @@RahulRathore41 hi sir Getting like below error org.springframework.web.client.httpClientErrorException$BadRequest : 400 Bad Request : "{<EOL> " type":"error",<EOL> "code":" provider Error", <EOL> "details ":" host Error",<EOL> "more info": {<EOL> " responseCode": "-1",} etc... Like this getting

    • @maheshh6179
      @maheshh6179 6 месяцев назад

      But My request is correct only

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      @@maheshh6179 BAD REQUEST means there is a mismatch in parameters that are passed while calling the End point. It could be anything like incorrect headers, request body etc.

  • @AshDesignss
    @AshDesignss 6 месяцев назад

    How do we handle is we have different set of data for every scenario , do we create different csv file for each scenario or how?

    • @RahulRathore41
      @RahulRathore41 6 месяцев назад

      Yes, if you have a different data set, you have to create multiple CSV files.

  • @kshiprapandey4939
    @kshiprapandey4939 7 месяцев назад

    I have to test an API where we are using content type as multipart/form-data, I am not sure how can I test it using cucumber , how to pass that file in body to test in cucumber. Can you please help

    • @RahulRathore41
      @RahulRathore41 7 месяцев назад

      What is the underlying framework you are using with cucumber? Is it rest assured?

  • @kshiprapandey4939
    @kshiprapandey4939 7 месяцев назад

    Hi, how do we read a "multipart/form-data" that is excel in cucumber. If you can help me with that?

    • @RahulRathore41
      @RahulRathore41 7 месяцев назад

      multipart/form-data is used for file upload scenarios. What is the underlying framework you are using with cucumber? You can pass the file path from the cucumber feature file and use it in your code.

  • @roshnisadanavasisht8539
    @roshnisadanavasisht8539 7 месяцев назад

    How can we add random number in form of string

    • @RahulRathore41
      @RahulRathore41 7 месяцев назад

      Refer to the following custom keyword. You can use the same to convert random number to string. github.com/rahulrathore44/SeleniumAutomationWithKatalonStudio7.4.x/blob/764a43aba5de34ad69d1859c9d3121e117b25041/Keywords/com/question/RandomEmail.groovy#L30

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    Thank you so much Rahul for the amazing content on your RUclips channel! Your insights and expertise have been incredibly valuable. Keep up the great work! 🙌

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    Thank you for you content 💥💥💥

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    Thank you so much for this incredible video! 👏📚

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    Thanks for the awesome video! 👏BIG UP Rahul !!!

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    Thanks for the awesome video! 👏BIG UP!!!

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    ChatGPT Sure, here's a comment you can use for expressing gratitude on a RUclips video: Thanks for the awesome video! 👏📚

  • @jaminDNB
    @jaminDNB 7 месяцев назад

    Thank you so much for this incredible video! 👏📚

  • @MaudMcok
    @MaudMcok 7 месяцев назад

    Hello Mr. Rahul Rathore, I would like to know if you have a solution to parallelize the execution of features while still maintaining the sequential execution of the scenarios that compose them.

    • @RahulRathore41
      @RahulRathore41 7 месяцев назад

      Parallel execution is a core feature of the Karate Framework. In parallel execution, there is no guarantee that any order will be maintained. Also, the framework does not allow to override the logic of execution.

  • @kumarraj989
    @kumarraj989 7 месяцев назад

    Any way to save this file and run using maven?

    • @RahulRathore41
      @RahulRathore41 7 месяцев назад

      It's a Java file & it can be invoked via Maven. Can you please elaborate your scenario?

  • @nikkm2000
    @nikkm2000 7 месяцев назад

    very nice explanation. thanks

  • @raviteja-qk3br
    @raviteja-qk3br 8 месяцев назад

    How run multiple scenarios order vaise with a single feature file

    • @RahulRathore41
      @RahulRathore41 7 месяцев назад

      Specflow does not provide any way of running scenarios in an order.

  • @MrMotwanisahil
    @MrMotwanisahil 8 месяцев назад

    Hi Rahul, I am getting error as “Not a Map or List type: interface IDataReader” Please help. Thanks.

    • @RahulRathore41
      @RahulRathore41 8 месяцев назад

      Can you please provide more details?

  • @vigneswarans5565
    @vigneswarans5565 8 месяцев назад

    I am having boundary = 'part....' in header in readyApi but in karate report it is not showing up....any idea how to bring it?

    • @RahulRathore41
      @RahulRathore41 8 месяцев назад

      Can you please provide more details?

  • @user-op6bf1zo7i
    @user-op6bf1zo7i 9 месяцев назад

    Hi Rahul, thank you for the videos. If I have a scenario outline with 4 examples (4 raws), how can I call let's say raw #3 in a different feature file (I mean reuse a specific raw/line).

    • @RahulRathore41
      @RahulRathore41 9 месяцев назад

      I don't think the karate framework provide such kind of flexibility

  • @amanshakya5561
    @amanshakya5561 9 месяцев назад

    is there any way to do the without selenium?

    • @RahulRathore41
      @RahulRathore41 9 месяцев назад

      Can you please provide more information about your scenario?

  • @AnkitSharma-xd1sf
    @AnkitSharma-xd1sf 9 месяцев назад

    This video is so helpful even after 5 years....thanks so much for making it

  • @ruchirachakranarayan2737
    @ruchirachakranarayan2737 9 месяцев назад

    Hi very nice video, thanks for sharing really useful technique. Thanks again.

  • @vigneswarans5565
    @vigneswarans5565 9 месяцев назад

    How to check whether XML response contains particular value or not!

    • @RahulRathore41
      @RahulRathore41 9 месяцев назад

      Use the XPath expressions. For example - github.com/rahulrathore44/KarateFrameworkTutorial/blob/main/src/test/java/com/api/automation/getrequest/validateXMLResponse.feature#L12

    • @Poojakumari-io1bq
      @Poojakumari-io1bq 4 месяца назад

      @@RahulRathore41 In same way can we validate XML response contains particular value or not for Post method as well?

    • @RahulRathore41
      @RahulRathore41 3 месяца назад

      @@Poojakumari-io1bq Yes you can, but you have to use karate.xpath() API

  • @ibrahimsenk
    @ibrahimsenk 9 месяцев назад

    i can't get the xml format going by this way, what is the problem?

    • @RahulRathore41
      @RahulRathore41 9 месяцев назад

      Can you please share your code snippet?