repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/DatePicker.java | DatePicker.setDate | public void setDate(String date) {
if (date == null || date.trim().isEmpty()) {
throw new IllegalArgumentException("Date cannot be null or empty.");
}
try {
Date dateToSet = new SimpleDateFormat("MM/dd/yyyy").parse(date);
Calendar to = Calendar.getInstance();
... | java | public void setDate(String date) {
if (date == null || date.trim().isEmpty()) {
throw new IllegalArgumentException("Date cannot be null or empty.");
}
try {
Date dateToSet = new SimpleDateFormat("MM/dd/yyyy").parse(date);
Calendar to = Calendar.getInstance();
... | [
"public",
"void",
"setDate",
"(",
"String",
"date",
")",
"{",
"if",
"(",
"date",
"==",
"null",
"||",
"date",
".",
"trim",
"(",
")",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Date cannot be null or empty.\"",
")... | This function set the date on the DatePicker using the input paramter in the format of "MM.dd.yyyy" string
@param date
string input date format of "MM/dd/yyyy" | [
"This",
"function",
"set",
"the",
"date",
"on",
"the",
"DatePicker",
"using",
"the",
"input",
"paramter",
"in",
"the",
"format",
"of",
"MM",
".",
"dd",
".",
"yyyy",
"string"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/DatePicker.java#L230-L242 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/DatePicker.java | DatePicker.datePickerInit | public void datePickerInit(String prevMonthLocator, String nextMonthLocator, String dateTextLocator) {
this.prevMonthLocator = prevMonthLocator;
this.nextMonthLocator = nextMonthLocator;
this.dateTextLocator = dateTextLocator;
} | java | public void datePickerInit(String prevMonthLocator, String nextMonthLocator, String dateTextLocator) {
this.prevMonthLocator = prevMonthLocator;
this.nextMonthLocator = nextMonthLocator;
this.dateTextLocator = dateTextLocator;
} | [
"public",
"void",
"datePickerInit",
"(",
"String",
"prevMonthLocator",
",",
"String",
"nextMonthLocator",
",",
"String",
"dateTextLocator",
")",
"{",
"this",
".",
"prevMonthLocator",
"=",
"prevMonthLocator",
";",
"this",
".",
"nextMonthLocator",
"=",
"nextMonthLocator... | DatePicker comes with default locators for widget controls previous button, next button, and date text. This
method gives access to override these default locators.
@param prevMonthLocator
calendar widget prev month
@param nextMonthLocator
calendar widget next month
@param dateTextLocator
calendar widget month and yea... | [
"DatePicker",
"comes",
"with",
"default",
"locators",
"for",
"widget",
"controls",
"previous",
"button",
"next",
"button",
"and",
"date",
"text",
".",
"This",
"method",
"gives",
"access",
"to",
"override",
"these",
"default",
"locators",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/DatePicker.java#L311-L315 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/DatePicker.java | DatePicker.reset | public void reset() {
this.getElement().clear();
Grid.driver().findElement(By.tagName("body")).click();
this.calendar = Calendar.getInstance();
this.getElement().click();
} | java | public void reset() {
this.getElement().clear();
Grid.driver().findElement(By.tagName("body")).click();
this.calendar = Calendar.getInstance();
this.getElement().click();
} | [
"public",
"void",
"reset",
"(",
")",
"{",
"this",
".",
"getElement",
"(",
")",
".",
"clear",
"(",
")",
";",
"Grid",
".",
"driver",
"(",
")",
".",
"findElement",
"(",
"By",
".",
"tagName",
"(",
"\"body\"",
")",
")",
".",
"click",
"(",
")",
";",
... | Clears the date picker. Some browsers require clicking on an element outside of the date picker field to properly
reset the calendar to today's date. | [
"Clears",
"the",
"date",
"picker",
".",
"Some",
"browsers",
"require",
"clicking",
"on",
"an",
"element",
"outside",
"of",
"the",
"date",
"picker",
"field",
"to",
"properly",
"reset",
"the",
"calendar",
"to",
"today",
"s",
"date",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/DatePicker.java#L321-L326 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractContainer.java | AbstractContainer.size | public int size() {
int size = 0;
try {
if (getParent() != null) {
size = getParent().locateChildElements(getLocator()).size();
} else {
size = HtmlElementUtils.locateElements(getLocator()).size();
}
} catch (NoSuchElementExcept... | java | public int size() {
int size = 0;
try {
if (getParent() != null) {
size = getParent().locateChildElements(getLocator()).size();
} else {
size = HtmlElementUtils.locateElements(getLocator()).size();
}
} catch (NoSuchElementExcept... | [
"public",
"int",
"size",
"(",
")",
"{",
"int",
"size",
"=",
"0",
";",
"try",
"{",
"if",
"(",
"getParent",
"(",
")",
"!=",
"null",
")",
"{",
"size",
"=",
"getParent",
"(",
")",
".",
"locateChildElements",
"(",
"getLocator",
"(",
")",
")",
".",
"si... | Returns the number of containers found on the page.
@return the number of containers found on the page | [
"Returns",
"the",
"number",
"of",
"containers",
"found",
"on",
"the",
"page",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractContainer.java#L278-L291 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractContainer.java | AbstractContainer.locateElement | public WebElement locateElement(int index, String childLocator) {
if (index < 0) {
throw new IllegalArgumentException("index cannot be a negative value");
}
setIndex(index);
WebElement locatedElement = null;
if (getParent() != null) {
locatedElement = getP... | java | public WebElement locateElement(int index, String childLocator) {
if (index < 0) {
throw new IllegalArgumentException("index cannot be a negative value");
}
setIndex(index);
WebElement locatedElement = null;
if (getParent() != null) {
locatedElement = getP... | [
"public",
"WebElement",
"locateElement",
"(",
"int",
"index",
",",
"String",
"childLocator",
")",
"{",
"if",
"(",
"index",
"<",
"0",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"index cannot be a negative value\"",
")",
";",
"}",
"setIndex",
"("... | Sets the container index and searches for the descendant element using the child locator.
@param index
index of the container element to search on
@param childLocator
locator of the child element within the container
@return child WebElement found using child locator at the indexed container | [
"Sets",
"the",
"container",
"index",
"and",
"searches",
"for",
"the",
"descendant",
"element",
"using",
"the",
"child",
"locator",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractContainer.java#L302-L314 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java | ReflectionUtils.instantiatePrimitiveArray | public static Object instantiatePrimitiveArray(Class<?> type, String[] values) {
logger.entering(new Object[] { type, values });
validateParams(type, values);
checkArgument(isPrimitiveArray(type), type + " is NOT a primitive array type.");
Class<?> componentType = type.getComponentType... | java | public static Object instantiatePrimitiveArray(Class<?> type, String[] values) {
logger.entering(new Object[] { type, values });
validateParams(type, values);
checkArgument(isPrimitiveArray(type), type + " is NOT a primitive array type.");
Class<?> componentType = type.getComponentType... | [
"public",
"static",
"Object",
"instantiatePrimitiveArray",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"String",
"[",
"]",
"values",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"type",
",",
"values",
"}",
")",
";",
"validate... | This helper method facilitates creation of primitive arrays and pre-populates them with the set of String values
provided.
@param type
The type of the array to create. Note that this method will only accept primitive types (as the name
suggests) i.e., only int[],float[], boolean[] and so on.
@param values
A {@link Str... | [
"This",
"helper",
"method",
"facilitates",
"creation",
"of",
"primitive",
"arrays",
"and",
"pre",
"-",
"populates",
"them",
"with",
"the",
"set",
"of",
"String",
"values",
"provided",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java#L161-L180 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java | ReflectionUtils.instantiatePrimitiveObject | public static Object instantiatePrimitiveObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) {
logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign });
validateParams(type, objectToInvokeUpon, valueToAssign);
checkArgument(type.isPrimitive(), type + " is NOT... | java | public static Object instantiatePrimitiveObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) {
logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign });
validateParams(type, objectToInvokeUpon, valueToAssign);
checkArgument(type.isPrimitive(), type + " is NOT... | [
"public",
"static",
"Object",
"instantiatePrimitiveObject",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"Object",
"objectToInvokeUpon",
",",
"String",
"valueToAssign",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"type",
",",
"obje... | This helper method facilitates creation of primitive data type object and initialize it with the provided value.
@param type
The type to instantiate. It has to be only a primitive data type [ such as int, float, boolean
etc.,]
@param objectToInvokeUpon
The object upon which the invocation is to be carried out.
@param ... | [
"This",
"helper",
"method",
"facilitates",
"creation",
"of",
"primitive",
"data",
"type",
"object",
"and",
"initialize",
"it",
"with",
"the",
"provided",
"value",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java#L194-L207 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java | ReflectionUtils.instantiateWrapperObject | public static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) {
logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign });
validateParams(type, objectToInvokeUpon, valueToAssign);
checkArgument(ClassUtils.isPrimitiveWrapper(type), ... | java | public static Object instantiateWrapperObject(Class<?> type, Object objectToInvokeUpon, String valueToAssign) {
logger.entering(new Object[] { type, objectToInvokeUpon, valueToAssign });
validateParams(type, objectToInvokeUpon, valueToAssign);
checkArgument(ClassUtils.isPrimitiveWrapper(type), ... | [
"public",
"static",
"Object",
"instantiateWrapperObject",
"(",
"Class",
"<",
"?",
">",
"type",
",",
"Object",
"objectToInvokeUpon",
",",
"String",
"valueToAssign",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"type",
",",
"object... | This helper method facilitates creation of Wrapper data type object and initialize it with the provided value.
@param type
The type to instantiate. It has to be only a Wrapper data type [ such as Integer, Float, Boolean
etc.,]
@param objectToInvokeUpon
The object upon which the invocation is to be carried out.
@param ... | [
"This",
"helper",
"method",
"facilitates",
"creation",
"of",
"Wrapper",
"data",
"type",
"object",
"and",
"initialize",
"it",
"with",
"the",
"provided",
"value",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ReflectionUtils.java#L254-L268 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java | AbstractBaseProcessLauncher.startProcess | void startProcess(boolean squelch) throws IOException {
LOGGER.entering(squelch);
if (!squelch) {
LOGGER.fine("Executing command " + cmdLine.toString());
}
watchdog.reset();
DefaultExecutor executor = new DefaultExecutor();
executor.setWatchdog(watchdog);
... | java | void startProcess(boolean squelch) throws IOException {
LOGGER.entering(squelch);
if (!squelch) {
LOGGER.fine("Executing command " + cmdLine.toString());
}
watchdog.reset();
DefaultExecutor executor = new DefaultExecutor();
executor.setWatchdog(watchdog);
... | [
"void",
"startProcess",
"(",
"boolean",
"squelch",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"entering",
"(",
"squelch",
")",
";",
"if",
"(",
"!",
"squelch",
")",
"{",
"LOGGER",
".",
"fine",
"(",
"\"Executing command \"",
"+",
"cmdLine",
".",
"toSt... | Start a process based on the commands provided.
@param squelch
Whether to show command executed as a logger.info message
@throws IOException | [
"Start",
"a",
"process",
"based",
"on",
"the",
"commands",
"provided",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java#L270-L286 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java | AbstractBaseProcessLauncher.getJavaClassPathArguments | String[] getJavaClassPathArguments(String jarNamePrefix, String mainClass) {
LOGGER.entering();
Set<String> uniqueClassPathEntries = new LinkedHashSet<>();
// find all jars in the SELION_HOME_DIR
if (getLauncherOptions().isIncludeJarsInSeLionHomeDir()) {
Collection<File> hom... | java | String[] getJavaClassPathArguments(String jarNamePrefix, String mainClass) {
LOGGER.entering();
Set<String> uniqueClassPathEntries = new LinkedHashSet<>();
// find all jars in the SELION_HOME_DIR
if (getLauncherOptions().isIncludeJarsInSeLionHomeDir()) {
Collection<File> hom... | [
"String",
"[",
"]",
"getJavaClassPathArguments",
"(",
"String",
"jarNamePrefix",
",",
"String",
"mainClass",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"Set",
"<",
"String",
">",
"uniqueClassPathEntries",
"=",
"new",
"LinkedHashSet",
"<>",
"(",
")",
... | Get the classpath for the child process. Determines all jars from CWD and SELION_HOME_DIR. Does not recurse into
sub directories. Filters out duplicates.
@param jarNamePrefix
when adding jars from the {@link SeLionConstants#SELION_HOME_DIR}, only consider jars whose names
start with this prefix. If <code>null</code>, ... | [
"Get",
"the",
"classpath",
"for",
"the",
"child",
"process",
".",
"Determines",
"all",
"jars",
"from",
"CWD",
"and",
"SELION_HOME_DIR",
".",
"Does",
"not",
"recurse",
"into",
"sub",
"directories",
".",
"Filters",
"out",
"duplicates",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java#L372-L415 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java | AbstractBaseProcessLauncher.getJavaSystemPropertiesArguments | String[] getJavaSystemPropertiesArguments() throws IOException {
LOGGER.entering();
List<String> args = new LinkedList<>();
// Next, FWD all JVM -D args to the child process
args.addAll(Arrays.asList(getPresentJavaSystemPropertiesArguments()));
// Setup logging for child proces... | java | String[] getJavaSystemPropertiesArguments() throws IOException {
LOGGER.entering();
List<String> args = new LinkedList<>();
// Next, FWD all JVM -D args to the child process
args.addAll(Arrays.asList(getPresentJavaSystemPropertiesArguments()));
// Setup logging for child proces... | [
"String",
"[",
"]",
"getJavaSystemPropertiesArguments",
"(",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"List",
"<",
"String",
">",
"args",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"// Next, FWD all JVM -D args to the chil... | Get required system properties to launch the sub process
@return an array of {@link String} which represents the System properties to pass
@throws IOException | [
"Get",
"required",
"system",
"properties",
"to",
"launch",
"the",
"sub",
"process"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseProcessLauncher.java#L423-L435 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/JsonDataProviderImpl.java | JsonDataProviderImpl.getDataByFilter | @Override
public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) {
Preconditions.checkArgument(resource != null, "File resource cannot be null");
logger.entering(dataFilter);
Class<?> arrayType;
JsonReader reader = null;
try {
reader = new JsonRe... | java | @Override
public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) {
Preconditions.checkArgument(resource != null, "File resource cannot be null");
logger.entering(dataFilter);
Class<?> arrayType;
JsonReader reader = null;
try {
reader = new JsonRe... | [
"@",
"Override",
"public",
"Iterator",
"<",
"Object",
"[",
"]",
">",
"getDataByFilter",
"(",
"DataProviderFilter",
"dataFilter",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"resource",
"!=",
"null",
",",
"\"File resource cannot be null\"",
")",
";",
"log... | Gets JSON data from a resource by applying the given filter.
@param dataFilter
an implementation class of {@link DataProviderFilter} | [
"Gets",
"JSON",
"data",
"from",
"a",
"resource",
"by",
"applying",
"the",
"given",
"filter",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/JsonDataProviderImpl.java#L184-L201 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/JsonDataProviderImpl.java | JsonDataProviderImpl.getDataAsHashtable | @Override
public Hashtable<String, Object> getDataAsHashtable() {
Preconditions.checkArgument(resource != null, "File resource cannot be null");
logger.entering();
// Over-writing the resource because there is a possibility that a user
// can give a type
resource.setCls(Hasht... | java | @Override
public Hashtable<String, Object> getDataAsHashtable() {
Preconditions.checkArgument(resource != null, "File resource cannot be null");
logger.entering();
// Over-writing the resource because there is a possibility that a user
// can give a type
resource.setCls(Hasht... | [
"@",
"Override",
"public",
"Hashtable",
"<",
"String",
",",
"Object",
">",
"getDataAsHashtable",
"(",
")",
"{",
"Preconditions",
".",
"checkArgument",
"(",
"resource",
"!=",
"null",
",",
"\"File resource cannot be null\"",
")",
";",
"logger",
".",
"entering",
"(... | A utility method to give out JSON data as HashTable. Please note this method works on the rule that the json
object that needs to be parsed MUST contain a key named "id".
<pre>
[
{
<b>"id":</b>"test1",
"password":123456,
"accountNumber":9999999999,
"amount":80000,
"areaCode":[{ "areaCode" :"area3"},
{ "areaCode" :"are... | [
"A",
"utility",
"method",
"to",
"give",
"out",
"JSON",
"data",
"as",
"HashTable",
".",
"Please",
"note",
"this",
"method",
"works",
"on",
"the",
"rule",
"that",
"the",
"json",
"object",
"that",
"needs",
"to",
"be",
"parsed",
"MUST",
"contain",
"a",
"key"... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/JsonDataProviderImpl.java#L230-L270 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/html/HtmlReporterListener.java | HtmlReporterListener.startHtml | protected void startHtml(PrintWriter out) {
logger.entering(out);
try {
Template t = ve.getTemplate("/templates/header.part.html");
VelocityContext context = new VelocityContext();
StringBuilder output = new StringBuilder();
for (Entry<String, String> tem... | java | protected void startHtml(PrintWriter out) {
logger.entering(out);
try {
Template t = ve.getTemplate("/templates/header.part.html");
VelocityContext context = new VelocityContext();
StringBuilder output = new StringBuilder();
for (Entry<String, String> tem... | [
"protected",
"void",
"startHtml",
"(",
"PrintWriter",
"out",
")",
"{",
"logger",
".",
"entering",
"(",
"out",
")",
";",
"try",
"{",
"Template",
"t",
"=",
"ve",
".",
"getTemplate",
"(",
"\"/templates/header.part.html\"",
")",
";",
"VelocityContext",
"context",
... | Starts HTML stream | [
"Starts",
"HTML",
"stream"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/html/HtmlReporterListener.java#L500-L522 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/JarSpawner.java | JarSpawner.printUsageInfo | void printUsageInfo() {
StringBuilder usage = new StringBuilder();
usage.append(" System Properties: \n");
usage.append(" -DselionHome=<folderPath>: \n");
usage.append(" Path of SeLion home directory. Defaults to <user.home>/.selion2/ \n");
usage.append(" -D[property... | java | void printUsageInfo() {
StringBuilder usage = new StringBuilder();
usage.append(" System Properties: \n");
usage.append(" -DselionHome=<folderPath>: \n");
usage.append(" Path of SeLion home directory. Defaults to <user.home>/.selion2/ \n");
usage.append(" -D[property... | [
"void",
"printUsageInfo",
"(",
")",
"{",
"StringBuilder",
"usage",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"usage",
".",
"append",
"(",
"\" System Properties: \\n\"",
")",
";",
"usage",
".",
"append",
"(",
"\" -DselionHome=<folderPath>: \\n\"",
")",
";",
... | Print the usage of SeLion Grid jar | [
"Print",
"the",
"usage",
"of",
"SeLion",
"Grid",
"jar"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/JarSpawner.java#L52-L61 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/Label.java | Label.isTextPresent | public boolean isTextPresent(String pattern) {
String text = getElement().getText();
return (text != null && (text.contains(pattern) || text.matches(pattern)));
} | java | public boolean isTextPresent(String pattern) {
String text = getElement().getText();
return (text != null && (text.contains(pattern) || text.matches(pattern)));
} | [
"public",
"boolean",
"isTextPresent",
"(",
"String",
"pattern",
")",
"{",
"String",
"text",
"=",
"getElement",
"(",
")",
".",
"getText",
"(",
")",
";",
"return",
"(",
"text",
"!=",
"null",
"&&",
"(",
"text",
".",
"contains",
"(",
"pattern",
")",
"||",
... | It is to check whether the element's text matches with the specified pattern.
@param pattern
regular expression
@return boolean <b>true</b> - the element's text matches with the pattern. <br>
<b>false</b> the element's text doesn't match with the pattern. | [
"It",
"is",
"to",
"check",
"whether",
"the",
"element",
"s",
"text",
"matches",
"with",
"the",
"specified",
"pattern",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Label.java#L94-L97 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/reports/runtime/SeLionReporter.java | SeLionReporter.log | public static void log(String message, boolean takeScreenshot, boolean saveSrc) {
SeLionReporter reporter = new SeLionReporter();
BaseLog currentLog = new BaseLog();
currentLog.setMsg(message);
currentLog.setLocation(Gatherer.saveGetLocation(Grid.driver()));
reporter.setCurrentLo... | java | public static void log(String message, boolean takeScreenshot, boolean saveSrc) {
SeLionReporter reporter = new SeLionReporter();
BaseLog currentLog = new BaseLog();
currentLog.setMsg(message);
currentLog.setLocation(Gatherer.saveGetLocation(Grid.driver()));
reporter.setCurrentLo... | [
"public",
"static",
"void",
"log",
"(",
"String",
"message",
",",
"boolean",
"takeScreenshot",
",",
"boolean",
"saveSrc",
")",
"{",
"SeLionReporter",
"reporter",
"=",
"new",
"SeLionReporter",
"(",
")",
";",
"BaseLog",
"currentLog",
"=",
"new",
"BaseLog",
"(",
... | Generates log entry with message provided
@param message
Entry description
@param takeScreenshot
Take a screenshot <code>true/false</code>. Requires an active {@link Grid} session.
@param saveSrc
Save the current page source <code>true/false</code>. Requires an active {@link Grid} session. | [
"Generates",
"log",
"entry",
"with",
"message",
"provided"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/reports/runtime/SeLionReporter.java#L178-L186 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/node/servlets/ProcessShutdownHandler.java | ProcessShutdownHandler.shutdownProcesses | public void shutdownProcesses() throws ProcessHandlerException {
LOGGER.info("Shutting down all our node processes.");
ProcessHandler handler = ProcessHandlerFactory.createInstance();
List<ProcessInfo> processes = handler.potentialProcessToBeKilled();
handler.killProcess(processes);
... | java | public void shutdownProcesses() throws ProcessHandlerException {
LOGGER.info("Shutting down all our node processes.");
ProcessHandler handler = ProcessHandlerFactory.createInstance();
List<ProcessInfo> processes = handler.potentialProcessToBeKilled();
handler.killProcess(processes);
... | [
"public",
"void",
"shutdownProcesses",
"(",
")",
"throws",
"ProcessHandlerException",
"{",
"LOGGER",
".",
"info",
"(",
"\"Shutting down all our node processes.\"",
")",
";",
"ProcessHandler",
"handler",
"=",
"ProcessHandlerFactory",
".",
"createInstance",
"(",
")",
";",... | This method terminates all Node processes that we started. | [
"This",
"method",
"terminates",
"all",
"Node",
"processes",
"that",
"we",
"started",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/node/servlets/ProcessShutdownHandler.java#L38-L46 | train |
paypal/SeLion | selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java | SeLionSelendroidDriver.scrollLeft | public void scrollLeft() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeLeft(webElement);
logger.exiting();
} | java | public void scrollLeft() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeLeft(webElement);
logger.exiting();
} | [
"public",
"void",
"scrollLeft",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"WebElement",
"webElement",
"=",
"this",
".",
"findElement",
"(",
"By",
".",
"className",
"(",
"SCROLLVIEW_CLASS",
")",
")",
";",
"swipeLeft",
"(",
"webElement",
")",
... | Scroll the screen to the left. The underlying application should have atleast one scroll view belonging to the
class 'android.widget.ScrollView'. | [
"Scroll",
"the",
"screen",
"to",
"the",
"left",
".",
"The",
"underlying",
"application",
"should",
"have",
"atleast",
"one",
"scroll",
"view",
"belonging",
"to",
"the",
"class",
"android",
".",
"widget",
".",
"ScrollView",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java#L216-L221 | train |
paypal/SeLion | selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java | SeLionSelendroidDriver.scrollRight | public void scrollRight() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeRight(webElement);
logger.exiting();
} | java | public void scrollRight() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeRight(webElement);
logger.exiting();
} | [
"public",
"void",
"scrollRight",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"WebElement",
"webElement",
"=",
"this",
".",
"findElement",
"(",
"By",
".",
"className",
"(",
"SCROLLVIEW_CLASS",
")",
")",
";",
"swipeRight",
"(",
"webElement",
")"... | Scroll the screen to the right. The underlying application should have atleast one scroll view belonging to the
class 'android.widget.ScrollView'. | [
"Scroll",
"the",
"screen",
"to",
"the",
"right",
".",
"The",
"underlying",
"application",
"should",
"have",
"atleast",
"one",
"scroll",
"view",
"belonging",
"to",
"the",
"class",
"android",
".",
"widget",
".",
"ScrollView",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java#L227-L232 | train |
paypal/SeLion | selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java | SeLionSelendroidDriver.scrollUp | public void scrollUp() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeUp(webElement);
logger.exiting();
} | java | public void scrollUp() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeUp(webElement);
logger.exiting();
} | [
"public",
"void",
"scrollUp",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"WebElement",
"webElement",
"=",
"this",
".",
"findElement",
"(",
"By",
".",
"className",
"(",
"SCROLLVIEW_CLASS",
")",
")",
";",
"swipeUp",
"(",
"webElement",
")",
";... | Scroll the screen up. The underlying application should have atleast one scroll view belonging to the class
'android.widget.ScrollView'. | [
"Scroll",
"the",
"screen",
"up",
".",
"The",
"underlying",
"application",
"should",
"have",
"atleast",
"one",
"scroll",
"view",
"belonging",
"to",
"the",
"class",
"android",
".",
"widget",
".",
"ScrollView",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java#L238-L243 | train |
paypal/SeLion | selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java | SeLionSelendroidDriver.scrollDown | public void scrollDown() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeDown(webElement);
logger.exiting();
} | java | public void scrollDown() {
logger.entering();
WebElement webElement = this.findElement(By.className(SCROLLVIEW_CLASS));
swipeDown(webElement);
logger.exiting();
} | [
"public",
"void",
"scrollDown",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"WebElement",
"webElement",
"=",
"this",
".",
"findElement",
"(",
"By",
".",
"className",
"(",
"SCROLLVIEW_CLASS",
")",
")",
";",
"swipeDown",
"(",
"webElement",
")",
... | Scroll the screen down. The underlying application should have atleast one scroll view belonging to the class
'android.widget.ScrollView'. | [
"Scroll",
"the",
"screen",
"down",
".",
"The",
"underlying",
"application",
"should",
"have",
"atleast",
"one",
"scroll",
"view",
"belonging",
"to",
"the",
"class",
"android",
".",
"widget",
".",
"ScrollView",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/selendroid-provider/src/main/java/com/paypal/selion/selendroid/platform/grid/SeLionSelendroidDriver.java#L249-L254 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/pojos/BrowserStatisticsCollection.java | BrowserStatisticsCollection.setMaxBrowserInstances | public void setMaxBrowserInstances(String browserName, int maxBrowserInstances) {
logger.entering(new Object[] { browserName, maxBrowserInstances });
validateBrowserName(browserName);
BrowserStatistics lStatistics = createStatisticsIfNotPresent(browserName);
lStatistics.setMaxBrowserInst... | java | public void setMaxBrowserInstances(String browserName, int maxBrowserInstances) {
logger.entering(new Object[] { browserName, maxBrowserInstances });
validateBrowserName(browserName);
BrowserStatistics lStatistics = createStatisticsIfNotPresent(browserName);
lStatistics.setMaxBrowserInst... | [
"public",
"void",
"setMaxBrowserInstances",
"(",
"String",
"browserName",
",",
"int",
"maxBrowserInstances",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"browserName",
",",
"maxBrowserInstances",
"}",
")",
";",
"validateBrowserName",
... | Sets the maximum instances for a particular browser. This call creates a unique statistics for the provided
browser name it does not exists.
@param browserName
Name of the browser.
@param maxBrowserInstances
Maximum instances of the browser. | [
"Sets",
"the",
"maximum",
"instances",
"for",
"a",
"particular",
"browser",
".",
"This",
"call",
"creates",
"a",
"unique",
"statistics",
"for",
"the",
"provided",
"browser",
"name",
"it",
"does",
"not",
"exists",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/pojos/BrowserStatisticsCollection.java#L61-L67 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/pojos/BrowserStatisticsCollection.java | BrowserStatisticsCollection.incrementWaitingRequests | public void incrementWaitingRequests(String browserName) {
logger.entering(browserName);
validateBrowserName(browserName);
BrowserStatistics lStatistics = createStatisticsIfNotPresent(browserName);
lStatistics.incrementWaitingRequests();
logger.exiting();
} | java | public void incrementWaitingRequests(String browserName) {
logger.entering(browserName);
validateBrowserName(browserName);
BrowserStatistics lStatistics = createStatisticsIfNotPresent(browserName);
lStatistics.incrementWaitingRequests();
logger.exiting();
} | [
"public",
"void",
"incrementWaitingRequests",
"(",
"String",
"browserName",
")",
"{",
"logger",
".",
"entering",
"(",
"browserName",
")",
";",
"validateBrowserName",
"(",
"browserName",
")",
";",
"BrowserStatistics",
"lStatistics",
"=",
"createStatisticsIfNotPresent",
... | Increments the waiting request for the provided browser name. This call creates a unique statistics for the
provided browser name it does not exists.
@param browserName
Name of the browser. | [
"Increments",
"the",
"waiting",
"request",
"for",
"the",
"provided",
"browser",
"name",
".",
"This",
"call",
"creates",
"a",
"unique",
"statistics",
"for",
"the",
"provided",
"browser",
"name",
"it",
"does",
"not",
"exists",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/pojos/BrowserStatisticsCollection.java#L76-L82 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/ConfigManager.java | ConfigManager.printConfiguration | public static synchronized void printConfiguration(String testName) {
LocalConfig currentConfig = getConfig(testName);
currentConfig.printConfigValues(testName);
} | java | public static synchronized void printConfiguration(String testName) {
LocalConfig currentConfig = getConfig(testName);
currentConfig.printConfigValues(testName);
} | [
"public",
"static",
"synchronized",
"void",
"printConfiguration",
"(",
"String",
"testName",
")",
"{",
"LocalConfig",
"currentConfig",
"=",
"getConfig",
"(",
"testName",
")",
";",
"currentConfig",
".",
"printConfigValues",
"(",
"testName",
")",
";",
"}"
] | A utility method that can dump the configuration for a given <test> identified with its name.
@param testName
- The name of the test as given in the suite xml file. | [
"A",
"utility",
"method",
"that",
"can",
"dump",
"the",
"configuration",
"for",
"a",
"given",
"<",
";",
"test>",
";",
"identified",
"with",
"its",
"name",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/ConfigManager.java#L135-L138 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java | AbstractElement.getElement | public RemoteWebElement getElement() {
RemoteWebElement foundElement = null;
try {
if (parent == null) {
foundElement = HtmlElementUtils.locateElement(getLocator());
} else {
foundElement = parent.locateChildElement(locator);
}
... | java | public RemoteWebElement getElement() {
RemoteWebElement foundElement = null;
try {
if (parent == null) {
foundElement = HtmlElementUtils.locateElement(getLocator());
} else {
foundElement = parent.locateChildElement(locator);
}
... | [
"public",
"RemoteWebElement",
"getElement",
"(",
")",
"{",
"RemoteWebElement",
"foundElement",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"foundElement",
"=",
"HtmlElementUtils",
".",
"locateElement",
"(",
"getLocator",
"(",
")"... | Instance method used to call static class method locateElement.
@return the web element found by locator | [
"Instance",
"method",
"used",
"to",
"call",
"static",
"class",
"method",
"locateElement",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java#L101-L116 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java | AbstractElement.getElements | public List<WebElement> getElements() {
List<WebElement> foundElements = null;
try {
if (parent == null) {
foundElements = HtmlElementUtils.locateElements(getLocator());
} else {
foundElements = parent.locateChildElements(getLocator());
... | java | public List<WebElement> getElements() {
List<WebElement> foundElements = null;
try {
if (parent == null) {
foundElements = HtmlElementUtils.locateElements(getLocator());
} else {
foundElements = parent.locateChildElements(getLocator());
... | [
"public",
"List",
"<",
"WebElement",
">",
"getElements",
"(",
")",
"{",
"List",
"<",
"WebElement",
">",
"foundElements",
"=",
"null",
";",
"try",
"{",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"foundElements",
"=",
"HtmlElementUtils",
".",
"locateElemen... | Instance method used to call static class method locateElements.
@return the list of web elements found by locator | [
"Instance",
"method",
"used",
"to",
"call",
"static",
"class",
"method",
"locateElements",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java#L123-L136 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java | AbstractElement.addInfoForNoSuchElementException | private void addInfoForNoSuchElementException(NoSuchElementException cause) {
if (parent == null) {
throw cause;
}
BasicPageImpl page = this.parent.getCurrentPage();
if (page == null) {
throw cause;
}
String resolvedPageName = page.getClass().ge... | java | private void addInfoForNoSuchElementException(NoSuchElementException cause) {
if (parent == null) {
throw cause;
}
BasicPageImpl page = this.parent.getCurrentPage();
if (page == null) {
throw cause;
}
String resolvedPageName = page.getClass().ge... | [
"private",
"void",
"addInfoForNoSuchElementException",
"(",
"NoSuchElementException",
"cause",
")",
"{",
"if",
"(",
"parent",
"==",
"null",
")",
"{",
"throw",
"cause",
";",
"}",
"BasicPageImpl",
"page",
"=",
"this",
".",
"parent",
".",
"getCurrentPage",
"(",
"... | A utility method to provide additional information to the user when a NoSuchElementException is thrown.
@param cause
The associated cause for the exception. | [
"A",
"utility",
"method",
"to",
"provide",
"additional",
"information",
"to",
"the",
"user",
"when",
"a",
"NoSuchElementException",
"is",
"thrown",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java#L144-L180 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java | AbstractElement.clickAndExpect | public Object clickAndExpect(ExpectedCondition<?> expectedCondition) {
dispatcher.beforeClick(this, expectedCondition);
getElement().click();
if (Boolean.parseBoolean(Config.getConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING))) {
logUIAction(UIActions.CLICKED);
}
if... | java | public Object clickAndExpect(ExpectedCondition<?> expectedCondition) {
dispatcher.beforeClick(this, expectedCondition);
getElement().click();
if (Boolean.parseBoolean(Config.getConfigProperty(ConfigProperty.ENABLE_GUI_LOGGING))) {
logUIAction(UIActions.CLICKED);
}
if... | [
"public",
"Object",
"clickAndExpect",
"(",
"ExpectedCondition",
"<",
"?",
">",
"expectedCondition",
")",
"{",
"dispatcher",
".",
"beforeClick",
"(",
"this",
",",
"expectedCondition",
")",
";",
"getElement",
"(",
")",
".",
"click",
"(",
")",
";",
"if",
"(",
... | The click function and wait based on the ExpectedCondition.
@param expectedCondition
ExpectedCondition<?> instance to be passed.
@return The return value of
{@link org.openqa.selenium.support.ui.FluentWait#until(com.google.common.base.Function)} if the function
returned something different from null or false before t... | [
"The",
"click",
"function",
"and",
"wait",
"based",
"on",
"the",
"ExpectedCondition",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java#L544-L563 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java | AbstractElement.hover | public void hover(final Object... expected) {
dispatcher.beforeHover(this, expected);
new Actions(Grid.driver()).moveToElement(getElement()).perform();
try {
for (Object expect : expected) {
if (expect instanceof AbstractElement) {
AbstractElemen... | java | public void hover(final Object... expected) {
dispatcher.beforeHover(this, expected);
new Actions(Grid.driver()).moveToElement(getElement()).perform();
try {
for (Object expect : expected) {
if (expect instanceof AbstractElement) {
AbstractElemen... | [
"public",
"void",
"hover",
"(",
"final",
"Object",
"...",
"expected",
")",
"{",
"dispatcher",
".",
"beforeHover",
"(",
"this",
",",
"expected",
")",
";",
"new",
"Actions",
"(",
"Grid",
".",
"driver",
"(",
")",
")",
".",
"moveToElement",
"(",
"getElement"... | Moves the mouse pointer to the middle of the element. And waits for the expected elements to be visible.
@param expected
parameters in the form of an element locator {@link String} or an {@link AbstractElement} | [
"Moves",
"the",
"mouse",
"pointer",
"to",
"the",
"middle",
"of",
"the",
"element",
".",
"And",
"waits",
"for",
"the",
"expected",
"elements",
"to",
"be",
"visible",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/AbstractElement.java#L729-L749 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.getAllData | @Override
public Object[][] getAllData() {
logger.entering();
Object[][] objectArray;
if ((null == resource.getCls()) && (null != resource.getXpathMap())) {
Document doc = getDocument();
Object[][][] multipleObjectDataProviders = new Object[resource.getXpathMap().siz... | java | @Override
public Object[][] getAllData() {
logger.entering();
Object[][] objectArray;
if ((null == resource.getCls()) && (null != resource.getXpathMap())) {
Document doc = getDocument();
Object[][][] multipleObjectDataProviders = new Object[resource.getXpathMap().siz... | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"[",
"]",
"getAllData",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"Object",
"[",
"]",
"[",
"]",
"objectArray",
";",
"if",
"(",
"(",
"null",
"==",
"resource",
".",
"getCls",
"(",
")",
"... | Generates a two dimensional array for TestNG DataProvider from the XML data.
@return A two dimensional object array. | [
"Generates",
"a",
"two",
"dimensional",
"array",
"for",
"TestNG",
"DataProvider",
"from",
"the",
"XML",
"data",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L70-L94 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.getAllKeyValueData | @Override
public Object[][] getAllKeyValueData() {
logger.entering();
Object[][] objectArray;
try {
JAXBContext context = JAXBContext.newInstance(resource.getCls());
Unmarshaller unmarshaller = context.createUnmarshaller();
StreamSource xmlStreamSource = ... | java | @Override
public Object[][] getAllKeyValueData() {
logger.entering();
Object[][] objectArray;
try {
JAXBContext context = JAXBContext.newInstance(resource.getCls());
Unmarshaller unmarshaller = context.createUnmarshaller();
StreamSource xmlStreamSource = ... | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"[",
"]",
"getAllKeyValueData",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"Object",
"[",
"]",
"[",
"]",
"objectArray",
";",
"try",
"{",
"JAXBContext",
"context",
"=",
"JAXBContext",
".",
"ne... | Generates a two dimensional array for TestNG DataProvider from the XML data representing a map of name value
collection.
This method needs the referenced {@link DataResource} to be instantiated using its constructors with
parameter {@code Class<?> cls} and set to {@code KeyValueMap.class}. The implementation in this m... | [
"Generates",
"a",
"two",
"dimensional",
"array",
"for",
"TestNG",
"DataProvider",
"from",
"the",
"XML",
"data",
"representing",
"a",
"map",
"of",
"name",
"value",
"collection",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L212-L231 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.getDataByKeys | @Override
public Object[][] getDataByKeys(String[] keys) {
logger.entering(Arrays.toString(keys));
if (null == resource.getCls()) {
resource.setCls(KeyValueMap.class);
}
Object[][] objectArray;
try {
JAXBContext context = JAXBContext.newInstance(resou... | java | @Override
public Object[][] getDataByKeys(String[] keys) {
logger.entering(Arrays.toString(keys));
if (null == resource.getCls()) {
resource.setCls(KeyValueMap.class);
}
Object[][] objectArray;
try {
JAXBContext context = JAXBContext.newInstance(resou... | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"[",
"]",
"getDataByKeys",
"(",
"String",
"[",
"]",
"keys",
")",
"{",
"logger",
".",
"entering",
"(",
"Arrays",
".",
"toString",
"(",
"keys",
")",
")",
";",
"if",
"(",
"null",
"==",
"resource",
".",
"g... | Generates a two dimensional array for TestNG DataProvider from the XML data representing a map of name value
collection filtered by keys.
A name value item should use the node name 'item' and a specific child structure since the implementation depends
on {@link KeyValuePair} class. The structure of an item in collecti... | [
"Generates",
"a",
"two",
"dimensional",
"array",
"for",
"TestNG",
"DataProvider",
"from",
"the",
"XML",
"data",
"representing",
"a",
"map",
"of",
"name",
"value",
"collection",
"filtered",
"by",
"keys",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L262-L285 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.loadDataFromXmlFile | private List<?> loadDataFromXmlFile() {
logger.entering();
Preconditions.checkArgument(resource.getCls() != null, "Please provide a valid type.");
List<?> returned;
try {
JAXBContext context = JAXBContext.newInstance(Wrapper.class, resource.getCls());
Unmarshalle... | java | private List<?> loadDataFromXmlFile() {
logger.entering();
Preconditions.checkArgument(resource.getCls() != null, "Please provide a valid type.");
List<?> returned;
try {
JAXBContext context = JAXBContext.newInstance(Wrapper.class, resource.getCls());
Unmarshalle... | [
"private",
"List",
"<",
"?",
">",
"loadDataFromXmlFile",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"Preconditions",
".",
"checkArgument",
"(",
"resource",
".",
"getCls",
"(",
")",
"!=",
"null",
",",
"\"Please provide a valid type.\"",
")",
";"... | Generates a list of the declared type after parsing the XML file.
@return A {@link List} of object of declared type {@link XmlFileSystemResource#getCls()}. | [
"Generates",
"a",
"list",
"of",
"the",
"declared",
"type",
"after",
"parsing",
"the",
"XML",
"file",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L343-L361 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.loadDataFromXml | private List<?> loadDataFromXml(String xml, Class<?> cls) {
logger.entering(new Object[] { xml, cls });
Preconditions.checkArgument(cls != null, "Please provide a valid type.");
List<?> returned;
try {
JAXBContext context = JAXBContext.newInstance(Wrapper.class, cls);
... | java | private List<?> loadDataFromXml(String xml, Class<?> cls) {
logger.entering(new Object[] { xml, cls });
Preconditions.checkArgument(cls != null, "Please provide a valid type.");
List<?> returned;
try {
JAXBContext context = JAXBContext.newInstance(Wrapper.class, cls);
... | [
"private",
"List",
"<",
"?",
">",
"loadDataFromXml",
"(",
"String",
"xml",
",",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"xml",
",",
"cls",
"}",
")",
";",
"Preconditions",
".",
"checkA... | Generates a list of the declared type after parsing the XML data string.
@param xml
String containing the XML data.
@param cls
The declared type modeled by the XML content.
@return A {@link List} of object of declared type {@link XmlFileSystemResource#getCls()}. | [
"Generates",
"a",
"list",
"of",
"the",
"declared",
"type",
"after",
"parsing",
"the",
"XML",
"data",
"string",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L372-L391 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java | XmlDataProviderImpl.getFilteredXml | @SuppressWarnings("unchecked")
private String getFilteredXml(Document document, String xpathExpression) {
logger.entering(new Object[] { document, xpathExpression });
List<Node> nodes = (List<Node>) document.selectNodes(xpathExpression);
StringBuilder newDocument = new StringBuilder(documen... | java | @SuppressWarnings("unchecked")
private String getFilteredXml(Document document, String xpathExpression) {
logger.entering(new Object[] { document, xpathExpression });
List<Node> nodes = (List<Node>) document.selectNodes(xpathExpression);
StringBuilder newDocument = new StringBuilder(documen... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"String",
"getFilteredXml",
"(",
"Document",
"document",
",",
"String",
"xpathExpression",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"document",
",",
"xpathExpression"... | Generates an XML string containing only the nodes filtered by the XPath expression.
@param document
An XML {@link org.dom4j.Document}
@param xpathExpression
A string indicating the XPath expression to be evaluated.
@return A string of XML data with root node named "root". | [
"Generates",
"an",
"XML",
"string",
"containing",
"only",
"the",
"nodes",
"filtered",
"by",
"the",
"XPath",
"expression",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/XmlDataProviderImpl.java#L424-L438 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.generateConfigSummary | private JsonObject generateConfigSummary() throws JsonParseException {
logger.entering();
if (jsonConfigSummary == null) {
jsonConfigSummary = new JsonObject();
for (Entry<String, String> temp : ConfigSummaryData.getConfigSummary().entrySet()) {
jsonConfigSummar... | java | private JsonObject generateConfigSummary() throws JsonParseException {
logger.entering();
if (jsonConfigSummary == null) {
jsonConfigSummary = new JsonObject();
for (Entry<String, String> temp : ConfigSummaryData.getConfigSummary().entrySet()) {
jsonConfigSummar... | [
"private",
"JsonObject",
"generateConfigSummary",
"(",
")",
"throws",
"JsonParseException",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"if",
"(",
"jsonConfigSummary",
"==",
"null",
")",
"{",
"jsonConfigSummary",
"=",
"new",
"JsonObject",
"(",
")",
";",
"fo... | This method will generate Configuration summary by fetching the details from ReportDataGenerator | [
"This",
"method",
"will",
"generate",
"Configuration",
"summary",
"by",
"fetching",
"the",
"details",
"from",
"ReportDataGenerator"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L101-L114 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.generateLocalConfigSummary | public void generateLocalConfigSummary(String suiteName, String testName) {
logger.entering(new Object[] { suiteName, testName });
try {
Map<String, String> testLocalConfigValues = ConfigSummaryData.getLocalConfigSummary(testName);
JsonObject json = new JsonObject();
... | java | public void generateLocalConfigSummary(String suiteName, String testName) {
logger.entering(new Object[] { suiteName, testName });
try {
Map<String, String> testLocalConfigValues = ConfigSummaryData.getLocalConfigSummary(testName);
JsonObject json = new JsonObject();
... | [
"public",
"void",
"generateLocalConfigSummary",
"(",
"String",
"suiteName",
",",
"String",
"testName",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"suiteName",
",",
"testName",
"}",
")",
";",
"try",
"{",
"Map",
"<",
"String",
... | This method will generate local Configuration summary by fetching the details from ReportDataGenerator
@param suiteName
suite name of the test method.
@param testName
test name of the test method. | [
"This",
"method",
"will",
"generate",
"local",
"Configuration",
"summary",
"by",
"fetching",
"the",
"details",
"from",
"ReportDataGenerator"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L124-L152 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.insertConfigMethod | public synchronized void insertConfigMethod(String suite, String test, String packages, String classname,
ITestResult result) {
logger.entering(new Object[] { suite, test, packages, classname, result });
String type = null;
if (result.getMethod().isBeforeSuiteConfiguration()) {
... | java | public synchronized void insertConfigMethod(String suite, String test, String packages, String classname,
ITestResult result) {
logger.entering(new Object[] { suite, test, packages, classname, result });
String type = null;
if (result.getMethod().isBeforeSuiteConfiguration()) {
... | [
"public",
"synchronized",
"void",
"insertConfigMethod",
"(",
"String",
"suite",
",",
"String",
"test",
",",
"String",
"packages",
",",
"String",
"classname",
",",
"ITestResult",
"result",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"... | This method is used to insert configuration method details based on the suite, test, groups and class name.
@param suite
suite name of the configuration method.
@param test
test name of the configuration method.
@param packages
group name of the configuration method. If the configuration method doesn't belong to any g... | [
"This",
"method",
"is",
"used",
"to",
"insert",
"configuration",
"method",
"details",
"based",
"on",
"the",
"suite",
"test",
"groups",
"and",
"class",
"name",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L220-L264 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.writeJSON | public synchronized void writeJSON(String outputDirectory, boolean bForceWrite) {
logger.entering(new Object[] { outputDirectory, bForceWrite });
long currentTime = System.currentTimeMillis();
if (!bForceWrite && (currentTime - previousTime < ONE_MINUTE)) {
return;
}
... | java | public synchronized void writeJSON(String outputDirectory, boolean bForceWrite) {
logger.entering(new Object[] { outputDirectory, bForceWrite });
long currentTime = System.currentTimeMillis();
if (!bForceWrite && (currentTime - previousTime < ONE_MINUTE)) {
return;
}
... | [
"public",
"synchronized",
"void",
"writeJSON",
"(",
"String",
"outputDirectory",
",",
"boolean",
"bForceWrite",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"outputDirectory",
",",
"bForceWrite",
"}",
")",
";",
"long",
"currentTime... | Generate the final report.json from the completed test and completed configuration temporary files.
@param outputDirectory
output directory
@param bForceWrite
setting true will forcibly generate the report.json | [
"Generate",
"the",
"final",
"report",
".",
"json",
"from",
"the",
"completed",
"test",
"and",
"completed",
"configuration",
"temporary",
"files",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L274-L288 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.generateReports | private void generateReports(String outputDirectory) {
logger.entering(outputDirectory);
ClassLoader localClassLoader = this.getClass().getClassLoader();
try (BufferedWriter writer = new BufferedWriter(new FileWriter(outputDirectory + File.separator + "index.html"));
BufferedWr... | java | private void generateReports(String outputDirectory) {
logger.entering(outputDirectory);
ClassLoader localClassLoader = this.getClass().getClassLoader();
try (BufferedWriter writer = new BufferedWriter(new FileWriter(outputDirectory + File.separator + "index.html"));
BufferedWr... | [
"private",
"void",
"generateReports",
"(",
"String",
"outputDirectory",
")",
"{",
"logger",
".",
"entering",
"(",
"outputDirectory",
")",
";",
"ClassLoader",
"localClassLoader",
"=",
"this",
".",
"getClass",
"(",
")",
".",
"getClassLoader",
"(",
")",
";",
"try... | Generate JSON report and HTML report
@param outputDirectory | [
"Generate",
"JSON",
"report",
"and",
"HTML",
"report"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L314-L339 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.generateHTMLReport | private void generateHTMLReport(BufferedWriter writer, BufferedReader templateReader, String jsonReport)
throws IOException {
logger.entering(new Object[] { writer, templateReader, jsonReport });
String readLine = null;
while ((readLine = templateReader.readLine()) != null) {
... | java | private void generateHTMLReport(BufferedWriter writer, BufferedReader templateReader, String jsonReport)
throws IOException {
logger.entering(new Object[] { writer, templateReader, jsonReport });
String readLine = null;
while ((readLine = templateReader.readLine()) != null) {
... | [
"private",
"void",
"generateHTMLReport",
"(",
"BufferedWriter",
"writer",
",",
"BufferedReader",
"templateReader",
",",
"String",
"jsonReport",
")",
"throws",
"IOException",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"writer",
",",
"tem... | Writing JSON content to HTML file
@param writer
@param templateReader
@param jsonReport
@throws IOException | [
"Writing",
"JSON",
"content",
"to",
"HTML",
"file"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L349-L365 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.buildJSONReport | private JsonObject buildJSONReport() {
logger.entering();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonArray testObjects = loadJSONArray(jsonCompletedTest);
for (TestMethodInfo temp : completedTest) {
testObjects.add(gson.fromJson(temp.toJson(), JsonElem... | java | private JsonObject buildJSONReport() {
logger.entering();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonArray testObjects = loadJSONArray(jsonCompletedTest);
for (TestMethodInfo temp : completedTest) {
testObjects.add(gson.fromJson(temp.toJson(), JsonElem... | [
"private",
"JsonObject",
"buildJSONReport",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"Gson",
"gson",
"=",
"new",
"GsonBuilder",
"(",
")",
".",
"setPrettyPrinting",
"(",
")",
".",
"create",
"(",
")",
";",
"JsonArray",
"testObjects",
"=",
"... | Construct the JSON report for report generation
@return A {@link JsonObject} which represents the report. | [
"Construct",
"the",
"JSON",
"report",
"for",
"report",
"generation"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L372-L409 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.getReportSummaryCounts | private JsonObject getReportSummaryCounts(JsonArray testObjects) {
logger.entering(testObjects);
int runningCount = 0;
int skippedCount = 0;
int passedCount = 0;
int failedCount = 0;
String result;
for (JsonElement test : testObjects) {
result = test... | java | private JsonObject getReportSummaryCounts(JsonArray testObjects) {
logger.entering(testObjects);
int runningCount = 0;
int skippedCount = 0;
int passedCount = 0;
int failedCount = 0;
String result;
for (JsonElement test : testObjects) {
result = test... | [
"private",
"JsonObject",
"getReportSummaryCounts",
"(",
"JsonArray",
"testObjects",
")",
"{",
"logger",
".",
"entering",
"(",
"testObjects",
")",
";",
"int",
"runningCount",
"=",
"0",
";",
"int",
"skippedCount",
"=",
"0",
";",
"int",
"passedCount",
"=",
"0",
... | Provides a JSON object representing the counts of tests passed, failed, skipped and running.
@param testObjects
Array of the current tests as a {@link JsonArray}.
@return A {@link JsonObject} with counts for various test results. | [
"Provides",
"a",
"JSON",
"object",
"representing",
"the",
"counts",
"of",
"tests",
"passed",
"failed",
"skipped",
"and",
"running",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L418-L457 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java | JsonRuntimeReporterHelper.loadJSONArray | private JsonArray loadJSONArray(File jsonFile) throws JsonParseException {
logger.entering(jsonFile);
String jsonTxt;
try {
jsonTxt = FileUtils.readFileToString(jsonFile, "UTF-8");
} catch (IOException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
... | java | private JsonArray loadJSONArray(File jsonFile) throws JsonParseException {
logger.entering(jsonFile);
String jsonTxt;
try {
jsonTxt = FileUtils.readFileToString(jsonFile, "UTF-8");
} catch (IOException e) {
logger.log(Level.SEVERE, e.getMessage(), e);
... | [
"private",
"JsonArray",
"loadJSONArray",
"(",
"File",
"jsonFile",
")",
"throws",
"JsonParseException",
"{",
"logger",
".",
"entering",
"(",
"jsonFile",
")",
";",
"String",
"jsonTxt",
";",
"try",
"{",
"jsonTxt",
"=",
"FileUtils",
".",
"readFileToString",
"(",
"... | Load the json array for the given file
@param jsonFile
json file location
@return JSONArray
@throws JSONException | [
"Load",
"the",
"json",
"array",
"for",
"the",
"given",
"file"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/runtimereport/JsonRuntimeReporterHelper.java#L467-L488 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java | AbstractBaseLauncher.getNodeProgramArguments | private String[] getNodeProgramArguments() throws IOException {
LOGGER.entering();
LOGGER.fine("This instance is considered a SeLion Grid Node");
List<String> args = new LinkedList<>();
if (!commands.contains(NODE_CONFIG_ARG)) {
args.add(NODE_CONFIG_ARG);
args.... | java | private String[] getNodeProgramArguments() throws IOException {
LOGGER.entering();
LOGGER.fine("This instance is considered a SeLion Grid Node");
List<String> args = new LinkedList<>();
if (!commands.contains(NODE_CONFIG_ARG)) {
args.add(NODE_CONFIG_ARG);
args.... | [
"private",
"String",
"[",
"]",
"getNodeProgramArguments",
"(",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"LOGGER",
".",
"fine",
"(",
"\"This instance is considered a SeLion Grid Node\"",
")",
";",
"List",
"<",
"String",
">",
"a... | Get SeLion Node related arguments to pass
@return the node arguments to pass as program arguments represented as an array of {@link String}
@throws IOException | [
"Get",
"SeLion",
"Node",
"related",
"arguments",
"to",
"pass"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java#L206-L221 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java | AbstractBaseLauncher.getHubProgramArguments | private String[] getHubProgramArguments() throws IOException {
LOGGER.entering();
LOGGER.fine("This instance is considered a SeLion Grid Hub");
List<String> args = new LinkedList<>();
if (!commands.contains(HUB_CONFIG_ARG)) {
String hubConfig = HUB_CONFIG_FILE;
... | java | private String[] getHubProgramArguments() throws IOException {
LOGGER.entering();
LOGGER.fine("This instance is considered a SeLion Grid Hub");
List<String> args = new LinkedList<>();
if (!commands.contains(HUB_CONFIG_ARG)) {
String hubConfig = HUB_CONFIG_FILE;
... | [
"private",
"String",
"[",
"]",
"getHubProgramArguments",
"(",
")",
"throws",
"IOException",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"LOGGER",
".",
"fine",
"(",
"\"This instance is considered a SeLion Grid Hub\"",
")",
";",
"List",
"<",
"String",
">",
"arg... | Get SeLion Grid related arguments to pass
@return the grid arguments to pass as program arguments represented as an array of {@link String}
@throws IOException | [
"Get",
"SeLion",
"Grid",
"related",
"arguments",
"to",
"pass"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java#L229-L256 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java | AbstractBaseLauncher.getHost | String getHost() {
LOGGER.entering();
String val = "";
InstanceType type = getType();
if (commands.contains(HOST_ARG)) {
val = commands.get(commands.indexOf(HOST_ARG) + 1);
LOGGER.exiting(val);
return val;
}
try {
if (type... | java | String getHost() {
LOGGER.entering();
String val = "";
InstanceType type = getType();
if (commands.contains(HOST_ARG)) {
val = commands.get(commands.indexOf(HOST_ARG) + 1);
LOGGER.exiting(val);
return val;
}
try {
if (type... | [
"String",
"getHost",
"(",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"String",
"val",
"=",
"\"\"",
";",
"InstanceType",
"type",
"=",
"getType",
"(",
")",
";",
"if",
"(",
"commands",
".",
"contains",
"(",
"HOST_ARG",
")",
")",
"{",
"val",
"... | Get the host for the instance represented by this launcher
@return the host information | [
"Get",
"the",
"host",
"for",
"the",
"instance",
"represented",
"by",
"this",
"launcher"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java#L263-L286 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java | AbstractBaseLauncher.getPort | int getPort() {
LOGGER.entering();
int val = -1;
InstanceType type = getType();
if (commands.contains(PORT_ARG)) {
val = Integer.parseInt(commands.get(commands.indexOf(PORT_ARG) + 1));
LOGGER.exiting(val);
return val;
}
try {
... | java | int getPort() {
LOGGER.entering();
int val = -1;
InstanceType type = getType();
if (commands.contains(PORT_ARG)) {
val = Integer.parseInt(commands.get(commands.indexOf(PORT_ARG) + 1));
LOGGER.exiting(val);
return val;
}
try {
... | [
"int",
"getPort",
"(",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"int",
"val",
"=",
"-",
"1",
";",
"InstanceType",
"type",
"=",
"getType",
"(",
")",
";",
"if",
"(",
"commands",
".",
"contains",
"(",
"PORT_ARG",
")",
")",
"{",
"val",
"="... | Get the port for the instance represented by this launcher
@return the port information. | [
"Get",
"the",
"port",
"for",
"the",
"instance",
"represented",
"by",
"this",
"launcher"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java#L293-L316 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java | AbstractBaseLauncher.getSeleniumConfigFilePath | private String getSeleniumConfigFilePath() {
LOGGER.entering();
String result = null;
InstanceType type = getType();
if (type.equals(InstanceType.SELENIUM_NODE)) {
result = NODE_CONFIG_FILE;
if (commands.contains(NODE_CONFIG_ARG)) {
result = comm... | java | private String getSeleniumConfigFilePath() {
LOGGER.entering();
String result = null;
InstanceType type = getType();
if (type.equals(InstanceType.SELENIUM_NODE)) {
result = NODE_CONFIG_FILE;
if (commands.contains(NODE_CONFIG_ARG)) {
result = comm... | [
"private",
"String",
"getSeleniumConfigFilePath",
"(",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"String",
"result",
"=",
"null",
";",
"InstanceType",
"type",
"=",
"getType",
"(",
")",
";",
"if",
"(",
"type",
".",
"equals",
"(",
"InstanceType",
... | Get the config file path for the instance represented by this launcher.
@return the config file path or <code>null</code> if no config file was specified | [
"Get",
"the",
"config",
"file",
"path",
"for",
"the",
"instance",
"represented",
"by",
"this",
"launcher",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/AbstractBaseLauncher.java#L346-L366 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/matchers/MobileCapabilityMatcher.java | MobileCapabilityMatcher.matchAgainstMobileNodeType | private boolean matchAgainstMobileNodeType(Map<String, Object> nodeCapability, String mobileNodeType) {
String nodeValue = (String) nodeCapability.get(MOBILE_NODE_TYPE);
return !StringUtils.isBlank(nodeValue) && nodeValue.equalsIgnoreCase(mobileNodeType);
} | java | private boolean matchAgainstMobileNodeType(Map<String, Object> nodeCapability, String mobileNodeType) {
String nodeValue = (String) nodeCapability.get(MOBILE_NODE_TYPE);
return !StringUtils.isBlank(nodeValue) && nodeValue.equalsIgnoreCase(mobileNodeType);
} | [
"private",
"boolean",
"matchAgainstMobileNodeType",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"nodeCapability",
",",
"String",
"mobileNodeType",
")",
"{",
"String",
"nodeValue",
"=",
"(",
"String",
")",
"nodeCapability",
".",
"get",
"(",
"MOBILE_NODE_TYPE",
... | Matches requested mobileNodeType against node capabilities. | [
"Matches",
"requested",
"mobileNodeType",
"against",
"node",
"capabilities",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/matchers/MobileCapabilityMatcher.java#L80-L83 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/grid/Grid.java | Grid.getRemoteNodeInfo | public static RemoteNodeInformation getRemoteNodeInfo(String hostName, int port, SessionId session) {
logger.entering(new Object[] { hostName, port, session });
RemoteNodeInformation node = null;
String errorMsg = "Failed to acquire remote webdriver node and port info. Root cause: ";
//... | java | public static RemoteNodeInformation getRemoteNodeInfo(String hostName, int port, SessionId session) {
logger.entering(new Object[] { hostName, port, session });
RemoteNodeInformation node = null;
String errorMsg = "Failed to acquire remote webdriver node and port info. Root cause: ";
//... | [
"public",
"static",
"RemoteNodeInformation",
"getRemoteNodeInfo",
"(",
"String",
"hostName",
",",
"int",
"port",
",",
"SessionId",
"session",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"hostName",
",",
"port",
",",
"session",
"... | For a given Session ID against a host on a particular port, this method returns the remote webdriver node and the
port to which the execution was redirected to by the hub.
@param hostName
The name of the hub machine
@param port
The port on which the hub machine is listening to
@param session
An object of type {@link S... | [
"For",
"a",
"given",
"Session",
"ID",
"against",
"a",
"host",
"on",
"a",
"particular",
"port",
"this",
"method",
"returns",
"the",
"remote",
"webdriver",
"node",
"and",
"the",
"port",
"to",
"which",
"the",
"execution",
"was",
"redirected",
"to",
"by",
"the... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/grid/Grid.java#L197-L227 | train |
paypal/SeLion | common/src/main/java/com/paypal/selion/SeLionBuildInfo.java | SeLionBuildInfo.getBuildValue | public static String getBuildValue(SeLionBuildProperty property) {
return getInfo().getProperty(property.getPropertyValue(), property.getFallBackValue());
} | java | public static String getBuildValue(SeLionBuildProperty property) {
return getInfo().getProperty(property.getPropertyValue(), property.getFallBackValue());
} | [
"public",
"static",
"String",
"getBuildValue",
"(",
"SeLionBuildProperty",
"property",
")",
"{",
"return",
"getInfo",
"(",
")",
".",
"getProperty",
"(",
"property",
".",
"getPropertyValue",
"(",
")",
",",
"property",
".",
"getFallBackValue",
"(",
")",
")",
";"... | Returns values for build time info
@param property
The {@link SeLionBuildProperty} of interest
@return The build time value.</br></br> The fall back value which can be obtained via
{@link SeLionBuildProperty#getFallBackValue()} if the build time property is not defined. | [
"Returns",
"values",
"for",
"build",
"time",
"info"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/common/src/main/java/com/paypal/selion/SeLionBuildInfo.java#L58-L60 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/DataProviderFactory.java | DataProviderFactory.getDataProvider | public static SeLionDataProvider getDataProvider(DataResource resource)
throws IOException {
logger.entering(resource);
if(resource == null) {
return null;
}
switch (resource.getType().toUpperCase()) {
case "XML":
return new XmlDataProviderIm... | java | public static SeLionDataProvider getDataProvider(DataResource resource)
throws IOException {
logger.entering(resource);
if(resource == null) {
return null;
}
switch (resource.getType().toUpperCase()) {
case "XML":
return new XmlDataProviderIm... | [
"public",
"static",
"SeLionDataProvider",
"getDataProvider",
"(",
"DataResource",
"resource",
")",
"throws",
"IOException",
"{",
"logger",
".",
"entering",
"(",
"resource",
")",
";",
"if",
"(",
"resource",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
... | Load the Data provider implementation for the data file type
@param resource - resource of the data file
@return Data provider Impl
@throws IOException | [
"Load",
"the",
"Data",
"provider",
"implementation",
"for",
"the",
"data",
"file",
"type"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/DataProviderFactory.java#L46-L68 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/proxy/SeLionRemoteProxy.java | SeLionRemoteProxy.isSupportedOnHub | private boolean isSupportedOnHub(Class<? extends HttpServlet> servlet) {
LOGGER.entering();
final boolean response = getRegistry().getHub().getConfiguration().servlets.contains(servlet.getCanonicalName());
LOGGER.exiting(response);
return response;
} | java | private boolean isSupportedOnHub(Class<? extends HttpServlet> servlet) {
LOGGER.entering();
final boolean response = getRegistry().getHub().getConfiguration().servlets.contains(servlet.getCanonicalName());
LOGGER.exiting(response);
return response;
} | [
"private",
"boolean",
"isSupportedOnHub",
"(",
"Class",
"<",
"?",
"extends",
"HttpServlet",
">",
"servlet",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"final",
"boolean",
"response",
"=",
"getRegistry",
"(",
")",
".",
"getHub",
"(",
")",
".",
"g... | Determine if the hub supports the servlet in question by looking at the registry configuration.
@param servlet
the {@link HttpServlet} to ping
@return <code>true</code> or <code>false</code> | [
"Determine",
"if",
"the",
"hub",
"supports",
"the",
"servlet",
"in",
"question",
"by",
"looking",
"at",
"the",
"registry",
"configuration",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/proxy/SeLionRemoteProxy.java#L185-L190 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/proxy/SeLionRemoteProxy.java | SeLionRemoteProxy.isSupportedOnNode | private boolean isSupportedOnNode(Class<? extends HttpServlet> servlet) {
LOGGER.entering();
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT)
.setSocketTimeout(CONNECTION_TIMEOUT).build();
CloseableHttpClient client = HttpClientBuilder.... | java | private boolean isSupportedOnNode(Class<? extends HttpServlet> servlet) {
LOGGER.entering();
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT)
.setSocketTimeout(CONNECTION_TIMEOUT).build();
CloseableHttpClient client = HttpClientBuilder.... | [
"private",
"boolean",
"isSupportedOnNode",
"(",
"Class",
"<",
"?",
"extends",
"HttpServlet",
">",
"servlet",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"RequestConfig",
"requestConfig",
"=",
"RequestConfig",
".",
"custom",
"(",
")",
".",
"setConnectTi... | Determine if the remote proxy supports the servlet in question by sending a http request to the remote. The
proxy configuration could also be used to make a similar decision. This approach allows the remote to use a
servlet which implements the same functionality as the `servlet` expected but does not necessarily resid... | [
"Determine",
"if",
"the",
"remote",
"proxy",
"supports",
"the",
"servlet",
"in",
"question",
"by",
"sending",
"a",
"http",
"request",
"to",
"the",
"remote",
".",
"The",
"proxy",
"configuration",
"could",
"also",
"be",
"used",
"to",
"make",
"a",
"similar",
... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/proxy/SeLionRemoteProxy.java#L203-L235 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/utils/SauceLabsRestApi.java | SauceLabsRestApi.getMaxConcurrency | public int getMaxConcurrency() {
LOGGER.entering();
if (maxTestCase == -1) {
try {
SauceLabsHttpResponse result = doSauceRequest("/limits");
JsonObject obj = result.getEntityAsJsonObject();
maxTestCase = obj.get("concurrency").getAsInt();
... | java | public int getMaxConcurrency() {
LOGGER.entering();
if (maxTestCase == -1) {
try {
SauceLabsHttpResponse result = doSauceRequest("/limits");
JsonObject obj = result.getEntityAsJsonObject();
maxTestCase = obj.get("concurrency").getAsInt();
... | [
"public",
"int",
"getMaxConcurrency",
"(",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"if",
"(",
"maxTestCase",
"==",
"-",
"1",
")",
"{",
"try",
"{",
"SauceLabsHttpResponse",
"result",
"=",
"doSauceRequest",
"(",
"\"/limits\"",
")",
";",
"JsonObje... | Get the maximum number of test case that can run in parallel for the primary account.
@return maximum number of test case or <code>-1</code> on failure calling sauce labs | [
"Get",
"the",
"maximum",
"number",
"of",
"test",
"case",
"that",
"can",
"run",
"in",
"parallel",
"for",
"the",
"primary",
"account",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/utils/SauceLabsRestApi.java#L179-L192 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java | SeLionAsserts.assertNotEquals | public static void assertNotEquals(Object actual, Object expected, String msg) {
hardAssert.assertNotEquals(actual, expected, msg);
} | java | public static void assertNotEquals(Object actual, Object expected, String msg) {
hardAssert.assertNotEquals(actual, expected, msg);
} | [
"public",
"static",
"void",
"assertNotEquals",
"(",
"Object",
"actual",
",",
"Object",
"expected",
",",
"String",
"msg",
")",
"{",
"hardAssert",
".",
"assertNotEquals",
"(",
"actual",
",",
"expected",
",",
"msg",
")",
";",
"}"
] | assertNotEquals method is used to assert based on actual and expected values and provide a Pass result for a
mismatch.
@param actual
- Actual value obtained from executing a test
@param expected
- Expected value for the test to pass. <br>
@param msg
- A descriptive text narrating a validation being done Sample Usage<b... | [
"assertNotEquals",
"method",
"is",
"used",
"to",
"assert",
"based",
"on",
"actual",
"and",
"expected",
"values",
"and",
"provide",
"a",
"Pass",
"result",
"for",
"a",
"mismatch",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java#L112-L114 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java | SeLionAsserts.verifyEquals | public static void verifyEquals(Object actual, Object expected, String msg) {
getSoftAssertInContext().assertEquals(actual, expected, msg);
} | java | public static void verifyEquals(Object actual, Object expected, String msg) {
getSoftAssertInContext().assertEquals(actual, expected, msg);
} | [
"public",
"static",
"void",
"verifyEquals",
"(",
"Object",
"actual",
",",
"Object",
"expected",
",",
"String",
"msg",
")",
"{",
"getSoftAssertInContext",
"(",
")",
".",
"assertEquals",
"(",
"actual",
",",
"expected",
",",
"msg",
")",
";",
"}"
] | verifyEquals method is used to assert based on actual and expected values and provide a Pass result for a same
match.verifyEquals will yield a Fail result for a mismatch and continue to run the test case.
@param actual
- Actual value obtained from executing a test
@param expected
- Expected value for the test to pass.... | [
"verifyEquals",
"method",
"is",
"used",
"to",
"assert",
"based",
"on",
"actual",
"and",
"expected",
"values",
"and",
"provide",
"a",
"Pass",
"result",
"for",
"a",
"same",
"match",
".",
"verifyEquals",
"will",
"yield",
"a",
"Fail",
"result",
"for",
"a",
"mi... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java#L257-L259 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java | SeLionAsserts.verifyNotEquals | public static void verifyNotEquals(Object actual, Object expected, String msg) {
getSoftAssertInContext().assertNotEquals(actual, expected, msg);
} | java | public static void verifyNotEquals(Object actual, Object expected, String msg) {
getSoftAssertInContext().assertNotEquals(actual, expected, msg);
} | [
"public",
"static",
"void",
"verifyNotEquals",
"(",
"Object",
"actual",
",",
"Object",
"expected",
",",
"String",
"msg",
")",
"{",
"getSoftAssertInContext",
"(",
")",
".",
"assertNotEquals",
"(",
"actual",
",",
"expected",
",",
"msg",
")",
";",
"}"
] | verifyNotEquals method is used to assert based on actual and expected values and provide a Pass result for a
mismatch and continue to run the test.
@param actual
- Actual value obtained from executing a test
@param expected
- Expected value for the test to pass. <br>
@param msg
- A descriptive text narrating a validat... | [
"verifyNotEquals",
"method",
"is",
"used",
"to",
"assert",
"based",
"on",
"actual",
"and",
"expected",
"values",
"and",
"provide",
"a",
"Pass",
"result",
"for",
"a",
"mismatch",
"and",
"continue",
"to",
"run",
"the",
"test",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java#L308-L310 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java | SeLionAsserts.assertEquals | public static void assertEquals(Object actual, Object expected, String message) {
hardAssert.assertEquals(actual, expected, message);
} | java | public static void assertEquals(Object actual, Object expected, String message) {
hardAssert.assertEquals(actual, expected, message);
} | [
"public",
"static",
"void",
"assertEquals",
"(",
"Object",
"actual",
",",
"Object",
"expected",
",",
"String",
"message",
")",
"{",
"hardAssert",
".",
"assertEquals",
"(",
"actual",
",",
"expected",
",",
"message",
")",
";",
"}"
] | assertEquals method is used to assert based on actual and expected values and provide a Pass result for a same
match.assertEquals will yield a Fail result for a mismatch and abort the test case.
@param actual
- Actual value obtained from executing a test
@param expected
- Expected value for the test to pass.
@param me... | [
"assertEquals",
"method",
"is",
"used",
"to",
"assert",
"based",
"on",
"actual",
"and",
"expected",
"values",
"and",
"provide",
"a",
"Pass",
"result",
"for",
"a",
"same",
"match",
".",
"assertEquals",
"will",
"yield",
"a",
"Fail",
"result",
"for",
"a",
"mi... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/asserts/SeLionAsserts.java#L455-L457 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/utils/RegexUtils.java | RegexUtils.wildCardMatch | public static boolean wildCardMatch(String text, String pattern) {
logger.entering(new Object[] { text, pattern });
Preconditions.checkArgument(text != null, "The text on which the search is to be run cannot be null.");
Preconditions.checkArgument(pattern != null, "The search pattern cannot be n... | java | public static boolean wildCardMatch(String text, String pattern) {
logger.entering(new Object[] { text, pattern });
Preconditions.checkArgument(text != null, "The text on which the search is to be run cannot be null.");
Preconditions.checkArgument(pattern != null, "The search pattern cannot be n... | [
"public",
"static",
"boolean",
"wildCardMatch",
"(",
"String",
"text",
",",
"String",
"pattern",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"text",
",",
"pattern",
"}",
")",
";",
"Preconditions",
".",
"checkArgument",
"(",
... | Performs a wild-card matching for the text and pattern provided.
@param text
the text to be tested for matches.
@param pattern
the pattern to be matched for. This can contain the wildcard character '*' (asterisk).
@return <tt>true</tt> if a match is found, <tt>false</tt> otherwise. | [
"Performs",
"a",
"wild",
"-",
"card",
"matching",
"for",
"the",
"text",
"and",
"pattern",
"provided",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/utils/RegexUtils.java#L42-L65 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/model/PageContents.java | PageContents.setId | public void setId(String id) {
logger.entering(id);
this.id = id;
logger.exiting();
} | java | public void setId(String id) {
logger.entering(id);
this.id = id;
logger.exiting();
} | [
"public",
"void",
"setId",
"(",
"String",
"id",
")",
"{",
"logger",
".",
"entering",
"(",
"id",
")",
";",
"this",
".",
"id",
"=",
"id",
";",
"logger",
".",
"exiting",
"(",
")",
";",
"}"
] | Set the id for this page source object
@param id
the identifier to associate as a {@link String} | [
"Set",
"the",
"id",
"for",
"this",
"page",
"source",
"object"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/model/PageContents.java#L95-L99 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/model/PageContents.java | PageContents.getScreenImage | public byte[] getScreenImage() {
logger.entering();
logger.exiting(this.screenImage);
return Arrays.copyOf(screenImage, screenImage.length);
} | java | public byte[] getScreenImage() {
logger.entering();
logger.exiting(this.screenImage);
return Arrays.copyOf(screenImage, screenImage.length);
} | [
"public",
"byte",
"[",
"]",
"getScreenImage",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"logger",
".",
"exiting",
"(",
"this",
".",
"screenImage",
")",
";",
"return",
"Arrays",
".",
"copyOf",
"(",
"screenImage",
",",
"screenImage",
".",
... | Get the image content
@return byte array representing the image content | [
"Get",
"the",
"image",
"content"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/model/PageContents.java#L117-L121 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/model/PageContents.java | PageContents.setScreenImage | public void setScreenImage(byte[] content) {
logger.entering(content);
this.screenImage = Arrays.copyOf(content, content.length);
logger.exiting();
} | java | public void setScreenImage(byte[] content) {
logger.entering(content);
this.screenImage = Arrays.copyOf(content, content.length);
logger.exiting();
} | [
"public",
"void",
"setScreenImage",
"(",
"byte",
"[",
"]",
"content",
")",
"{",
"logger",
".",
"entering",
"(",
"content",
")",
";",
"this",
".",
"screenImage",
"=",
"Arrays",
".",
"copyOf",
"(",
"content",
",",
"content",
".",
"length",
")",
";",
"log... | Set the image content
@param content
byte array representing the image content | [
"Set",
"the",
"image",
"content"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/model/PageContents.java#L141-L145 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/reports/services/ReporterConfigMetadata.java | ReporterConfigMetadata.addReporterMetadataItem | public static void addReporterMetadataItem(String key, String itemType, String value) {
logger.entering(new Object[] { key, itemType, value });
if (StringUtils.isNotBlank(value) && supportedMetaDataProperties.contains(itemType)) {
Map<String, String> subMap = reporterMetadata.get(key);
... | java | public static void addReporterMetadataItem(String key, String itemType, String value) {
logger.entering(new Object[] { key, itemType, value });
if (StringUtils.isNotBlank(value) && supportedMetaDataProperties.contains(itemType)) {
Map<String, String> subMap = reporterMetadata.get(key);
... | [
"public",
"static",
"void",
"addReporterMetadataItem",
"(",
"String",
"key",
",",
"String",
"itemType",
",",
"String",
"value",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"key",
",",
"itemType",
",",
"value",
"}",
")",
";",... | Adds an new item to the reporter metadata.
@param key
- A {@link String} that represents the property name contained in JsonRuntimeReporter file.
@param itemType
- A {@link String} that represents the (supported) type of metadata.
@param value
- A {@link String} that represents the reader friendly value to be displaye... | [
"Adds",
"an",
"new",
"item",
"to",
"the",
"reporter",
"metadata",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/reports/services/ReporterConfigMetadata.java#L68-L83 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/reports/services/ReporterConfigMetadata.java | ReporterConfigMetadata.toJsonAsString | public static String toJsonAsString() {
logger.entering();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonObject configItem = new JsonObject();
for (Entry<String, Map<String, String>> entry : ReporterConfigMetadata.getReporterMetaData().entrySet()) {
Map<Stri... | java | public static String toJsonAsString() {
logger.entering();
Gson gson = new GsonBuilder().setPrettyPrinting().create();
JsonObject configItem = new JsonObject();
for (Entry<String, Map<String, String>> entry : ReporterConfigMetadata.getReporterMetaData().entrySet()) {
Map<Stri... | [
"public",
"static",
"String",
"toJsonAsString",
"(",
")",
"{",
"logger",
".",
"entering",
"(",
")",
";",
"Gson",
"gson",
"=",
"new",
"GsonBuilder",
"(",
")",
".",
"setPrettyPrinting",
"(",
")",
".",
"create",
"(",
")",
";",
"JsonObject",
"configItem",
"=... | This method will generate JSON string representation of the all items in current ReportConfigMetadata. | [
"This",
"method",
"will",
"generate",
"JSON",
"string",
"representation",
"of",
"the",
"all",
"items",
"in",
"current",
"ReportConfigMetadata",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/reports/services/ReporterConfigMetadata.java#L97-L113 | train |
paypal/SeLion | codegen/src/main/java/com/paypal/selion/elements/HtmlElementUtils.java | HtmlElementUtils.getPackage | public static String getPackage(String element) {
Preconditions.checkNotNull(element,"argument 'element' can not be null");
return element.substring(0, element.lastIndexOf('.'));
} | java | public static String getPackage(String element) {
Preconditions.checkNotNull(element,"argument 'element' can not be null");
return element.substring(0, element.lastIndexOf('.'));
} | [
"public",
"static",
"String",
"getPackage",
"(",
"String",
"element",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"element",
",",
"\"argument 'element' can not be null\"",
")",
";",
"return",
"element",
".",
"substring",
"(",
"0",
",",
"element",
".",
"... | Extracts the package from a qualified class.
@param element string of the qualified class
@return package | [
"Extracts",
"the",
"package",
"from",
"a",
"qualified",
"class",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/codegen/src/main/java/com/paypal/selion/elements/HtmlElementUtils.java#L30-L33 | train |
paypal/SeLion | codegen/src/main/java/com/paypal/selion/elements/HtmlElementUtils.java | HtmlElementUtils.getClass | public static String getClass(String element) {
Preconditions.checkNotNull(element,"argument 'element' can not be null");
return element.substring(element.lastIndexOf('.') + 1);
} | java | public static String getClass(String element) {
Preconditions.checkNotNull(element,"argument 'element' can not be null");
return element.substring(element.lastIndexOf('.') + 1);
} | [
"public",
"static",
"String",
"getClass",
"(",
"String",
"element",
")",
"{",
"Preconditions",
".",
"checkNotNull",
"(",
"element",
",",
"\"argument 'element' can not be null\"",
")",
";",
"return",
"element",
".",
"substring",
"(",
"element",
".",
"lastIndexOf",
... | Extracts the class name from a qualified class.
@param element string of the qualified class
@return class name | [
"Extracts",
"the",
"class",
"name",
"from",
"a",
"qualified",
"class",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/codegen/src/main/java/com/paypal/selion/elements/HtmlElementUtils.java#L41-L44 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/filter/SimpleIndexInclusionFilter.java | SimpleIndexInclusionFilter.filter | @Override
public boolean filter(Object data) {
logger.entering(new Object[] { data });
invocationCount += 1;
for (int index : this.indexes) {
if (invocationCount == index) {
logger.exiting(true);
return true;
}
}
... | java | @Override
public boolean filter(Object data) {
logger.entering(new Object[] { data });
invocationCount += 1;
for (int index : this.indexes) {
if (invocationCount == index) {
logger.exiting(true);
return true;
}
}
... | [
"@",
"Override",
"public",
"boolean",
"filter",
"(",
"Object",
"data",
")",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"data",
"}",
")",
";",
"invocationCount",
"+=",
"1",
";",
"for",
"(",
"int",
"index",
":",
"this",
".",
... | This function identifies whether the object falls in the filtering criteria or not based on the indexes provided.
For this we are using the invocation count for comparing the index.
@param data
the object to be filtered.
@return boolean - true if object falls in the filter criteria. | [
"This",
"function",
"identifies",
"whether",
"the",
"object",
"falls",
"in",
"the",
"filtering",
"criteria",
"or",
"not",
"based",
"on",
"the",
"indexes",
"provided",
".",
"For",
"this",
"we",
"are",
"using",
"the",
"invocation",
"count",
"for",
"comparing",
... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/filter/SimpleIndexInclusionFilter.java#L83-L97 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/Config.java | Config.initConfig | public synchronized static void initConfig(ISuite suite) {
SeLionLogger.getLogger().entering(suite);
Map<ConfigProperty, String> initialValues = new HashMap<>();
for (ConfigProperty prop : ConfigProperty.values()) {
String paramValue = suite.getParameter(prop.getName());
... | java | public synchronized static void initConfig(ISuite suite) {
SeLionLogger.getLogger().entering(suite);
Map<ConfigProperty, String> initialValues = new HashMap<>();
for (ConfigProperty prop : ConfigProperty.values()) {
String paramValue = suite.getParameter(prop.getName());
... | [
"public",
"synchronized",
"static",
"void",
"initConfig",
"(",
"ISuite",
"suite",
")",
"{",
"SeLionLogger",
".",
"getLogger",
"(",
")",
".",
"entering",
"(",
"suite",
")",
";",
"Map",
"<",
"ConfigProperty",
",",
"String",
">",
"initialValues",
"=",
"new",
... | Parses suite parameters and generates SeLion Config object
@param suite
list of parameters from configuration file within <suite></suite> tag | [
"Parses",
"suite",
"parameters",
"and",
"generates",
"SeLion",
"Config",
"object"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/Config.java#L119-L132 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/Config.java | Config.initConfig | public synchronized static void initConfig(ITestContext context) {
SeLionLogger.getLogger().entering(context);
Map<ConfigProperty, String> initialValues = new HashMap<>();
Map<String, String> testParams = context.getCurrentXmlTest().getLocalParameters();
if (!testParams.isEmpty()) {
... | java | public synchronized static void initConfig(ITestContext context) {
SeLionLogger.getLogger().entering(context);
Map<ConfigProperty, String> initialValues = new HashMap<>();
Map<String, String> testParams = context.getCurrentXmlTest().getLocalParameters();
if (!testParams.isEmpty()) {
... | [
"public",
"synchronized",
"static",
"void",
"initConfig",
"(",
"ITestContext",
"context",
")",
"{",
"SeLionLogger",
".",
"getLogger",
"(",
")",
".",
"entering",
"(",
"context",
")",
";",
"Map",
"<",
"ConfigProperty",
",",
"String",
">",
"initialValues",
"=",
... | Parses configuration file and extracts values for test environment
@param context
list of parameters includes values within <suite></suite> and <test></test>
tags | [
"Parses",
"configuration",
"file",
"and",
"extracts",
"values",
"for",
"test",
"environment"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/Config.java#L141-L158 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/Config.java | Config.initConfig | public synchronized static void initConfig() {
SeLionLogger.getLogger().entering();
Map<ConfigProperty, String> initialValues = new HashMap<>();
initConfig(initialValues);
SeLionLogger.getLogger().exiting();
} | java | public synchronized static void initConfig() {
SeLionLogger.getLogger().entering();
Map<ConfigProperty, String> initialValues = new HashMap<>();
initConfig(initialValues);
SeLionLogger.getLogger().exiting();
} | [
"public",
"synchronized",
"static",
"void",
"initConfig",
"(",
")",
"{",
"SeLionLogger",
".",
"getLogger",
"(",
")",
".",
"entering",
"(",
")",
";",
"Map",
"<",
"ConfigProperty",
",",
"String",
">",
"initialValues",
"=",
"new",
"HashMap",
"<>",
"(",
")",
... | Reads and parses configuration file Initializes the configuration, reloading all data | [
"Reads",
"and",
"parses",
"configuration",
"file",
"Initializes",
"the",
"configuration",
"reloading",
"all",
"data"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/Config.java#L163-L170 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/Config.java | Config.printSeLionConfigValues | public static void printSeLionConfigValues() {
SeLionLogger.getLogger().entering();
StringBuilder builder = new StringBuilder("SeLion configuration: {");
boolean isFirst = true;
for (ConfigProperty configProperty : ConfigProperty.values()) {
if (!isFirst) {
bu... | java | public static void printSeLionConfigValues() {
SeLionLogger.getLogger().entering();
StringBuilder builder = new StringBuilder("SeLion configuration: {");
boolean isFirst = true;
for (ConfigProperty configProperty : ConfigProperty.values()) {
if (!isFirst) {
bu... | [
"public",
"static",
"void",
"printSeLionConfigValues",
"(",
")",
"{",
"SeLionLogger",
".",
"getLogger",
"(",
")",
".",
"entering",
"(",
")",
";",
"StringBuilder",
"builder",
"=",
"new",
"StringBuilder",
"(",
"\"SeLion configuration: {\"",
")",
";",
"boolean",
"i... | Prints SeLion Config Values | [
"Prints",
"SeLion",
"Config",
"Values"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/Config.java#L175-L190 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/Config.java | Config.setConfigProperty | public static synchronized void setConfigProperty(ConfigProperty configProperty, Object configPropertyValue) {
checkArgument(configProperty != null, "Config property cannot be null.");
checkArgument(configPropertyValue != null, "Config property value cannot be null.");
getConfig().setProperty(co... | java | public static synchronized void setConfigProperty(ConfigProperty configProperty, Object configPropertyValue) {
checkArgument(configProperty != null, "Config property cannot be null.");
checkArgument(configPropertyValue != null, "Config property value cannot be null.");
getConfig().setProperty(co... | [
"public",
"static",
"synchronized",
"void",
"setConfigProperty",
"(",
"ConfigProperty",
"configProperty",
",",
"Object",
"configPropertyValue",
")",
"{",
"checkArgument",
"(",
"configProperty",
"!=",
"null",
",",
"\"Config property cannot be null.\"",
")",
";",
"checkArgu... | Sets a SeLion configuration value. This is useful when you want to override or set a setting.
@param configProperty
The configuration element to set
@param configPropertyValue
The value of the configuration element
@throws IllegalArgumentException
If problems occur during the set | [
"Sets",
"a",
"SeLion",
"configuration",
"value",
".",
"This",
"is",
"useful",
"when",
"you",
"want",
"to",
"override",
"or",
"set",
"a",
"setting",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/Config.java#L376-L380 | train |
paypal/SeLion | codegen/src/main/java/com/paypal/selion/plugins/CodeGeneratorHelper.java | CodeGeneratorHelper.generateJavaCode | private boolean generateJavaCode(File baseFile, File dataFile, File extendedFile) {
return (baseFile.lastModified() < dataFile.lastModified() || (extendedFile.exists() && baseFile.lastModified() < extendedFile
.lastModified()));
} | java | private boolean generateJavaCode(File baseFile, File dataFile, File extendedFile) {
return (baseFile.lastModified() < dataFile.lastModified() || (extendedFile.exists() && baseFile.lastModified() < extendedFile
.lastModified()));
} | [
"private",
"boolean",
"generateJavaCode",
"(",
"File",
"baseFile",
",",
"File",
"dataFile",
",",
"File",
"extendedFile",
")",
"{",
"return",
"(",
"baseFile",
".",
"lastModified",
"(",
")",
"<",
"dataFile",
".",
"lastModified",
"(",
")",
"||",
"(",
"extendedF... | 3. Last modified timestamp of the extended java file is greater than that of the corresponding yaml file. | [
"3",
".",
"Last",
"modified",
"timestamp",
"of",
"the",
"extended",
"java",
"file",
"is",
"greater",
"than",
"that",
"of",
"the",
"corresponding",
"yaml",
"file",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/codegen/src/main/java/com/paypal/selion/plugins/CodeGeneratorHelper.java#L162-L165 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/platform/grid/LocalGridManager.java | LocalGridManager.spawnLocalHub | public static synchronized void spawnLocalHub(AbstractTestSession testSession) {
LOGGER.entering(testSession.getPlatform());
if (!isRunLocally()) {
LOGGER.exiting();
return;
}
setupToBootList();
for (LocalServerComponent eachItem : toBoot) {
t... | java | public static synchronized void spawnLocalHub(AbstractTestSession testSession) {
LOGGER.entering(testSession.getPlatform());
if (!isRunLocally()) {
LOGGER.exiting();
return;
}
setupToBootList();
for (LocalServerComponent eachItem : toBoot) {
t... | [
"public",
"static",
"synchronized",
"void",
"spawnLocalHub",
"(",
"AbstractTestSession",
"testSession",
")",
"{",
"LOGGER",
".",
"entering",
"(",
"testSession",
".",
"getPlatform",
"(",
")",
")",
";",
"if",
"(",
"!",
"isRunLocally",
"(",
")",
")",
"{",
"LOGG... | This method is responsible for spawning a local hub for supporting local executions
@param testSession
- A {@link AbstractTestSession} that represents the type of test session to start (mobile or web). | [
"This",
"method",
"is",
"responsible",
"for",
"spawning",
"a",
"local",
"hub",
"for",
"supporting",
"local",
"executions"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/platform/grid/LocalGridManager.java#L66-L85 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/platform/grid/LocalGridManager.java | LocalGridManager.shutDownHub | static synchronized void shutDownHub() {
LOGGER.entering();
if (!isRunLocally()) {
LOGGER.exiting();
return;
}
// shutdown in reverse order
Collections.reverse(toBoot);
for (LocalServerComponent eachItem : toBoot) {
eachItem.shutdown()... | java | static synchronized void shutDownHub() {
LOGGER.entering();
if (!isRunLocally()) {
LOGGER.exiting();
return;
}
// shutdown in reverse order
Collections.reverse(toBoot);
for (LocalServerComponent eachItem : toBoot) {
eachItem.shutdown()... | [
"static",
"synchronized",
"void",
"shutDownHub",
"(",
")",
"{",
"LOGGER",
".",
"entering",
"(",
")",
";",
"if",
"(",
"!",
"isRunLocally",
"(",
")",
")",
"{",
"LOGGER",
".",
"exiting",
"(",
")",
";",
"return",
";",
"}",
"// shutdown in reverse order",
"Co... | This method helps shut down the already spawned hub for local runs | [
"This",
"method",
"helps",
"shut",
"down",
"the",
"already",
"spawned",
"hub",
"for",
"local",
"runs"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/platform/grid/LocalGridManager.java#L90-L104 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/html/ReportDataGenerator.java | ReportDataGenerator.initReportData | public static void initReportData(List<ISuite> suites) {
logger.entering(suites);
if (!isReportInitialized) {
for (ISuite suite : suites) {
Map<String, ISuiteResult> r = suite.getResults();
for (ISuiteResult r2 : r.values()) {
ITestContext ... | java | public static void initReportData(List<ISuite> suites) {
logger.entering(suites);
if (!isReportInitialized) {
for (ISuite suite : suites) {
Map<String, ISuiteResult> r = suite.getResults();
for (ISuiteResult r2 : r.values()) {
ITestContext ... | [
"public",
"static",
"void",
"initReportData",
"(",
"List",
"<",
"ISuite",
">",
"suites",
")",
"{",
"logger",
".",
"entering",
"(",
"suites",
")",
";",
"if",
"(",
"!",
"isReportInitialized",
")",
"{",
"for",
"(",
"ISuite",
"suite",
":",
"suites",
")",
"... | init the uniques id for the methods , needed to create the navigation.
@param suites | [
"init",
"the",
"uniques",
"id",
"for",
"the",
"methods",
"needed",
"to",
"create",
"the",
"navigation",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/html/ReportDataGenerator.java#L50-L66 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/services/ReporterDateFormatter.java | ReporterDateFormatter.getStringFromISODateString | public static String getStringFromISODateString(String dateISOString) {
Date date;
String formattedDate;
DateFormat formatter = getFormatter();
try {
date = formatter.parse(dateISOString);
formattedDate = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateForma... | java | public static String getStringFromISODateString(String dateISOString) {
Date date;
String formattedDate;
DateFormat formatter = getFormatter();
try {
date = formatter.parse(dateISOString);
formattedDate = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateForma... | [
"public",
"static",
"String",
"getStringFromISODateString",
"(",
"String",
"dateISOString",
")",
"{",
"Date",
"date",
";",
"String",
"formattedDate",
";",
"DateFormat",
"formatter",
"=",
"getFormatter",
"(",
")",
";",
"try",
"{",
"date",
"=",
"formatter",
".",
... | Return an reader friendly date from ISO 8601 combined date and time string.
@param dateISOString
String for date in ISO format.
@return String with format "yyyy-MM-dd'T'HH:mm:ss.SSS+XXXX where XXXX corresponds to the host's time zone." | [
"Return",
"an",
"reader",
"friendly",
"date",
"from",
"ISO",
"8601",
"combined",
"date",
"and",
"time",
"string",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/services/ReporterDateFormatter.java#L82-L94 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/reports/services/ReporterDateFormatter.java | ReporterDateFormatter.formatReportDataForBrowsableReports | public static Entry<String, String> formatReportDataForBrowsableReports(Entry<String, String> entryItem) {
String key = entryItem.getKey();
String value = entryItem.getValue();
String formattedKey = key;
String formattedValue = value;
switch (key) {
case ReporterDateFor... | java | public static Entry<String, String> formatReportDataForBrowsableReports(Entry<String, String> entryItem) {
String key = entryItem.getKey();
String value = entryItem.getValue();
String formattedKey = key;
String formattedValue = value;
switch (key) {
case ReporterDateFor... | [
"public",
"static",
"Entry",
"<",
"String",
",",
"String",
">",
"formatReportDataForBrowsableReports",
"(",
"Entry",
"<",
"String",
",",
"String",
">",
"entryItem",
")",
"{",
"String",
"key",
"=",
"entryItem",
".",
"getKey",
"(",
")",
";",
"String",
"value",... | Formats specific keys and values into readable form for HTML Reporter.
@param entryItem
A single key value Entry to be formatted.
@return The formatted key value Entry or the original Entry, if no formatting is required | [
"Formats",
"specific",
"keys",
"and",
"values",
"into",
"readable",
"form",
"for",
"HTML",
"Reporter",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/reports/services/ReporterDateFormatter.java#L103-L120 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/LocalConfig.java | LocalConfig.getConfigProperty | public synchronized String getConfigProperty(Config.ConfigProperty configProperty) {
SeLionLogger.getLogger().entering(configProperty);
checkArgument(configProperty != null, "Config property cannot be null");
// Search locally then query SeLionConfig if not found
String propValue = null... | java | public synchronized String getConfigProperty(Config.ConfigProperty configProperty) {
SeLionLogger.getLogger().entering(configProperty);
checkArgument(configProperty != null, "Config property cannot be null");
// Search locally then query SeLionConfig if not found
String propValue = null... | [
"public",
"synchronized",
"String",
"getConfigProperty",
"(",
"Config",
".",
"ConfigProperty",
"configProperty",
")",
"{",
"SeLionLogger",
".",
"getLogger",
"(",
")",
".",
"entering",
"(",
"configProperty",
")",
";",
"checkArgument",
"(",
"configProperty",
"!=",
"... | Get the configuration property value for configProperty.
@param configProperty
The configuration property value to get
@return The configuration property value or null if property does not exit. | [
"Get",
"the",
"configuration",
"property",
"value",
"for",
"configProperty",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/LocalConfig.java#L110-L125 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/LocalConfig.java | LocalConfig.setConfigProperty | public synchronized void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue) {
checkArgument(configProperty != null, "Config property cannot be null");
checkArgument(checkNotInGlobalScope(configProperty),
String.format("The configuration property (%s) is n... | java | public synchronized void setConfigProperty(Config.ConfigProperty configProperty, Object configPropertyValue) {
checkArgument(configProperty != null, "Config property cannot be null");
checkArgument(checkNotInGlobalScope(configProperty),
String.format("The configuration property (%s) is n... | [
"public",
"synchronized",
"void",
"setConfigProperty",
"(",
"Config",
".",
"ConfigProperty",
"configProperty",
",",
"Object",
"configPropertyValue",
")",
"{",
"checkArgument",
"(",
"configProperty",
"!=",
"null",
",",
"\"Config property cannot be null\"",
")",
";",
"che... | Sets the SeLion configuration property value.
@param configProperty
The configuration property to set.
@param configPropertyValue
The configuration property value to set. | [
"Sets",
"the",
"SeLion",
"configuration",
"property",
"value",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/LocalConfig.java#L178-L185 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/configuration/LocalConfig.java | LocalConfig.isLocalValuePresent | public synchronized boolean isLocalValuePresent(ConfigProperty configProperty) {
checkArgument(configProperty != null, "Config property cannot be null");
String value = baseConfig.getString(configProperty.getName());
return value != null;
} | java | public synchronized boolean isLocalValuePresent(ConfigProperty configProperty) {
checkArgument(configProperty != null, "Config property cannot be null");
String value = baseConfig.getString(configProperty.getName());
return value != null;
} | [
"public",
"synchronized",
"boolean",
"isLocalValuePresent",
"(",
"ConfigProperty",
"configProperty",
")",
"{",
"checkArgument",
"(",
"configProperty",
"!=",
"null",
",",
"\"Config property cannot be null\"",
")",
";",
"String",
"value",
"=",
"baseConfig",
".",
"getStrin... | Answer if local configuration contains a value for specified property.
@return True if local configuration has value for configProperty. | [
"Answer",
"if",
"local",
"configuration",
"contains",
"a",
"value",
"for",
"specified",
"property",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/configuration/LocalConfig.java#L233-L237 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/servlets/ProxyInfo.java | ProxyInfo.initSeLionRemoteProxySpecificValues | private void initSeLionRemoteProxySpecificValues(RemoteProxy proxy) {
if (SeLionRemoteProxy.class.getCanonicalName().equals(
proxy.getOriginalRegistrationRequest().getConfiguration().proxy)) {
SeLionRemoteProxy srp = (SeLionRemoteProxy) proxy;
// figure out if the proxy ... | java | private void initSeLionRemoteProxySpecificValues(RemoteProxy proxy) {
if (SeLionRemoteProxy.class.getCanonicalName().equals(
proxy.getOriginalRegistrationRequest().getConfiguration().proxy)) {
SeLionRemoteProxy srp = (SeLionRemoteProxy) proxy;
// figure out if the proxy ... | [
"private",
"void",
"initSeLionRemoteProxySpecificValues",
"(",
"RemoteProxy",
"proxy",
")",
"{",
"if",
"(",
"SeLionRemoteProxy",
".",
"class",
".",
"getCanonicalName",
"(",
")",
".",
"equals",
"(",
"proxy",
".",
"getOriginalRegistrationRequest",
"(",
")",
".",
"ge... | SeLion specific features | [
"SeLion",
"specific",
"features"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/servlets/ProxyInfo.java#L223-L240 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java | LogServlet.appendMoreLogsLink | private String appendMoreLogsLink(final String fileName, String url) throws IOException {
FileBackedStringBuffer buffer = new FileBackedStringBuffer();
int index = retrieveIndexValueFromFileName(fileName);
index++;
File logFileName = retrieveFileFromLogsFolder(Integer.toString(index));
... | java | private String appendMoreLogsLink(final String fileName, String url) throws IOException {
FileBackedStringBuffer buffer = new FileBackedStringBuffer();
int index = retrieveIndexValueFromFileName(fileName);
index++;
File logFileName = retrieveFileFromLogsFolder(Integer.toString(index));
... | [
"private",
"String",
"appendMoreLogsLink",
"(",
"final",
"String",
"fileName",
",",
"String",
"url",
")",
"throws",
"IOException",
"{",
"FileBackedStringBuffer",
"buffer",
"=",
"new",
"FileBackedStringBuffer",
"(",
")",
";",
"int",
"index",
"=",
"retrieveIndexValueF... | This method helps to display More log information of the node machine.
@param fileName
It is log file name available in node machine current directory Logs folder, it is used to identify
the current file to display in the web page.
@param url
It is node machine url (ex: http://10.232.88.10:5555)
@return String vlaue t... | [
"This",
"method",
"helps",
"to",
"display",
"More",
"log",
"information",
"of",
"the",
"node",
"machine",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java#L69-L85 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java | LogServlet.getLogsDirectory | private File getLogsDirectory() {
if (logsDirectory != null) {
return logsDirectory;
}
logsDirectory = new File(SeLionGridConstants.LOGS_DIR);
if (!logsDirectory.exists()) {
logsDirectory.mkdirs();
}
return logsDirectory;
} | java | private File getLogsDirectory() {
if (logsDirectory != null) {
return logsDirectory;
}
logsDirectory = new File(SeLionGridConstants.LOGS_DIR);
if (!logsDirectory.exists()) {
logsDirectory.mkdirs();
}
return logsDirectory;
} | [
"private",
"File",
"getLogsDirectory",
"(",
")",
"{",
"if",
"(",
"logsDirectory",
"!=",
"null",
")",
"{",
"return",
"logsDirectory",
";",
"}",
"logsDirectory",
"=",
"new",
"File",
"(",
"SeLionGridConstants",
".",
"LOGS_DIR",
")",
";",
"if",
"(",
"!",
"logs... | This method get the Logs file directory
@return A {@link File} that represents the location where the logs can be found. | [
"This",
"method",
"get",
"the",
"Logs",
"file",
"directory"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java#L116-L127 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java | LogServlet.process | protected void process(HttpServletRequest request, HttpServletResponse response, String fileName)
throws IOException {
// TODO put this html code in a template
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
response.setStatus(200);
FileB... | java | protected void process(HttpServletRequest request, HttpServletResponse response, String fileName)
throws IOException {
// TODO put this html code in a template
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
response.setStatus(200);
FileB... | [
"protected",
"void",
"process",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
",",
"String",
"fileName",
")",
"throws",
"IOException",
"{",
"// TODO put this html code in a template",
"response",
".",
"setContentType",
"(",
"\"text/html\"",
... | This method display the log file content
@param request
HttpServletRequest
@param response
HttpServletResponse
@param fileName
To display the log file content in the web page.
@throws IOException | [
"This",
"method",
"display",
"the",
"log",
"file",
"content"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java#L149-L173 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java | LogServlet.renderLogFileContents | private String renderLogFileContents(String fileName) throws IOException {
FileBackedStringBuffer buffer = new FileBackedStringBuffer();
int index = retrieveIndexValueFromFileName(fileName);
int runningIndex = 0;
File eachFile = null;
while ((eachFile = retrieveFileFromLogsFolder... | java | private String renderLogFileContents(String fileName) throws IOException {
FileBackedStringBuffer buffer = new FileBackedStringBuffer();
int index = retrieveIndexValueFromFileName(fileName);
int runningIndex = 0;
File eachFile = null;
while ((eachFile = retrieveFileFromLogsFolder... | [
"private",
"String",
"renderLogFileContents",
"(",
"String",
"fileName",
")",
"throws",
"IOException",
"{",
"FileBackedStringBuffer",
"buffer",
"=",
"new",
"FileBackedStringBuffer",
"(",
")",
";",
"int",
"index",
"=",
"retrieveIndexValueFromFileName",
"(",
"fileName",
... | This method read the content of the file and append into FileBackedStringBuffer
@param fileName
Read the content of the log file
@return a {@link FileBackedStringBuffer} to display in web page
@throws IOException | [
"This",
"method",
"read",
"the",
"content",
"of",
"the",
"file",
"and",
"append",
"into",
"FileBackedStringBuffer"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java#L183-L201 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java | LogServlet.retrieveFileFromLogsFolder | private File retrieveFileFromLogsFolder(String index) {
File[] logFiles = getLogsDirectory().listFiles(new LogFilesFilter());
File fileToReturn = null;
for (File eachLogFile : logFiles) {
String fileName = eachLogFile.getName().split("\\Q.\\E")[0];
if (fileName.endsWith(i... | java | private File retrieveFileFromLogsFolder(String index) {
File[] logFiles = getLogsDirectory().listFiles(new LogFilesFilter());
File fileToReturn = null;
for (File eachLogFile : logFiles) {
String fileName = eachLogFile.getName().split("\\Q.\\E")[0];
if (fileName.endsWith(i... | [
"private",
"File",
"retrieveFileFromLogsFolder",
"(",
"String",
"index",
")",
"{",
"File",
"[",
"]",
"logFiles",
"=",
"getLogsDirectory",
"(",
")",
".",
"listFiles",
"(",
"new",
"LogFilesFilter",
"(",
")",
")",
";",
"File",
"fileToReturn",
"=",
"null",
";",
... | Get the log files from the directory
@param index
@return A {@link File} that represent the file to read from current directory. | [
"Get",
"the",
"log",
"files",
"from",
"the",
"directory"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/node/servlets/LogServlet.java#L209-L220 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/platform/pageyaml/GuiMapReaderFactory.java | GuiMapReaderFactory.getInstance | public static GuiMapReader getInstance(String pageDomain, String pageClassName) throws IOException {
logger.entering(new Object[]{pageDomain, pageClassName});
Preconditions.checkArgument(StringUtils.isNotBlank(pageClassName),
"pageClassName can not be null, empty, or whitespace");
... | java | public static GuiMapReader getInstance(String pageDomain, String pageClassName) throws IOException {
logger.entering(new Object[]{pageDomain, pageClassName});
Preconditions.checkArgument(StringUtils.isNotBlank(pageClassName),
"pageClassName can not be null, empty, or whitespace");
... | [
"public",
"static",
"GuiMapReader",
"getInstance",
"(",
"String",
"pageDomain",
",",
"String",
"pageClassName",
")",
"throws",
"IOException",
"{",
"logger",
".",
"entering",
"(",
"new",
"Object",
"[",
"]",
"{",
"pageDomain",
",",
"pageClassName",
"}",
")",
";"... | Method to get the reader instance depending on the input parameters.
@param pageDomain
domain folder under which the input data files are present.
@param pageClassName
Page class name. May not be <code>null</code>, empty, or whitespace.
@return DataProvider instance
@throws IOException | [
"Method",
"to",
"get",
"the",
"reader",
"instance",
"depending",
"on",
"the",
"input",
"parameters",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/platform/pageyaml/GuiMapReaderFactory.java#L52-L82 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/internal/platform/pageyaml/GuiMapReaderFactory.java | GuiMapReaderFactory.getFilePath | private static String getFilePath(String file) {
logger.entering(file);
String filePath = null;
URL fileURL = GuiMapReaderFactory.class.getClassLoader().getResource(file);
if (fileURL != null) {
filePath = fileURL.getPath();
}
logger.exiting(filePath);
... | java | private static String getFilePath(String file) {
logger.entering(file);
String filePath = null;
URL fileURL = GuiMapReaderFactory.class.getClassLoader().getResource(file);
if (fileURL != null) {
filePath = fileURL.getPath();
}
logger.exiting(filePath);
... | [
"private",
"static",
"String",
"getFilePath",
"(",
"String",
"file",
")",
"{",
"logger",
".",
"entering",
"(",
"file",
")",
";",
"String",
"filePath",
"=",
"null",
";",
"URL",
"fileURL",
"=",
"GuiMapReaderFactory",
".",
"class",
".",
"getClassLoader",
"(",
... | Method to get the complete file path.
@param file
@return String file path | [
"Method",
"to",
"get",
"the",
"complete",
"file",
"path",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/internal/platform/pageyaml/GuiMapReaderFactory.java#L90-L99 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/Table.java | Table.getNumberOfColumns | public int getNumberOfColumns() {
List<WebElement> cells;
String xPath = getXPathBase() + "tr";
List<WebElement> elements = HtmlElementUtils.locateElements(xPath);
if (elements.size() > 0 && getDataStartIndex() - 1 < elements.size()) {
cells = elements.get(getDataStartIndex... | java | public int getNumberOfColumns() {
List<WebElement> cells;
String xPath = getXPathBase() + "tr";
List<WebElement> elements = HtmlElementUtils.locateElements(xPath);
if (elements.size() > 0 && getDataStartIndex() - 1 < elements.size()) {
cells = elements.get(getDataStartIndex... | [
"public",
"int",
"getNumberOfColumns",
"(",
")",
"{",
"List",
"<",
"WebElement",
">",
"cells",
";",
"String",
"xPath",
"=",
"getXPathBase",
"(",
")",
"+",
"\"tr\"",
";",
"List",
"<",
"WebElement",
">",
"elements",
"=",
"HtmlElementUtils",
".",
"locateElement... | Returns the number of columns in a table. If the table is empty, column count cannot be determined and 0 will be
returned.
@return int number of columns | [
"Returns",
"the",
"number",
"of",
"columns",
"in",
"a",
"table",
".",
"If",
"the",
"table",
"is",
"empty",
"column",
"count",
"cannot",
"be",
"determined",
"and",
"0",
"will",
"be",
"returned",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L143-L155 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/Table.java | Table.clickLinkInCell | public void clickLinkInCell(int row, int column) {
String xPath = getXPathBase() + "tr[" + row + "]/td[" + column + "]/a";
new Link(xPath).click();
} | java | public void clickLinkInCell(int row, int column) {
String xPath = getXPathBase() + "tr[" + row + "]/td[" + column + "]/a";
new Link(xPath).click();
} | [
"public",
"void",
"clickLinkInCell",
"(",
"int",
"row",
",",
"int",
"column",
")",
"{",
"String",
"xPath",
"=",
"getXPathBase",
"(",
")",
"+",
"\"tr[\"",
"+",
"row",
"+",
"\"]/td[\"",
"+",
"column",
"+",
"\"]/a\"",
";",
"new",
"Link",
"(",
"xPath",
")"... | Goes to the cell addressed by row and column indices and clicks link in that cell. Performs wait until page would
be loaded
@param row
int number of row for cell
@param column
int number of column for cell | [
"Goes",
"to",
"the",
"cell",
"addressed",
"by",
"row",
"and",
"column",
"indices",
"and",
"clicks",
"link",
"in",
"that",
"cell",
".",
"Performs",
"wait",
"until",
"page",
"would",
"be",
"loaded"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L240-L243 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/Table.java | Table.getRowText | public String getRowText(int rowIndex) {
String rowText = null;
String xPath = getXPathBase() + "tr[" + rowIndex + "]";
rowText = HtmlElementUtils.locateElement(xPath).getText();
return rowText;
} | java | public String getRowText(int rowIndex) {
String rowText = null;
String xPath = getXPathBase() + "tr[" + rowIndex + "]";
rowText = HtmlElementUtils.locateElement(xPath).getText();
return rowText;
} | [
"public",
"String",
"getRowText",
"(",
"int",
"rowIndex",
")",
"{",
"String",
"rowText",
"=",
"null",
";",
"String",
"xPath",
"=",
"getXPathBase",
"(",
")",
"+",
"\"tr[\"",
"+",
"rowIndex",
"+",
"\"]\"",
";",
"rowText",
"=",
"HtmlElementUtils",
".",
"locat... | Returns the single row of a table as a long string of text using the input row index.
@param rowIndex
the index to the row which text is about to retrieve.
@return rowText a text string represents the single row of a table | [
"Returns",
"the",
"single",
"row",
"of",
"a",
"table",
"as",
"a",
"long",
"string",
"of",
"text",
"using",
"the",
"input",
"row",
"index",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L293-L300 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/Table.java | Table.checkCheckboxInCell | public void checkCheckboxInCell(int row, int column) {
String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" + column + "]/input";
CheckBox cb = new CheckBox(checkboxLocator);
cb.check();
} | java | public void checkCheckboxInCell(int row, int column) {
String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" + column + "]/input";
CheckBox cb = new CheckBox(checkboxLocator);
cb.check();
} | [
"public",
"void",
"checkCheckboxInCell",
"(",
"int",
"row",
",",
"int",
"column",
")",
"{",
"String",
"checkboxLocator",
"=",
"getXPathBase",
"(",
")",
"+",
"\"tr[\"",
"+",
"row",
"+",
"\"]/td[\"",
"+",
"column",
"+",
"\"]/input\"",
";",
"CheckBox",
"cb",
... | Tick the checkbox in a cell of a table indicated by input row and column indices
@param row
int number of row for cell
@param column
int number of column for cell | [
"Tick",
"the",
"checkbox",
"in",
"a",
"cell",
"of",
"a",
"table",
"indicated",
"by",
"input",
"row",
"and",
"column",
"indices"
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L310-L314 | train |
paypal/SeLion | client/src/main/java/com/paypal/selion/platform/html/Table.java | Table.uncheckCheckboxInCell | public void uncheckCheckboxInCell(int row, int column) {
String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" + column + "]/input";
CheckBox cb = new CheckBox(checkboxLocator);
cb.uncheck();
} | java | public void uncheckCheckboxInCell(int row, int column) {
String checkboxLocator = getXPathBase() + "tr[" + row + "]/td[" + column + "]/input";
CheckBox cb = new CheckBox(checkboxLocator);
cb.uncheck();
} | [
"public",
"void",
"uncheckCheckboxInCell",
"(",
"int",
"row",
",",
"int",
"column",
")",
"{",
"String",
"checkboxLocator",
"=",
"getXPathBase",
"(",
")",
"+",
"\"tr[\"",
"+",
"row",
"+",
"\"]/td[\"",
"+",
"column",
"+",
"\"]/input\"",
";",
"CheckBox",
"cb",
... | Untick a checkbox in a cell of a table indicated by the input row and column indices.
@param row
int number of row for cell
@param column
int number of column for cell | [
"Untick",
"a",
"checkbox",
"in",
"a",
"cell",
"of",
"a",
"table",
"indicated",
"by",
"the",
"input",
"row",
"and",
"column",
"indices",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/html/Table.java#L324-L328 | train |
paypal/SeLion | server/src/main/java/com/paypal/selion/grid/servlets/ListAllNodes.java | ListAllNodes.process | protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException {
boolean doStatusQuery = request.getParameter(PING_NODES) != null;
String acceptHeader = request.getHeader("Accept");
if (acceptHeader != null && acceptHeader.equalsIgnoreCase("application/json")... | java | protected void process(HttpServletRequest request, HttpServletResponse response) throws IOException {
boolean doStatusQuery = request.getParameter(PING_NODES) != null;
String acceptHeader = request.getHeader("Accept");
if (acceptHeader != null && acceptHeader.equalsIgnoreCase("application/json")... | [
"protected",
"void",
"process",
"(",
"HttpServletRequest",
"request",
",",
"HttpServletResponse",
"response",
")",
"throws",
"IOException",
"{",
"boolean",
"doStatusQuery",
"=",
"request",
".",
"getParameter",
"(",
"PING_NODES",
")",
"!=",
"null",
";",
"String",
"... | This method gets all the nodes which are connected to the grid machine from the Registry and displays them in
html page.
@param request
{@link HttpServletRequest} that represents the servlet request
@param response
{@link HttpServletResponse} that represents the servlet response
@throws IOException | [
"This",
"method",
"gets",
"all",
"the",
"nodes",
"which",
"are",
"connected",
"to",
"the",
"grid",
"machine",
"from",
"the",
"Registry",
"and",
"displays",
"them",
"in",
"html",
"page",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/server/src/main/java/com/paypal/selion/grid/servlets/ListAllNodes.java#L76-L86 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ExcelDataProviderImpl.java | ExcelDataProviderImpl.getDataByKeys | @Override
public Object[][] getDataByKeys(String[] keys) {
logger.entering(Arrays.toString(keys));
Object[][] obj = new Object[keys.length][1];
for (int i = 0; i < keys.length; i++) {
obj[i][0] = getSingleExcelRow(getObject(), keys[i], true);
}
logger.exiting((Ob... | java | @Override
public Object[][] getDataByKeys(String[] keys) {
logger.entering(Arrays.toString(keys));
Object[][] obj = new Object[keys.length][1];
for (int i = 0; i < keys.length; i++) {
obj[i][0] = getSingleExcelRow(getObject(), keys[i], true);
}
logger.exiting((Ob... | [
"@",
"Override",
"public",
"Object",
"[",
"]",
"[",
"]",
"getDataByKeys",
"(",
"String",
"[",
"]",
"keys",
")",
"{",
"logger",
".",
"entering",
"(",
"Arrays",
".",
"toString",
"(",
"keys",
")",
")",
";",
"Object",
"[",
"]",
"[",
"]",
"obj",
"=",
... | This function will use the input string representing the keys to collect and return the correct excel sheet data
rows as two dimensional object to be used as TestNG DataProvider.
@param keys
the string represents the list of key for the search and return the wanted row. It is in the format of
{"row1", "row3", "row5"}
... | [
"This",
"function",
"will",
"use",
"the",
"input",
"string",
"representing",
"the",
"keys",
"to",
"collect",
"and",
"return",
"the",
"correct",
"excel",
"sheet",
"data",
"rows",
"as",
"two",
"dimensional",
"object",
"to",
"be",
"used",
"as",
"TestNG",
"DataP... | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ExcelDataProviderImpl.java#L225-L235 | train |
paypal/SeLion | dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ExcelDataProviderImpl.java | ExcelDataProviderImpl.getDataByFilter | @Override
public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) {
logger.entering(dataFilter);
List<Object[]> objs = new ArrayList<>();
Field[] fields = resource.getCls().getDeclaredFields();
// Extracting number of rows of data to read
// Notice that numR... | java | @Override
public Iterator<Object[]> getDataByFilter(DataProviderFilter dataFilter) {
logger.entering(dataFilter);
List<Object[]> objs = new ArrayList<>();
Field[] fields = resource.getCls().getDeclaredFields();
// Extracting number of rows of data to read
// Notice that numR... | [
"@",
"Override",
"public",
"Iterator",
"<",
"Object",
"[",
"]",
">",
"getDataByFilter",
"(",
"DataProviderFilter",
"dataFilter",
")",
"{",
"logger",
".",
"entering",
"(",
"dataFilter",
")",
";",
"List",
"<",
"Object",
"[",
"]",
">",
"objs",
"=",
"new",
"... | Gets data from Excel sheet by applying the given filter.
@param dataFilter
an implementation class of {@link DataProviderFilter}
@return An iterator over a collection of Object Array to be used with TestNG DataProvider | [
"Gets",
"data",
"from",
"Excel",
"sheet",
"by",
"applying",
"the",
"given",
"filter",
"."
] | 694d12d0df76db48d0360b16192770c6a4fbdfd2 | https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/dataproviders/src/main/java/com/paypal/selion/platform/dataprovider/impl/ExcelDataProviderImpl.java#L325-L353 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.