Skip to content

Commit

Permalink
[webmail]
Browse files Browse the repository at this point in the history
- avoid closing browser, and thus the underlying driver, after scanning for incoming emails.

Signed-off-by: automike <[email protected]>
  • Loading branch information
mikeliucc authored and mikeliu-cvet committed May 30, 2022
1 parent 9bf66d7 commit fba7123
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/java/org/nexial/core/Nexial.java
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ protected List<ExecutionDefinition> parsePlanExecution(CommandLine cmd) throws I
// 2. parse plan file to determine number of executions (1 row per execution)
Excel excel = new Excel(testPlanFile, DEF_OPEN_EXCEL_AS_DUP, false);
List<Worksheet> plans = retrieveValidPlans(subplans, excel);
ConsoleUtils.log(FOUND_PLANS + testPlanFile + ": " + System.getProperty(SUBPLANS_INCLUDED));
ConsoleUtils.log(FOUND_PLANS + testPlanFile + ": " +
System.getProperty(SUBPLANS_INCLUDED, "all subplans included"));

Map<File, List<String>> scriptToScenarioCache = new HashMap<>();
List<File> dataFileCache = new ArrayList<>();
Expand Down
5 changes: 3 additions & 2 deletions src/main/kotlin/org/nexial/core/plugins/web/Mailinator.kt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ class Mailinator : WebMailer() {
} else
context.findPlugin("web") as WebCommand

val currentProfile = web.profile
web.switchBrowser(MAILINATOR_BROWSER_PROFILE, BROWSER_CONFIG)
openEmailListingPage(web, profile)

Expand All @@ -116,8 +117,8 @@ class Mailinator : WebMailer() {
val search = normalizeXpathText(searchCriteria.trim())
val emailRowLocator = String.format(locators.matchedEmail, indexSubject + 2, search)
val emailIds = web.getAttributeValues(emailRowLocator, "id").map { it.trim() }.toList()
web.closeAll()
web.switchBrowser("", "")
// web.close()
web.switchBrowser(currentProfile, "")
return emailIds
}

Expand Down

0 comments on commit fba7123

Please sign in to comment.