-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02cad9d
commit b19a34c
Showing
1 changed file
with
35 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,6 @@ | |
* For any inquiry or need additional information, please contact [email protected] | ||
*******************************************************************************/ | ||
|
||
|
||
package com.qmetry.qaf.automation.step; | ||
|
||
import static com.qmetry.qaf.automation.core.ConfigurationManager.getBundle; | ||
|
@@ -463,7 +462,7 @@ public static void response_should_have_status(String status) { | |
assertThat("Response Status", new RestTestBase().getResponse().getStatus().name(), | ||
Matchers.equalToIgnoringCase(status)); | ||
} | ||
|
||
/** | ||
* This method check for the response status of web service | ||
* <p> | ||
|
@@ -480,7 +479,7 @@ public static void response_should_have_status(String status) { | |
* | ||
* @param status | ||
* : {0} : Status code, for example 200, 301 | ||
* @see Status | ||
* @see Status | ||
*/ | ||
@QAFTestStep(description = "response should have status code {statusCode}") | ||
public static void response_should_have_statuscode(int statusCode) { | ||
|
@@ -2142,11 +2141,11 @@ public static void mouseOver(String loc) { | |
* @param threshold | ||
*/ | ||
@MetaData("{'qafstep-transaction':true}") | ||
@QAFTestStep(stepName="startTransactionWithThreshold", description = "start (transaction|time-tracker) for {task-name} with {second}s threshold") | ||
@QAFTestStep(stepName = "startTransactionWithThreshold", description = "start (transaction|time-tracker) for {task-name} with {second}s threshold") | ||
public static void startTransaction(String name, int threshold) { | ||
|
||
} | ||
|
||
/** | ||
* Start time tracking which can be stopped by subsequent call to | ||
* {@link #stopTransaction()}. It will group all steps and track time. | ||
|
@@ -2165,4 +2164,35 @@ public static void stopTransaction() { | |
|
||
} | ||
|
||
/** | ||
* | ||
* @param locator | ||
* - locator of frame | ||
* @return | ||
*/ | ||
@QAFTestStep(stepName = "switchToFrame", description = "switch to frame {0}") | ||
public static Object switchToFrame(String locator) { | ||
return new WebDriverTestBase().getDriver().switchTo().frame(new QAFExtendedWebElement(locator)); | ||
} | ||
|
||
/** | ||
* switches the webdriver context to the parent frame | ||
* @return | ||
*/ | ||
@QAFTestStep(stepName = "switchToParentFrame", description = "switch to parent frame") | ||
public static Object switchToParentFrame() { | ||
return new WebDriverTestBase().getDriver().switchTo().parentFrame(); | ||
} | ||
|
||
/** | ||
* switched to the defult window. Generally used to come out of any frame | ||
* context | ||
* | ||
* @return | ||
*/ | ||
@QAFTestStep(stepName = "switchToDefaultWindow", description = "switch to default window") | ||
public static Object switchToDefaultWindow() { | ||
return new WebDriverTestBase().getDriver().switchTo().defaultContent(); | ||
} | ||
|
||
} |