Small clarification regarding Hybrid Frame Work

Hi Lakshay,

My Experience in Selenium is 3 days. I really thanks for sharing Good Knowledge base on Selenium Web Driver.

The instructions are very clear and precise.

Looking into your HybridFrameWork, I have customized framework according to my application , the only thing i was not able to locate is while parametrisation, In my excel i am having 3 records data, but while executing the testcase using Hybrid Frame Work it is not executing all the 3 rows  , ie it is executing only first row.

Can you please suggest or refer me how to parametrise ie to loop the data for all the rows to be executed using HybridFramework.

Thanks,
R Aravind

rekapalli Default Asked on December 1, 2014 in Selenium WebDriver.
Add Comment
4 Answer(s)

Thanks for the Update.

It helped me to loop all the rows in the excel.

But i have small issue

Assume we have 2 rows in excel and for first row i am getting error and the test is getting stopped with out executing the second row.

Is there any solution to run the second row also ,  if the first row gets failed .

Thanks in Advance.

Thanks,
R Aravind.

rekapalli Default Answered on December 2, 2014.
Add Comment

HI Aravind,

You need to make a use of try catch block to avoid this situation, understand the below code:


try{

//This is to run all the test in the excel

for ( 1 row to last row fo excel){
// Your complete test code

//If everything goes fine, save the test result for one row as pass

}

}catch (Exception e){

//Test Case Fail

//Save the result in the Excel sheet

//Do not throw the exception out, else your execution will stop here

}

Do not forget to close the question.

Regards,
Lakshay Sharma

xLov3rDns Professor Answered on December 2, 2014.
Add Comment

Thanks for the Quick solution

In Catch i was throwing the exception which stopped the execution after first row.

rekapalli Default Answered on December 2, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.