How to skip steps in keyword driven freamewrk | Selenium Forum
M
Posted on 12/10/2015
Hi Ashish,
In Salesforce I am trying to delete contact/lead and validating its not present in the table/list.It working fine for multiple records,
But when I have no records - its showing no records in the table as per my code but its still trying to execute the steps/keywords for scenario with 1 or more records because I have those in my keywords list.
Like In the below step sequence ,"clickOnLeadTableLink" I am validating if no records exits show the message for it,After that its moving to the next steps click,acceptAlert etc ....[b:23zasd68]Is there anyway we can ignore the other steps ?[/b:23zasd68]

clickOnLeadTableLink-
click
acceptAlert
ValidateContact

M
Replied on 21/10/2015

I'm sorry I'm not able to understand the question.


M
Replied on 21/10/2015

I am using Hybrid framework to automate salesforce.
so my qns is , in keywords-sheet suppose I have 5 steps which will work for all positive scenario if contacts/leads exist then proceed.
but in step 3 I am validating the records , if no records exists, I cannt edit or delete so I am showing a message for it , But I want to come out and dont want execute step 4 or 5.

I am not finding any way for it , my function is showing a message for no records but its still executing the remaining steps and showing nosuchelementexception which is true.

please suggest how to handle this type of scenario.


M
Replied on 02/11/2015

hi sadhana,

do you want to run selective processes?


M
Replied on 03/11/2015

Hi Sadhna,

To skip the steps, you can create a new keyword let say "SKIP_Keywords" and specify the number of steps you want to skip in your test data, and then in your driver script mention that, while going through the excel sheet if you get skip keyword, check if the previous result was pass or fail. If previous result was pass then skip the steps based on the number of steps you have mentioned in the test data else execute the steps.