0

Retrieve count of method parameters and name of parameters in java.

public void verifyAboutUsPageUrlValidation(Integer inputNumber, Boolean expectedResult) throws Exception {
    //JavascriptExecutor js = (JavascriptExecutor) driver;
    //System.out.println((String)js.executeScript("arguments.length"));
    logger= report.startTest("verify AboutUs Page Url");
    logger.assignCategory("Rgression");

    logger.log(LogStatus.INFO, "Test start");

    System.out.println(inputNumber + " " + expectedResult);
    AboutUsPage about= new AboutUsPage(driver);
    about.CheckAboutUsPageUrlValidation(logger);    
    logger.log(LogStatus.INFO, "Test end");  
}
1
  • 4
    I think you need to add a question to this post? It's not really clear what you want. Commented Aug 11, 2016 at 9:39

1 Answer 1

1

Reflection

To get the count of parameters of a method you can use reflection, specifically Method.getTypeParameters.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.