Forum Discussion
It's better if you can show us specific code and how you are running this with TestComplete.
ok so for example :
Fonctionnalité: workflow de connexion recherche et déconnexion
Plan du scénario: A description of your business scenario
Etant donné que Je suis sur la page de connexion de la "<plateforme>"
Quand Je renseigne mon login "<Login>"
Et Je renseigne mon mot de passe "<mdp>"
Exemples: |plateforme |Login |mdp | | FirstDataSet.com|aLogin|aMdp| | SecondDataSet.com|aLogin|aMdp| BeforeScenario(function () { Browsers.Item(btChrome).Run() // Sys.Browser().BrowserWindow(0).Keys("^n"); Sys.Browser().BrowserWindow(0).Maximize(); }) AfterScenario(function () { Sys.Browser().Close(); }) Given("Je suis sur la page de connexion de la {arg}", function (url){ this.url = url; try { //Renseigne le lien de la plateforme Browsers.Item(btChrome).Navigate(this.url + '/externe'); //Vérifie que la page de connexion est bien affichée Sys.Browser("*").Page('https://' + url + '/auth/login').QuerySelector("div h1"); Log.Checkpoint("PASS: Login page is displayed", "", pmHighest, null, Sys.Desktop); } catch (e) { Log.Error("FAIL: Cannot display the login page"); } }); When("Je renseigne mon login {arg}", function (login){ try { Sys.Browser("*").Page("*").QuerySelector('input[name="logineu"]').SetText(login); Log.Checkpoint("PASS: login input", "", pmHighest, null, Sys.Desktop); } catch (e) { failedStep = 'style'; Log.Error("FAIL: Cannot find 'name' text input"); } }); When("Je renseigne mon mot de passe {arg}", function (mdp){ try { Sys.Browser("*").Page("*").QuerySelector('input[name="password"]').setText(mdp); Log.Checkpoint("PASS: password input", "", pmHighest, null, Sys.Desktop); } catch (e) { // Posts an exception message to the test log Log.Error("FAIL: Cannot find 'password' text input"); } });
So for exemple in that code, if the login step fail, I would like to skip the password step to go directly in the AfterScenario and to continue directly to the next data set in my scenario outline tab, instead of executing all steps in the scenario of my first data set after the failing step.
And simply running this by running my feature file.
- Wamboo6 years agoCommunity Hero
Hi,
Examples:
|param 1|
|scenario 1|
|scenario 2|
|scenario 3|
What Do You mean by this syntax? You are running this outside TestComplete Project?
- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
- TanyaYatskovska6 years agoSmartBear Alumni (Retired)
Related Content
- 4 years ago
Recent Discussions
- 7 hours ago