id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
2088736_633 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testToString() {\n assertThat(fluentElement).hasToString(element.toString());\n }",
"class_method_signature": "FluentWebElementTest.testToString()",
"constructor": false,
"full_signature": "@Test public void testToString()",
"identifier": "testToString",
"invocati... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "@Override\n public String toString() {\n return label.toString();\n }",
"class_method_signature": "FluentWebElement.toString()",
"constructor": false,
"full_signature": "@Override public String toString()",
"identifier": "toString",
"invocations": [
"toString"
],
"modifiers":... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_73 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "fluentPage",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void hasTitleShouldFailDueToNullPointerException() {\n doReturn(null).when(fluentPage).getDriver();\n assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasTitle(\"non-existent\"))\n .hasMessage(\"Current page has no title\");\n }",
"class_method_signatu... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java",
"identifier": "PageAssert",
"interfaces": "implements PageStateAssert",
"methods": [
{
"class_method_signature": "PageAssert.PageAssert(FluentPage actual)",
"constructor": true,
... | {
"body": "@Override\n public PageAssert hasTitle(String title) {\n try {\n String pageTitle = actual.getDriver().getTitle();\n if (!pageTitle.equals(title)) {\n failWithMessage(\"Current page title is \" + pageTitle + \". Expected \" + title);\n }\n } ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_330 | {
"fields": [
{
"declarator": "locator",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ElementLocator locator;",
"type": "ElementLocator",
"var_name": "locator"
},
{
"declarator": "invocationHandler",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testNotLoadedNotEqualsWithRetry() throws Throwable {\n WebElement proxy = mock(WebElement.class);\n Method equals = getMethod(\"equals\", Object.class);\n Object[] args = {proxy};\n when(invocationHandler.loaded()).thenReturn(false);\n when(invocati... | {
"fields": [
{
"declarator": "TO_STRING = getMethod(Object.class, \"toString\")",
"modifier": "private static final",
"original_string": "private static final Method TO_STRING = getMethod(Object.class, \"toString\");",
"type": "Method",
"var_name": "TO_STRING"
},
{
"de... | {
"body": "@Override\n public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n Object invocationResult = null;\n if (TO_STRING.equals(method)) {\n invocationResult = proxyToString(loaded() ? (String) invoke(method, args) : null);\n } else if (loaded()) ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_625 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testGetSize() {\n when(element.getSize()).thenReturn(new Dimension(10, 20));\n assertThat(fluentElement.size()).isEqualTo(new Dimension(10, 20));\n }",
"class_method_signature": "FluentWebElementTest.testGetSize()",
"constructor": false,
"full_signature": "@Tes... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public Dimension size() {\n return webElement.getSize();\n }",
"class_method_signature": "FluentWebElement.size()",
"constructor": false,
"full_signature": "public Dimension size()",
"identifier": "size",
"invocations": [
"getSize"
],
"modifiers": "public",
"parameters": "()",... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_275 | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
},
{
"declarator": "validator",
"modifie... | {
"body": "@Test\n public void shouldReturnFalseIfFieldIsNotListOfElement() throws NoSuchFieldException {\n Field listOfNotFluentWebElementField = getField(\"listOfFluentWebElements\");\n\n assertThat(FluentElementInjectionSupportValidator.isListOfWebElement(listOfNotFluentWebElementField)).isFalse()... | {
"fields": [
{
"declarator": "componentsManager",
"modifier": "private final",
"original_string": "private final ComponentsManager componentsManager;",
"type": "ComponentsManager",
"var_name": "componentsManager"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium... | {
"body": "static boolean isListOfWebElement(Field field) {\n return isFieldListOf(field, WebElement.class::isAssignableFrom);\n }",
"class_method_signature": "FluentElementInjectionSupportValidator.isListOfWebElement(Field field)",
"constructor": false,
"full_signature": "static boolean isListOfWebEl... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_449 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkSimpleEndsWithReturnsFalseIfCurrentValueIsNull() {\n assertThat(CalculateService.endsWith(Pattern.compile(\".*\"), \"to\", null)).isFalse();\n }",
"class_method_signature": "CalculateServiceTest.checkSimpleEndsWithReturnsFalseIfCurrentValueIsNull()",
"constructor":... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java",
"identifier": "CalculateService",
"interfaces": "",
"methods": [
{
"class_method_signature": "CalculateService.CalculateService()",
"constructor": true,
"full_signature":... | {
"body": "public static boolean endsWith(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null || currentValue.isEmpty()) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.endsWith(referenceValue);\n }\... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_367 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseIsNotMatchesPattern() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some MAGICAL text.\");\n\n assertThat(stringConditions.matches(Pattern.compile(\"magical\"))).isFalse();\n }",
"class_method_signature": "StringConditionsImplT... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean matches(String regex) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.matches(regex);\n });\n }",
"class_method_signature": "StringConditionsImpl.matches(String regex)",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_24 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasNameKo() {\n when(element.name()).thenReturn(\"other name\");\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasName(\"some name\"))\n .hasMessage(\"The element does not have the name: some name. Actual name found : other name\");\n }"... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasName(String name) {\n String actualName = actual.name();\n if (!actualName.equals(name)) {\n failWithMessage(\"The element does not have the name: \" + name\n + \". Actual name found : \" + actualName);\n }\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_222 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/configuration/ConfigurationFactoryProviderTest.java",
"identifier": "ConfigurationFactoryProviderTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = ConfigurationException.class)\n public void testInvalidClassConfiguration() {\n ConfigurationFactoryProvider.newConfiguration(FailingContainer.class);\n }",
"class_method_signature": "ConfigurationFactoryProviderTest.testInvalidClassConfiguration()",
"constructor": false,
... | {
"fields": [
{
"declarator": "BOOTSTRAP_FACTORY = new DefaultConfigurationFactory()",
"modifier": "private static final",
"original_string": "private static final ConfigurationFactory BOOTSTRAP_FACTORY = new DefaultConfigurationFactory();",
"type": "ConfigurationFactory",
"var_name"... | {
"body": "public static Configuration newConfiguration(Class<?> container) {\n ConfigurationFactory configurationFactory = getConfigurationFactory(container);\n Configuration configuration = configurationFactory.newConfiguration(container, new ConfigurationDefaults());\n\n if (configuration.getC... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_388 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element;",
"type": "WebElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_strin... | {
"body": "@Test\n public void testAncestors() {\n Dom dom = new Dom(element, instantiator);\n\n List<WebElement> elements = Arrays.asList(mock(WebElement.class), mock(WebElement.class), mock(WebElement.class));\n when(element.findElements(By.xpath(\"ancestor::*\"))).thenReturn(elements);\n\n ... | {
"fields": [
{
"declarator": "webElement",
"modifier": "private final",
"original_string": "private final WebElement webElement;",
"type": "WebElement",
"var_name": "webElement"
},
{
"declarator": "instantiator",
"modifier": "private final",
"original_strin... | {
"body": "public FluentList<FluentWebElement> ancestors() {\n return handleAxe(\"ancestor\");\n }",
"class_method_signature": "Dom.ancestors()",
"constructor": false,
"full_signature": "public FluentList<FluentWebElement> ancestors()",
"identifier": "ancestors",
"invocations": [
"handleAxe"
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_469 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentList",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void ignoringTwoTypes() {\n Class<? extends RuntimeException> firstType = RuntimeException.class;\n Class<? extends RuntimeException> secondType = RuntimeException.class;\n\n assertThat(wait.ignoring(firstType, secondType)).isSameAs(wait);\n Mockito.verify(flue... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<? extends FluentWebElement> elements;",
"type": "List<? extends FluentWebElement>",
"var_name": "elements"
},
{
"declarator": "controlWait",
"modifier": "... | {
"body": "@Override\n public FluentWaitElementList ignoring(Class<? extends RuntimeException> exceptionType) {\n controlWait.ignoring(exceptionType);\n return this;\n }",
"class_method_signature": "FluentWaitElementList.ignoring(Class<? extends RuntimeException> exceptionType)",
"constructor"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_193 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void implicitlyWait() {\n Assertions.assertThat(noConfiguration.getImplicitlyWait()).isNull();\n Assertions.assertThat(defaultConfiguration.getImplicitlyWait()).isNull();\n\n Assertions.assertThat(configuration.getImplicitlyWait()).isEqualTo(1000L);\n }",
"class_... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public Long getImplicitlyWait() {\n return getConfig(() -> getLongValue(configuration.implicitlyWait()));\n }",
"class_method_signature": "AnnotationConfiguration.getImplicitlyWait()",
"constructor": false,
"full_signature": "@Override public Long getImplicitlyWait()",
"ide... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_486 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentList",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void untilFunction() {\n Function<? super FluentControl, ?> isTrue = mock(Function.class);\n\n wait.until(isTrue);\n Mockito.verify(fluentControlWait).until(isTrue);\n }",
"class_method_signature": "FluentWaitElementListTest.untilFunction()",
"constructor": fal... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<? extends FluentWebElement> elements;",
"type": "List<? extends FluentWebElement>",
"var_name": "elements"
},
{
"declarator": "controlWait",
"modifier": "... | {
"body": "public FluentConditions until() {\n return controlWait.until(elements);\n }",
"class_method_signature": "FluentWaitElementList.until()",
"constructor": false,
"full_signature": "public FluentConditions until()",
"identifier": "until",
"invocations": [
"until"
],
"modifiers": "pu... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_605 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testClear() {\n fluentElement.clear();\n verify(element).clear();\n }",
"class_method_signature": "FluentWebElementTest.testClear()",
"constructor": false,
"full_signature": "@Test public void testClear()",
"identifier": "testClear",
"invocations": [
"c... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public FluentWebElement clear() {\n if (!isInputOfTypeFile()) {\n webElement.clear();\n }\n return this;\n }",
"class_method_signature": "FluentWebElement.clear()",
"constructor": false,
"full_signature": "public FluentWebElement clear()",
"identifier": "clear",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_255 | {
"fields": [
{
"declarator": "css",
"modifier": "@FindBy(css = \"css\")\n private",
"original_string": "@FindBy(css = \"css\")\n private FluentWebElement css;",
"type": "FluentWebElement",
"var_name": "css"
},
{
"declarator": "xpath",
"modifier": "@FindBy(x... | {
"body": "@Test\n public void voidShouldPickCorrectSelectorWhenOnMultiplePlatform() throws NoSuchFieldException {\n Field field = this.getClass().getDeclaredField(\"multiPlatformElement\");\n By androidBy = new InjectionAnnotations(field, getAndroidCapablities()).buildBy();\n assertThat(andro... | {
"fields": [
{
"declarator": "classAnnotations",
"modifier": "private final",
"original_string": "private final ClassAnnotations classAnnotations;",
"type": "ClassAnnotations",
"var_name": "classAnnotations"
},
{
"declarator": "fieldAnnotations",
"modifier": "pri... | {
"body": "@Override\n public By buildBy() {\n if (mobileElement) {\n return defaultElementByBuilder.buildBy();\n }\n By fieldBy = fieldAnnotations.buildBy();\n By classBy = classAnnotations.buildBy();\n\n if (classBy != null && fieldBy instanceof ByIdOrName) {\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_53 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasTextContainingOk() {\n when(element.text()).thenReturn(\"There is a 5% increase\");\n elementAssert.hasTextContaining(\"There is a 5%\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasTextContainingOk()",
"constructor": false,
"full_... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasTextContaining(String text) {\n String actualText = actual.text();\n if (!actualText.contains(text)) {\n failWithMessage(\"The element does not contain the text: \" + text\n + \". Actual text found : \" + actualText);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_310 | {
"fields": [
{
"declarator": "fluentControl",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentControl fluentControl;",
"type": "FluentControl",
"var_name": "fluentControl"
},
{
"declarator": "element",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void testElementListFound() {\n WebElement element1 = mock(WebElement.class);\n WebElement element2 = mock(WebElement.class);\n WebElement element3 = mock(WebElement.class);\n\n when(locator.findElements()).thenReturn(Arrays.asList(element1, element2, element3)... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/hook/wait/WaitHook.java",
"identifier": "WaitHook",
"interfaces": "",
"methods": [
{
"class_method_signature": "WaitHook.WaitHook(FluentControl control, ComponentInstantiator instantiator, Supplier<WebElement> elementSupp... | {
"body": "@Override\n public List<WebElement> findElements() {\n return buildAwait().until(new Function<FluentControl, List<WebElement>>() {\n\n @Override\n public List<WebElement> apply(FluentControl input) {\n List<WebElement> elements = WaitHook.super.findElements();... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_594 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element1;",
"type": "FluentWebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testAs() {\n FluentList<Component> as = list.as(Component.class);\n assertThat(as).hasSameSizeAs(list);\n }",
"class_method_signature": "FluentListImplTest.testAs()",
"constructor": false,
"full_signature": "@Test public void testAs()",
"identifier": "testAs"... | {
"fields": [
{
"declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_WAIT_AND_... | {
"body": "@Override\n public <T extends FluentWebElement> FluentList<T> as(Class<T> componentClass) {\n return instantiator\n .newComponentList(getClass(), componentClass, this.stream().map(e -> e.as(componentClass)).collect(toList()));\n }",
"class_method_signature": "FluentListImpl.as... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_202 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void custom() {\n Assertions.assertThat(noConfiguration.getCustomProperty(\"key\")).isNull();\n Assertions.assertThat(defaultConfiguration.getCustomProperty(\"key\")).isNull();\n\n Assertions.assertThat(configuration.getCustomProperty(\"key\")).isEqualTo(\"value\");\n... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public String getCustomProperty(String propertyName) {\n return customProperties.get(propertyName);\n }",
"class_method_signature": "AnnotationConfiguration.getCustomProperty(String propertyName)",
"constructor": false,
"full_signature": "@Override public String getCustomProp... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_652 | {
"fields": [
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver webDriver;",
"type": "WebDriver",
"var_name": "webDriver"
},
{
"declarator": "configuration",
"modifier": "@Mock\n private",
"ori... | {
"body": "@Test\n public void shouldReturnUrl() {\n fluentDriver = spy(new FluentDriver(webDriver, configuration, adapter));\n when(webDriver.getCurrentUrl()).thenReturn(\"https://duckduckgo.com/?q=fluentlenium&ia=web\");\n when(configuration.getBaseUrl()).thenReturn(\"https://duckduckgo.com/... | {
"fields": [
{
"declarator": "LOGGER =\n LoggerFactory.getLogger(FluentDriver.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER =\n LoggerFactory.getLogger(FluentDriver.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public String url() {\n String baseUrl = buildUrl(null);\n\n String currentUrl = getDriver().getCurrentUrl();\n if (currentUrl != null && baseUrl != null && currentUrl.startsWith(baseUrl)) {\n currentUrl = currentUrl.substring(baseUrl.length());\n }\n\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_347 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element1;",
"type": "WebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
"original_... | {
"body": "@Test\n public void testWithNoElement() {\n ElementListInstanceLocator locator = new ElementListInstanceLocator(Collections.emptyList());\n\n Assertions.assertThat(locator.findElement()).isNull();\n Assertions.assertThat(locator.findElements()).isEmpty();\n\n Assertions.asser... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/proxy/ElementListInstanceLocator.java",
"identifier": "ElementListInstanceLocator",
"interfaces": "implements WrapsElements",
"methods": [
{
"class_method_signature": "ElementListInstanceLocator.ElementListInstanceLocator... | {
"body": "@Override\n public List<WebElement> getWrappedElements() {\n return findElements();\n }",
"class_method_signature": "ElementListInstanceLocator.getWrappedElements()",
"constructor": false,
"full_signature": "@Override public List<WebElement> getWrappedElements()",
"identifier": "getWra... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_582 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element1;",
"type": "FluentWebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testOne() {\n when(element2.enabled()).thenReturn(true);\n when(element3.enabled()).thenReturn(true);\n\n assertThat(list.one().enabled()).isTrue();\n\n verify(element1).enabled();\n verify(element2).enabled();\n verify(element3, never()).ena... | {
"fields": [
{
"declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_WAIT_AND_... | {
"body": "@Override\n public FluentListConditions one() {\n return new AtLeastOneElementConditions(this);\n }",
"class_method_signature": "FluentListImpl.one()",
"constructor": false,
"full_signature": "@Override public FluentListConditions one()",
"identifier": "one",
"invocations": [],
"mo... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_428 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/NotContainsMatcherTest.java",
"identifier": "NotContainsMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotContainPattern() {\n NotContainsMatcher matcher = new NotContainsMatcher(Pattern.compile(\"value.*\"));\n\n assertThat(matcher.isSatisfiedBy(\"non-matching\")).isTrue();\n }",
"class_method_signature": "NotContainsMatcherTest.shouldNotContainPattern()",
... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/NotContainsMatcher.java",
"identifier": "NotContainsMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "NotContainsMatcher.NotContainsMatcher(String value)",
"constructor": true,
... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return !CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "NotContainsMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_644 | {
"fields": [
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "searchContext",
"modifier": "@Mock\n private",
"original_str... | {
"body": "@Test\n public void shouldThrowErrorWhenMobileElementNotFound() {\n assertThatThrownBy(() -> search.el(MobileBy.AndroidUIAutomator(\"dummy\")).click())\n .isInstanceOf(NoSuchElementException.class)\n .hasMessageContaining(\"By.AndroidUIAutomator\")\n .... | {
"fields": [
{
"declarator": "searchContext",
"modifier": "private final",
"original_string": "private final SearchContext searchContext;",
"type": "SearchContext",
"var_name": "searchContext"
},
{
"declarator": "container",
"modifier": "private final",
"or... | {
"body": "@Override\n public FluentWebElement el(WebElement rawElement) {\n return find(singletonList(rawElement)).first();\n }",
"class_method_signature": "Search.el(WebElement rawElement)",
"constructor": false,
"full_signature": "@Override public FluentWebElement el(WebElement rawElement)",
"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_214 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private ProgrammaticConfiguration configuration;",
"type": "ProgrammaticConfiguration",
"var_name": "configuration"
},
{
"declarator": "configurationProperties1",
"modifier":... | {
"body": "@Test\n public void htmlDumpPath() {\n testImpl(ConfigurationProperties::getHtmlDumpPath, input -> {\n composed.setHtmlDumpPath(input);\n return null;\n }, null, \"firefox\", \"chrome\");\n }",
"class_method_signature": "ComposedConfigurationTest.htmlDumpPath()",... | {
"fields": [
{
"declarator": "configurations",
"modifier": "private final",
"original_string": "private final ConfigurationProperties[] configurations;",
"type": "ConfigurationProperties[]",
"var_name": "configurations"
},
{
"declarator": "writableConfiguration",
... | {
"body": "@Override\n public void setHtmlDumpPath(String htmlDumpPath) {\n getWritableConfiguration().setHtmlDumpPath(htmlDumpPath);\n }",
"class_method_signature": "ComposedConfiguration.setHtmlDumpPath(String htmlDumpPath)",
"constructor": false,
"full_signature": "@Override public void setHtmlD... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_12 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testIsPresentKo() {\n when(element.present()).thenReturn(false);\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.isPresent())\n .hasMessage(\"Element in assertion is not present\");\n }",
"class_method_signature": "FluentWebElementAssertTest... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert isPresent() {\n if (!actual.present()) {\n failWithMessage(\"Element in assertion is not present\");\n }\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isPresent()",
"constructor": false,
"full_sig... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_351 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnTrueIfStartsWithString() {\n StringConditions stringConditions = new StringConditionsImpl(\"Some magical text.\");\n\n assertThat(stringConditions.startsWith(\"Some\")).isTrue();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturnTrue... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean startsWith(String prefix) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.startsWith(prefix);\n });\n }",
"class_method_signature": "StringConditionsImpl.startsWith(String... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_185 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void capabilitiesCannotBeReadFromUrl() {\n Assertions.assertThatThrownBy(() -> capabilitiesInvalidUrlConfiguration.getCapabilities())\n .isInstanceOf(ConfigurationException.class)\n .hasMessage(\"Can't read Capabilities defined at https://some.nonexist... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public Capabilities getCapabilities() {\n return getConfig(() -> getCapabilitiesValue(configuration.capabilities()));\n }",
"class_method_signature": "AnnotationConfiguration.getCapabilities()",
"constructor": false,
"full_signature": "@Override public Capabilities getCapabil... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_490 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void getWait() {\n wait.getWait();\n Mockito.verify(fluentControlWait).getWait();\n }",
"class_method_signature": "FluentWaitElementTest.getWait()",
"constructor": false,
"full_signature": "@Test public void getWait()",
"identifier": "getWait",
"invocations": [
... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public org.openqa.selenium.support.ui.FluentWait getWait() {\n return controlWait.getWait();\n }",
"class_method_signature": "FluentWaitElement.getWait()",
"constructor": false,
"full_signature": "@Override public org.openqa.selenium.support.ui.FluentWait getWait()",
"ident... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_243 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSanitizeBaseUrlMissingSchemeOtherDomain() {\n String baseUrl = UrlUtils.sanitizeBaseUrl(\"fluentlenium.com/path/\", \"https://www.google.com/path/abc\");\n Assertions.assertThat(baseUrl).isEqualTo(\"http://fluentlenium.com/path/\");\n }",
"class_method_signatur... | {
"fields": [
{
"declarator": "PATH_SEPARATOR = \"/\"",
"modifier": "private static final",
"original_string": "private static final String PATH_SEPARATOR = \"/\";",
"type": "String",
"var_name": "PATH_SEPARATOR"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "... | {
"body": "public static String sanitizeBaseUrl(String baseUriSpec, String uriSpec) {\n if (baseUriSpec != null) {\n URI baseUri = URI.create(baseUriSpec);\n\n try {\n baseUri = ensureScheme(baseUri, HTTP);\n\n URI uri = uriFromSpec(uriSpec);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_613 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testGetTextContext() {\n when(element.getAttribute(\"textContent\")).thenReturn(\"test\");\n assertThat(fluentElement.textContent()).isEqualTo(\"test\");\n }",
"class_method_signature": "FluentWebElementTest.testGetTextContext()",
"constructor": false,
"full_si... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public String textContent() {\n return webElement.getAttribute(\"textContent\");\n }",
"class_method_signature": "FluentWebElement.textContent()",
"constructor": false,
"full_signature": "public String textContent()",
"identifier": "textContent",
"invocations": [
"getAttribute"
],... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_306 | {
"fields": [
{
"declarator": "htmlUnitPerformanceTiming",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private PerformanceTiming htmlUnitPerformanceTiming;",
"type": "PerformanceTiming",
"var_name": "htmlUnitPerformanceTiming"
},
{
"declarator": "me... | {
"body": "@Test\n public void shouldThrowUnsupportedOperationExceptionForRequestStart() {\n assertThatExceptionOfType(UnsupportedOperationException.class).isThrownBy(() -> metrics.getRequestStart());\n }",
"class_method_signature": "HtmlUnitPerformanceTimingMetricsTest.shouldThrowUnsupportedOperationE... | {
"fields": [
{
"declarator": "timing",
"modifier": "private final",
"original_string": "private final PerformanceTiming timing;",
"type": "PerformanceTiming",
"var_name": "timing"
},
{
"declarator": "targetTimeUnit",
"modifier": "private final",
"original_s... | {
"body": "@Override\n public long getRequestStart() {\n throw new UnsupportedOperationException(\"This performance timing attribute is not implemented in HtmlUnit.\");\n }",
"class_method_signature": "HtmlUnitPerformanceTimingMetrics.getRequestStart()",
"constructor": false,
"full_signature": "@Ov... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_45 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void shouldHaveClasses() {\n when(element.attribute(\"class\")).thenReturn(\"clazz clazz2 clazz3 clazz4\");\n elementAssert.hasClasses(\"clazz\", \"clazz2\", \"clazz4\");\n }",
"class_method_signature": "FluentWebElementAssertTest.shouldHaveClasses()",
"constructor": ... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasClasses(String... classesToFind) {\n String actualClasses = actual.attribute(CLASS_ATTRIBUTE);\n\n if (actualClasses == null) {\n failWithMessage(\"The element has no class attribute.\");\n }\n\n if (!getClasses(actualCl... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_541 | {
"fields": [
{
"declarator": "keyboard",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Keyboard keyboard;",
"type": "Keyboard",
"var_name": "keyboard"
},
{
"declarator": "mouse",
"modifier": "@Mock\n private",
"original_string"... | {
"body": "@Test\n public void testBasic() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n Assertions.assertThat(actions.basic()).isSameAs(mouse);\n }",
"class_method_signature": "MouseElementActionsTest.testBasic()",
"constructor": false,
"full_signature": "@Te... | {
"fields": [
{
"declarator": "driver",
"modifier": "private final",
"original_string": "private final WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final ... | {
"body": "@Deprecated\n public Mouse basic() {\n return ((HasInputDevices) driver).getMouse();\n }",
"class_method_signature": "MouseElementActions.basic()",
"constructor": false,
"full_signature": "@Deprecated public Mouse basic()",
"identifier": "basic",
"invocations": [
"getMouse"
],
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_111 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasIdOk() {\n when(fluentList.ids()).thenReturn(singletonList(\"some-id\"));\n listAssert.hasId(\"some-id\");\n }",
"class_method_signature": "FluentListAssertTest.testHasIdOk()",
"constructor": false,
"full_signature": "@Test public void testHasIdOk()",
... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasId(String idToFind) {\n List<String> actualIds = requiresNonEmpty(actual.ids());\n if (!actualIds.contains(idToFind)) {\n failWithMessage(\"No selected elements have id: \" + idToFind\n + \". Actual ids found : \" + actua... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_404 | {
"fields": [
{
"declarator": "A_VALUE = \"value\"",
"modifier": "private static final",
"original_string": "private static final String A_VALUE = \"value\";",
"type": "String",
"var_name": "A_VALUE"
},
{
"declarator": "A_REGEX_VALUE = \"regex.*\"",
"modifier": "p... | {
"body": "@Test\n public void shouldNotSupportCssFilterWhenMatcherIsNull() {\n AbstractMatcher matcher = null;\n AttributeFilter attributeFilter = new AttributeFilter(\"id\", matcher);\n\n assertThat(attributeFilter.isCssFilterSupported()).isFalse();\n }",
"class_method_signature": "Attr... | {
"fields": [
{
"declarator": "attributeName",
"modifier": "private final",
"original_string": "private final String attributeName;",
"type": "String",
"var_name": "attributeName"
},
{
"declarator": "matcher",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n public boolean isCssFilterSupported() {\n return matcher != null\n && matcher.isCssFilterSupported()\n && !\"text\".equalsIgnoreCase(getAttribute())\n && !\"textContent\".equalsIgnoreCase(getAttribute());\n }",
"class_method_signature": "Attribute... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_238 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testAbsoluteUrlReplaceBaseUrl() {\n String test = UrlUtils.concat(\"http://fluentlenium.com/path/\", \"http://www.google.fr/test\");\n Assertions.assertThat(test).isEqualTo(\"http://www.google.fr/test\");\n }",
"class_method_signature": "UrlUtilsTest.testAbsoluteUr... | {
"fields": [
{
"declarator": "PATH_SEPARATOR = \"/\"",
"modifier": "private static final",
"original_string": "private static final String PATH_SEPARATOR = \"/\";",
"type": "String",
"var_name": "PATH_SEPARATOR"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "... | {
"body": "public static String concat(String baseUriSpec, String uriSpec) { // NOPMD CyclomaticComplexity NPathComplexity\n if (baseUriSpec != null && !baseUriSpec.endsWith(PATH_SEPARATOR)) {\n baseUriSpec = baseUriSpec + PATH_SEPARATOR;\n }\n URI baseUri = uriFromSpec(baseUriSpec);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_392 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element;",
"type": "WebElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_strin... | {
"body": "@Test\n public void testPrecedingElementsInList() {\n Dom dom = new Dom(element, instantiator);\n\n List<WebElement> elements = Arrays.asList(mock(WebElement.class), mock(WebElement.class), mock(WebElement.class));\n when(element.findElements(By.xpath(\"preceding::*\"))).thenReturn(... | {
"fields": [
{
"declarator": "webElement",
"modifier": "private final",
"original_string": "private final WebElement webElement;",
"type": "WebElement",
"var_name": "webElement"
},
{
"declarator": "instantiator",
"modifier": "private final",
"original_strin... | {
"body": "public FluentList<FluentWebElement> precedings() {\n return handleAxe(\"preceding\");\n }",
"class_method_signature": "Dom.precedings()",
"constructor": false,
"full_signature": "public FluentList<FluentWebElement> precedings()",
"identifier": "precedings",
"invocations": [
"handleA... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_146 | {
"fields": [
{
"declarator": "retriever",
"modifier": "private",
"original_string": "private CapabilitiesConfigurationPropertyRetriever retriever;",
"type": "CapabilitiesConfigurationPropertyRetriever",
"var_name": "retriever"
}
],
"file": "fluentlenium-core/src/test/java/or... | {
"body": "@Test\n public void capabilitiesClassName() {\n Capabilities capabilities = retriever.getCapabilitiesProperty(TestCapabilities.class.getName(), null);\n\n assertThat(capabilities).isExactlyInstanceOf(TestCapabilities.class);\n }",
"class_method_signature": "CapabilitiesConfigurationPr... | {
"fields": [
{
"declarator": "jsonConverter = new Json()",
"modifier": "private final",
"original_string": "private final Json jsonConverter = new Json();",
"type": "Json",
"var_name": "jsonConverter"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/configurati... | {
"body": "Capabilities getCapabilitiesProperty(String capabilities, ConfigurationProperties globalConfiguration) {\n String property = readCapabilitiesFromUrl(capabilities);\n return Optional.ofNullable(createCapabilitiesFromFactory(property, globalConfiguration))\n .orElseGet(() -> conv... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_516 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void untilFunction() {\n Function<? super FluentControl, ?> isTrue = mock(Function.class);\n\n wait.until(isTrue);\n Mockito.verify(fluentControlWait).until(isTrue);\n }",
"class_method_signature": "FluentWaitElementTest.untilFunction()",
"constructor": false,
... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "public FluentConditions until() {\n return controlWait.until(element);\n }",
"class_method_signature": "FluentWaitElement.until()",
"constructor": false,
"full_signature": "public FluentConditions until()",
"identifier": "until",
"invocations": [
"until"
],
"modifiers": "public"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_453 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkPatternEndsWithNok() {\n assertThat(CalculateService.endsWith(Pattern.compile(\"[ta]*]\"), null, \"ta ta \")).isFalse();\n }",
"class_method_signature": "CalculateServiceTest.checkPatternEndsWithNok()",
"constructor": false,
"full_signature": "@Test public void c... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java",
"identifier": "CalculateService",
"interfaces": "",
"methods": [
{
"class_method_signature": "CalculateService.CalculateService()",
"constructor": true,
"full_signature":... | {
"body": "public static boolean endsWith(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null || currentValue.isEmpty()) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.endsWith(referenceValue);\n }\... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_69 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "fluentPage",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void hasElementsOk() {\n when(list.isEmpty()).thenReturn(false);\n pageAssert.hasElements(list);\n }",
"class_method_signature": "PageAssertTest.hasElementsOk()",
"constructor": false,
"full_signature": "@Test public void hasElementsOk()",
"identifier": "hasElemen... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java",
"identifier": "PageAssert",
"interfaces": "implements PageStateAssert",
"methods": [
{
"class_method_signature": "PageAssert.PageAssert(FluentPage actual)",
"constructor": true,
... | {
"body": "@Override\n public PageAssert hasElements(FluentList<? extends FluentWebElement> fluentList) {\n if (fluentList.isEmpty()) {\n failWithMessage(\"No element selected by '\"\n + fluentList.toString() + \"' is present on the page.\");\n }\n return this;\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_280 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseWithEndingSlash() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def/{param2}/{param3}/\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n assertThat(getParameterOpti... | {
"fields": [
{
"declarator": "PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\");",
"type": "Pattern",
"var_name": "PARAM_REGEX"
},
{
... | {
"body": "public ParsedUrlTemplate parse(String input) {\n String noQueryInput;\n List<NameValuePair> queryParameters;\n\n try {\n URIBuilder uriBuilder = new URIBuilder(input);\n queryParameters = uriBuilder.getQueryParams();\n uriBuilder.setCustomQuery(null);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_86 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasTextOk() {\n when(fluentList.texts()).thenReturn(singletonList(\"some text\"));\n listAssert.hasText(\"some text\");\n }",
"class_method_signature": "FluentListAssertTest.testHasTextOk()",
"constructor": false,
"full_signature": "@Test public void testHa... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasText(String textToFind) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n if (actualTexts.stream().noneMatch(text -> text.contains(textToFind))) {\n failWithMessage(\"No selected elements contains text: \" + textToFind\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_500 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void untilPredicate() {\n Predicate<FluentControl> predicate = mock(Predicate.class);\n\n wait.untilPredicate(predicate);\n Mockito.verify(fluentControlWait).untilPredicate(predicate);\n }",
"class_method_signature": "FluentWaitElementTest.untilPredicate()",
"c... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public void untilPredicate(Predicate<FluentControl> predicate) {\n controlWait.untilPredicate(predicate);\n }",
"class_method_signature": "FluentWaitElement.untilPredicate(Predicate<FluentControl> predicate)",
"constructor": false,
"full_signature": "@Override public void unt... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_150 | {
"fields": [
{
"declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"",
"modifier": "private static final",
"original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";",
"type": "String",
"var_name": "DRIVER_LIFECYCLE"
},
{
"declarator": "ret... | {
"body": "@Test\n public void configurationFactory() {\n assertThat(getConfiguration().getConfigurationFactory()).isNull();\n\n mockProperty(\"configurationFactory\", DummyConfigurationFactory.class);\n assertThat(getConfiguration().getConfigurationFactory()).isEqualTo(DummyConfigurationFacto... | {
"fields": [
{
"declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"",
"modifier": "static final",
"original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";",
"type": "String",
"var_name": "PROPERTIES_PREFIX"
},
{
"declarator": "prefixes",
"mo... | {
"body": "@Override\n public Class<? extends ConfigurationFactory> getConfigurationFactory() {\n return getClassProperty(ConfigurationFactory.class, \"configurationFactory\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getConfigurationFactory()",
"constructor": false,
"full_si... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_445 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkSimpleStartsWithNok() {\n assertThat(CalculateService.startsWith(null, \"to\", \"la to to\")).isFalse();\n }",
"class_method_signature": "CalculateServiceTest.checkSimpleStartsWithNok()",
"constructor": false,
"full_signature": "@Test public void checkSimpleStart... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java",
"identifier": "CalculateService",
"interfaces": "",
"methods": [
{
"class_method_signature": "CalculateService.CalculateService()",
"constructor": true,
"full_signature":... | {
"body": "public static boolean startsWith(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.startsWith(referenceValue);\n }\n java.util.reg... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_296 | {
"fields": [
{
"declarator": "LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\"",
"modifier": "private static final",
"original_string": "private static final String LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\";",
"type": "String",
... | {
"body": "@Test\n public void shouldGetEventValue() {\n when(((JavascriptExecutor) driver).executeScript(LOAD_EVENT_END_SCRIPT)).thenReturn(45L);\n when(((JavascriptExecutor) driver).executeScript(NAVIGATION_START_SCRIPT)).thenReturn(28L);\n\n assertThat(performanceTiming.getEventValue(Perfor... | {
"fields": [
{
"declarator": "PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\"",
"modifier": "private static final",
"original_string": "private static final String PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\";",
"type": "String",
"var_name": "P... | {
"body": "@Override\n public long getEventValue(PerformanceTimingEvent event) {\n checkArgument(event, \"The event should not be null.\");\n return timePassedUntil(execute(scriptFor(event)));\n }",
"class_method_signature": "DefaultPerformanceTiming.getEventValue(PerformanceTimingEvent event)",... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_90 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void hasTextMatchingOk() {\n when(fluentList.texts()).thenReturn(Lists.newArrayList(\"Pharmacy\", \"Hospital\"));\n listAssert.hasTextMatching(\"Pha\\\\w+cy\");\n }",
"class_method_signature": "FluentListAssertTest.hasTextMatchingOk()",
"constructor": false,
"full_s... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasTextMatching(String regexToBeMatched) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n if (actualTexts.stream().noneMatch(text -> text.matches(regexToBeMatched))) {\n failWithMessage(\"No selected elements contains text ma... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_279 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParse() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def/{param2}/{param3}\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n assertThat(getParameterOptionals(urlParamet... | {
"fields": [
{
"declarator": "PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\");",
"type": "Pattern",
"var_name": "PARAM_REGEX"
},
{
... | {
"body": "public ParsedUrlTemplate parse(String input) {\n String noQueryInput;\n List<NameValuePair> queryParameters;\n\n try {\n URIBuilder uriBuilder = new URIBuilder(input);\n queryParameters = uriBuilder.getQueryParams();\n uriBuilder.setCustomQuery(null);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_629 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testHtml() {\n when(element.getAttribute(\"innerHTML\")).thenReturn(\"<html/>\");\n assertThat(fluentElement.html()).isEqualTo(\"<html/>\");\n }",
"class_method_signature": "FluentWebElementTest.testHtml()",
"constructor": false,
"full_signature": "@Test public... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public String html() {\n return webElement.getAttribute(\"innerHTML\");\n }",
"class_method_signature": "FluentWebElement.html()",
"constructor": false,
"full_signature": "public String html()",
"identifier": "html",
"invocations": [
"getAttribute"
],
"modifiers": "public",
"p... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_107 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeGreaterThanOk() {\n when(fluentList.count()).thenReturn(7);\n listAssert.hasSize().greaterThan(6);\n }",
"class_method_signature": "FluentListAssertTest.testHasSizeGreaterThanOk()",
"constructor": false,
"full_signature": "@Test public void testHasSi... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasSize(int expectedSize) {\n int actualSize = actual.count();\n if (actualSize != expectedSize) {\n failWithMessage(\"Expected size: \" + expectedSize + \". Actual size: \" + actualSize + \".\");\n }\n return this;\n }",
"c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_557 | {
"fields": [
{
"declarator": "HTML_DUMP_CONTENT = \"This is the HTML dump.\"",
"modifier": "private static final",
"original_string": "private static final String HTML_DUMP_CONTENT = \"This is the HTML dump.\";",
"type": "String",
"var_name": "HTML_DUMP_CONTENT"
},
{
"... | {
"body": "@Test\n public void shouldTakeHtmlDumpWithConfiguration() throws IOException {\n initializeDestinationFile();\n when(configuration.getHtmlDumpPath()).thenReturn(destinationFile.getParent());\n\n htmlDumper.takeHtmlDump(destinationFile.getName(), () -> HTML_DUMP_CONTENT);\n\n ... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(FluentDriverHtmlDumper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FluentDriverHtmlDumper.class);",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public void takeHtmlDump(String fileName, Supplier<String> htmlSupplier) {\n File destFile = null;\n try {\n destFile = getDestinationFile(fileName);\n FileUtils.write(destFile, htmlSupplier.get(), \"UTF-8\");\n LOGGER.info(\"Created HTML dump at: \" + destFil... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_412 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/ContainsMatcherTest.java",
"identifier": "ContainsMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldContainString() {\n ContainsMatcher matcher = new ContainsMatcher(\"me value\");\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isTrue();\n }",
"class_method_signature": "ContainsMatcherTest.shouldContainString()",
"constructor": false,
"full_signa... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/ContainsMatcher.java",
"identifier": "ContainsMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "ContainsMatcher.ContainsMatcher(String value)",
"constructor": true,
"full_sig... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "ContainsMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public bool... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_28 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasTagNameKo() {\n when(element.tagName()).thenReturn(\"other tag\");\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasTagName(\"some tag\"))\n .hasMessage(\"The element does not have tag: some tag. Actual tag found : other tag\");\n }",... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasTagName(String tagName) {\n String actualTag = actual.tagName();\n if (!actualTag.equals(tagName)) {\n failWithMessage(\"The element does not have tag: \" + tagName\n + \". Actual tag found : \" + actualTag);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_384 | {
"fields": [
{
"declarator": "conditions",
"modifier": "private",
"original_string": "private AtLeastOneElementConditions conditions;",
"type": "AtLeastOneElementConditions",
"var_name": "conditions"
}
],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditi... | {
"body": "@Test\n public void verify() {\n assertThat(conditions.verify(predicate -> true)).isTrue();\n assertThat(conditions.verify(predicate -> false)).isFalse();\n\n assertThat(conditions.not().verify(predicate -> true)).isFalse();\n assertThat(conditions.not().verify(predicate -> f... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/AtLeastOneElementConditions.java",
"identifier": "AtLeastOneElementConditions",
"interfaces": "",
"methods": [
{
"class_method_signature": "AtLeastOneElementConditions.AtLeastOneElementConditions(List<? extends... | {
"body": "@Override\n public boolean verify(Predicate<FluentWebElement> predicate, boolean defaultValue) {\n if (isNegation()) {\n predicate = predicate.negate();\n defaultValue = !defaultValue;\n }\n return buildAtLeastOnePredicate(predicate, defaultValue).test(null);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_29 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasAttributeValueOk() {\n when(element.attribute(\"attribute\")).thenReturn(\"some value\");\n elementAssert.hasAttributeValue(\"attribute\", \"some value\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasAttributeValueOk()",
"constructor... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasAttributeValue(String attribute, String value) {\n String actualValue = actual.attribute(attribute);\n\n if (actualValue == null) {\n failWithMessage(\"The element does not have attribute \" + attribute);\n }\n\n if (!ac... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_385 | {
"fields": [
{
"declarator": "conditions",
"modifier": "private",
"original_string": "private AtLeastOneElementConditions conditions;",
"type": "AtLeastOneElementConditions",
"var_name": "conditions"
}
],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditi... | {
"body": "@Test\n public void present() {\n assertThat(conditions.present()).isTrue();\n assertThat(conditions.not().present()).isFalse();\n\n AtLeastOneElementConditions emptyConditions = new AtLeastOneElementConditions(Collections.emptyList());\n\n assertThat(emptyConditions.present(... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/AtLeastOneElementConditions.java",
"identifier": "AtLeastOneElementConditions",
"interfaces": "",
"methods": [
{
"class_method_signature": "AtLeastOneElementConditions.AtLeastOneElementConditions(List<? extends... | {
"body": "@Override\n public AtLeastOneElementConditions not() {\n AtLeastOneElementConditions negatedConditions = new AtLeastOneElementConditions(getElements());\n negatedConditions.setNegation(!isNegation());\n return negatedConditions;\n }",
"class_method_signature": "AtLeastOneElemen... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_106 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeLessThanOrEqualToKo() {\n when(fluentList.count()).thenReturn(7);\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasSize().lessThanOrEqualTo(6))\n .hasMessage(\"Actual size: 7 is not less than or equal to: 6\");\n }",
"class_method_... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasSize(int expectedSize) {\n int actualSize = actual.count();\n if (actualSize != expectedSize) {\n failWithMessage(\"Expected size: \" + expectedSize + \". Actual size: \" + actualSize + \".\");\n }\n return this;\n }",
"c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_556 | {
"fields": [
{
"declarator": "HTML_DUMP_CONTENT = \"This is the HTML dump.\"",
"modifier": "private static final",
"original_string": "private static final String HTML_DUMP_CONTENT = \"This is the HTML dump.\";",
"type": "String",
"var_name": "HTML_DUMP_CONTENT"
},
{
"... | {
"body": "@Test\n public void shouldTakeHtmlDumpWithNoConfiguration() throws IOException {\n initializeDestinationFile();\n\n htmlDumper.takeHtmlDump(destinationFile.getAbsolutePath(), () -> HTML_DUMP_CONTENT);\n\n assertThat(destinationFile).exists().hasContent(HTML_DUMP_CONTENT);\n }",
... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(FluentDriverHtmlDumper.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(FluentDriverHtmlDumper.class);",
"type": "Logger",
"var_name": "LOGGER"... | {
"body": "public void takeHtmlDump(String fileName, Supplier<String> htmlSupplier) {\n File destFile = null;\n try {\n destFile = getDestinationFile(fileName);\n FileUtils.write(destFile, htmlSupplier.get(), \"UTF-8\");\n LOGGER.info(\"Created HTML dump at: \" + destFil... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_413 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/ContainsMatcherTest.java",
"identifier": "ContainsMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldNotContainString() {\n ContainsMatcher matcher = new ContainsMatcher(\"some value\");\n\n assertThat(matcher.isSatisfiedBy(\"non-matching\")).isFalse();\n }",
"class_method_signature": "ContainsMatcherTest.shouldNotContainString()",
"constructor": false,
... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/ContainsMatcher.java",
"identifier": "ContainsMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "ContainsMatcher.ContainsMatcher(String value)",
"constructor": true,
"full_sig... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "ContainsMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public bool... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_297 | {
"fields": [
{
"declarator": "LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\"",
"modifier": "private static final",
"original_string": "private static final String LOAD_EVENT_END_SCRIPT = \"return window.performance.timing.loadEventEnd;\";",
"type": "String",
... | {
"body": "@Test\n public void shouldReturnNegativeValueIfEventHasNotBeenRegistered() {\n when(((JavascriptExecutor) driver).executeScript(LOAD_EVENT_END_SCRIPT)).thenReturn(0L);\n when(((JavascriptExecutor) driver).executeScript(NAVIGATION_START_SCRIPT)).thenReturn(28L);\n\n assertThat(perfor... | {
"fields": [
{
"declarator": "PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\"",
"modifier": "private static final",
"original_string": "private static final String PERFORMANCE_TIMING_SCRIPT = \"return window.performance.timing;\";",
"type": "String",
"var_name": "P... | {
"body": "@Override\n public long getEventValue(PerformanceTimingEvent event) {\n checkArgument(event, \"The event should not be null.\");\n return timePassedUntil(execute(scriptFor(event)));\n }",
"class_method_signature": "DefaultPerformanceTiming.getEventValue(PerformanceTimingEvent event)",... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_91 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void hasTextMatchingKo() {\n when(fluentList.texts()).thenReturn(Lists.newArrayList(\"Pharmacy\", \"Hospital\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasTextMatching(\"Pha\\\\w+cy\\\\8\"))\n .hasMessage(\"No selected elements contains text ma... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasTextMatching(String regexToBeMatched) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n if (actualTexts.stream().noneMatch(text -> text.matches(regexToBeMatched))) {\n failWithMessage(\"No selected elements contains text ma... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_278 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testRender() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def/{param2}/{param3}\");\n String url = urlParametersTemplate.add(\"test1\").add(\"test2\").add(\"test3\").render();\n assertThat(getParameterNames(urlParametersTemplate)).conta... | {
"fields": [
{
"declarator": "PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\");",
"type": "Pattern",
"var_name": "PARAM_REGEX"
},
{
... | {
"body": "public String render() {\n String rendered = template;\n for (UrlParameter parameter : parameters.values()) {\n Object value = properties.get(parameter);\n String group = parameter.getGroup();\n if (value == null && !parameter.isOptional()) {\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_628 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void shouldReturnOptionalIfElementIsPresent() {\n assertThat(fluentElement.optional()).hasValue(fluentElement);\n }",
"class_method_signature": "FluentWebElementTest.shouldReturnOptionalIfElementIsPresent()",
"constructor": false,
"full_signature": "@Test public void shoul... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "@Override\n public Optional<FluentWebElement> optional() {\n if (present()) {\n return Optional.of(this);\n } else {\n return Optional.empty();\n }\n }",
"class_method_signature": "FluentWebElement.optional()",
"constructor": false,
"full_signature": "... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_501 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void withMessage() {\n String message = \"test\";\n ArgumentCaptor<Supplier<String>> argument = ArgumentCaptor.forClass(Supplier.class);\n\n wait.withMessage(message);\n verify(fluentControlWait).withMessage(argument.capture());\n assertThat(argument.get... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public FluentWaitElement withMessage(Supplier<String> message) {\n controlWait.withMessage(message);\n return this;\n }",
"class_method_signature": "FluentWaitElement.withMessage(Supplier<String> message)",
"constructor": false,
"full_signature": "@Override public Flue... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_151 | {
"fields": [
{
"declarator": "DRIVER_LIFECYCLE = \"driverLifecycle\"",
"modifier": "private static final",
"original_string": "private static final String DRIVER_LIFECYCLE = \"driverLifecycle\";",
"type": "String",
"var_name": "DRIVER_LIFECYCLE"
},
{
"declarator": "ret... | {
"body": "@Test\n public void notConfigurationFactoryClass() {\n assertThat(getConfiguration().getConfigurationFactory()).isNull();\n\n mockProperty(\"configurationFactory\", Object.class);\n assertThat(getConfiguration().getConfigurationFactory()).isNull();\n }",
"class_method_signature... | {
"fields": [
{
"declarator": "PROPERTIES_PREFIX = \"fluentlenium.\"",
"modifier": "static final",
"original_string": "static final String PROPERTIES_PREFIX = \"fluentlenium.\";",
"type": "String",
"var_name": "PROPERTIES_PREFIX"
},
{
"declarator": "prefixes",
"mo... | {
"body": "@Override\n public Class<? extends ConfigurationFactory> getConfigurationFactory() {\n return getClassProperty(ConfigurationFactory.class, \"configurationFactory\");\n }",
"class_method_signature": "PropertiesBackendConfiguration.getConfigurationFactory()",
"constructor": false,
"full_si... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_444 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkSimpleStartsWithReturnsFalseIfCurrentValueIsNull() {\n assertThat(CalculateService.startsWith(Pattern.compile(\".*\"), \"to\", null)).isFalse();\n }",
"class_method_signature": "CalculateServiceTest.checkSimpleStartsWithReturnsFalseIfCurrentValueIsNull()",
"constru... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java",
"identifier": "CalculateService",
"interfaces": "",
"methods": [
{
"class_method_signature": "CalculateService.CalculateService()",
"constructor": true,
"full_signature":... | {
"body": "public static boolean startsWith(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.startsWith(referenceValue);\n }\n java.util.reg... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_68 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "fluentPage",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void hasElementDisplayedKo() {\n when(element.displayed()).thenReturn(false);\n assertThatAssertionErrorIsThrownBy(() -> pageAssert.hasElementDisplayed(element))\n .hasMessage(\"Element element is not displayed on current page\");\n }",
"class_method_sign... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/PageAssert.java",
"identifier": "PageAssert",
"interfaces": "implements PageStateAssert",
"methods": [
{
"class_method_signature": "PageAssert.PageAssert(FluentPage actual)",
"constructor": true,
... | {
"body": "@Override\n public PageAssert hasElementDisplayed(FluentWebElement element) {\n if (!element.displayed()) {\n failWithMessage(\"Element \" + element.toString() + \" is not displayed on current page\");\n }\n return this;\n }",
"class_method_signature": "PageAssert.ha... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_281 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/url/UrlTemplateTest.java",
"identifier": "UrlTemplateTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldThrowExceptionIfUriHasInvalidSyntax() {\n UrlTemplate urlParametersTemplate = new UrlTemplate(\"/abc/{param1}/def/{param2}/{param3}/\");\n assertThat(getParameterNames(urlParametersTemplate)).containsExactly(\"param1\", \"param2\", \"param3\");\n assertThat... | {
"fields": [
{
"declarator": "PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\")",
"modifier": "private static final",
"original_string": "private static final Pattern PARAM_REGEX = Pattern.compile(\"\\\\{(.+?)\\\\}\");",
"type": "Pattern",
"var_name": "PARAM_REGEX"
},
{
... | {
"body": "public ParsedUrlTemplate parse(String input) {\n String noQueryInput;\n List<NameValuePair> queryParameters;\n\n try {\n URIBuilder uriBuilder = new URIBuilder(input);\n queryParameters = uriBuilder.getQueryParams();\n uriBuilder.setCustomQuery(null);\n... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_87 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasTextKo() {\n when(fluentList.texts()).thenReturn(Lists.newArrayList(\"some text\", \"other text\"));\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasText(\"absent text\"))\n .hasMessage(\"No selected elements contains text: absent text. \"\n ... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasText(String textToFind) {\n List<String> actualTexts = requiresNonEmpty(actual.texts());\n if (actualTexts.stream().noneMatch(text -> text.contains(textToFind))) {\n failWithMessage(\"No selected elements contains text: \" + textToFind\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_147 | {
"fields": [
{
"declarator": "retriever",
"modifier": "private",
"original_string": "private CapabilitiesConfigurationPropertyRetriever retriever;",
"type": "CapabilitiesConfigurationPropertyRetriever",
"var_name": "retriever"
}
],
"file": "fluentlenium-core/src/test/java/or... | {
"body": "@Test\n public void capabilitiesFactory() {\n Capabilities capabilities = retriever.getCapabilitiesProperty(\"test-capabilities-factory\", null);\n\n assertThat(capabilities).isExactlyInstanceOf(TestCapabilities.class);\n }",
"class_method_signature": "CapabilitiesConfigurationPropert... | {
"fields": [
{
"declarator": "jsonConverter = new Json()",
"modifier": "private final",
"original_string": "private final Json jsonConverter = new Json();",
"type": "Json",
"var_name": "jsonConverter"
}
],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/configurati... | {
"body": "Capabilities getCapabilitiesProperty(String capabilities, ConfigurationProperties globalConfiguration) {\n String property = readCapabilitiesFromUrl(capabilities);\n return Optional.ofNullable(createCapabilitiesFromFactory(property, globalConfiguration))\n .orElseGet(() -> conv... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_517 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void useCustomMessage() {\n wait.hasMessageDefined();\n Mockito.verify(fluentControlWait).hasMessageDefined();\n }",
"class_method_signature": "FluentWaitElementTest.useCustomMessage()",
"constructor": false,
"full_signature": "@Test public void useCustomMessage()",... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public boolean hasMessageDefined() {\n return controlWait.hasMessageDefined();\n }",
"class_method_signature": "FluentWaitElement.hasMessageDefined()",
"constructor": false,
"full_signature": "@Override public boolean hasMessageDefined()",
"identifier": "hasMessageDefined",... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_452 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/CalculateServiceTest.java",
"identifier": "CalculateServiceTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void checkPatternEndsWithOk() {\n assertThat(CalculateService.endsWith(Pattern.compile(\"[to]*\"), null, \"toto to\")).isTrue();\n\n }",
"class_method_signature": "CalculateServiceTest.checkPatternEndsWithOk()",
"constructor": false,
"full_signature": "@Test public void ch... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/CalculateService.java",
"identifier": "CalculateService",
"interfaces": "",
"methods": [
{
"class_method_signature": "CalculateService.CalculateService()",
"constructor": true,
"full_signature":... | {
"body": "public static boolean endsWith(Pattern patternValue, String referenceValue, String currentValue) {\n if (currentValue == null || currentValue.isEmpty()) {\n return false;\n }\n if (patternValue == null) {\n return currentValue.endsWith(referenceValue);\n }\... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_239 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSanitizeBaseUrl() {\n String baseUrl = UrlUtils.sanitizeBaseUrl(\"http://fluentlenium.com/path/\", \"https://fluentlenium.com/path/abc\");\n Assertions.assertThat(baseUrl).isEqualTo(\"https://fluentlenium.com/path/\");\n }",
"class_method_signature": "UrlUtilsT... | {
"fields": [
{
"declarator": "PATH_SEPARATOR = \"/\"",
"modifier": "private static final",
"original_string": "private static final String PATH_SEPARATOR = \"/\";",
"type": "String",
"var_name": "PATH_SEPARATOR"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "... | {
"body": "public static String sanitizeBaseUrl(String baseUriSpec, String uriSpec) {\n if (baseUriSpec != null) {\n URI baseUri = URI.create(baseUriSpec);\n\n try {\n baseUri = ensureScheme(baseUri, HTTP);\n\n URI uri = uriFromSpec(uriSpec);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_393 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element;",
"type": "WebElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_strin... | {
"body": "@Test\n public void testPrecedingSiblings() {\n Dom dom = new Dom(element, instantiator);\n\n List<WebElement> elements = Arrays.asList(mock(WebElement.class), mock(WebElement.class), mock(WebElement.class));\n when(element.findElements(By.xpath(\"preceding-sibling::*\"))).thenRetur... | {
"fields": [
{
"declarator": "webElement",
"modifier": "private final",
"original_string": "private final WebElement webElement;",
"type": "WebElement",
"var_name": "webElement"
},
{
"declarator": "instantiator",
"modifier": "private final",
"original_strin... | {
"body": "public FluentList<FluentWebElement> precedingSiblings() {\n return handleAxe(\"preceding-sibling\");\n }",
"class_method_signature": "Dom.precedingSiblings()",
"constructor": false,
"full_signature": "public FluentList<FluentWebElement> precedingSiblings()",
"identifier": "precedingSiblin... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_540 | {
"fields": [
{
"declarator": "keyboard",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private Keyboard keyboard;",
"type": "Keyboard",
"var_name": "keyboard"
},
{
"declarator": "mouse",
"modifier": "@Mock\n private",
"original_string"... | {
"body": "@Test\n public void dragAndDropByWithTargetOffset() {\n MouseElementActions actions = new MouseElementActions(driver, element);\n\n LocatableElement target = mock(LocatableElement.class);\n Coordinates targetCoordinates = mock(Coordinates.class);\n when(target.getCoordinates(... | {
"fields": [
{
"declarator": "driver",
"modifier": "private final",
"original_string": "private final WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final ... | {
"body": "public MouseElementActions dragAndDropByWithTargetOffset(WebElement target, int xOffset, int yOffset) {\n loadElementAndPerform(actions().clickAndHold(element).moveToElement(target, xOffset, yOffset).release());\n return this;\n }",
"class_method_signature": "MouseElementActions.dragAndD... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_110 | {
"fields": [
{
"declarator": "fluentList",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentList<FluentWebElement> fluentList;",
"type": "FluentList<FluentWebElement>",
"var_name": "fluentList"
},
{
"declarator": "listAssert",
"modif... | {
"body": "@Test\n public void testHasSizeGreaterThanOrEqualToKo() {\n when(fluentList.count()).thenReturn(7);\n assertThatAssertionErrorIsThrownBy(() -> listAssert.hasSize().greaterThanOrEqualTo(8))\n .hasMessage(\"Actual size: 7 is not greater than or equal to: 8\");\n }",
"clas... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentListAssert.java",
"identifier": "FluentListAssert",
"interfaces": "implements ListStateAssert, ListAttributeAssert",
"methods": [
{
"class_method_signature": "FluentListAssert.FluentListAssert(FluentLis... | {
"body": "@Override\n public FluentListAssert hasSize(int expectedSize) {\n int actualSize = actual.count();\n if (actualSize != expectedSize) {\n failWithMessage(\"Expected size: \" + expectedSize + \". Actual size: \" + actualSize + \".\");\n }\n return this;\n }",
"c... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_405 | {
"fields": [
{
"declarator": "A_VALUE = \"value\"",
"modifier": "private static final",
"original_string": "private static final String A_VALUE = \"value\";",
"type": "String",
"var_name": "A_VALUE"
},
{
"declarator": "A_REGEX_VALUE = \"regex.*\"",
"modifier": "p... | {
"body": "@Test\n public void shouldNotSupportCssFilterWhenCssFilterIsNotSupportedInMatcher() {\n AbstractMatcher matcher = new EqualMatcher(Pattern.compile(A_REGEX_VALUE));\n AttributeFilter attributeFilter = new AttributeFilter(\"id\", matcher);\n\n assertThat(attributeFilter.isCssFilterSup... | {
"fields": [
{
"declarator": "attributeName",
"modifier": "private final",
"original_string": "private final String attributeName;",
"type": "String",
"var_name": "attributeName"
},
{
"declarator": "matcher",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n public boolean isCssFilterSupported() {\n return matcher != null\n && matcher.isCssFilterSupported()\n && !\"text\".equalsIgnoreCase(getAttribute())\n && !\"textContent\".equalsIgnoreCase(getAttribute());\n }",
"class_method_signature": "Attribute... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_242 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/utils/UrlUtilsTest.java",
"identifier": "UrlUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testSanitizeBaseUrlMissingScheme() {\n String baseUrl = UrlUtils.sanitizeBaseUrl(\"fluentlenium.com/path/\", \"https://fluentlenium.com/path/abc\");\n Assertions.assertThat(baseUrl).isEqualTo(\"https://fluentlenium.com/path/\");\n }",
"class_method_signature": "Url... | {
"fields": [
{
"declarator": "PATH_SEPARATOR = \"/\"",
"modifier": "private static final",
"original_string": "private static final String PATH_SEPARATOR = \"/\";",
"type": "String",
"var_name": "PATH_SEPARATOR"
},
{
"declarator": "HTTP = \"http\"",
"modifier": "... | {
"body": "public static String sanitizeBaseUrl(String baseUriSpec, String uriSpec) {\n if (baseUriSpec != null) {\n URI baseUri = URI.create(baseUriSpec);\n\n try {\n baseUri = ensureScheme(baseUri, HTTP);\n\n URI uri = uriFromSpec(uriSpec);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_612 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testGetCssValue() {\n when(element.getCssValue(\"property\")).thenReturn(\"test\");\n assertThat(fluentElement.cssValue(\"property\")).isEqualTo(\"test\");\n }",
"class_method_signature": "FluentWebElementTest.testGetCssValue()",
"constructor": false,
"full_sig... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public String cssValue(String propertyName) {\n return webElement.getCssValue(propertyName);\n }",
"class_method_signature": "FluentWebElement.cssValue(String propertyName)",
"constructor": false,
"full_signature": "public String cssValue(String propertyName)",
"identifier": "cssValue",
... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_307 | {
"fields": [
{
"declarator": "fluentControl",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentControl fluentControl;",
"type": "FluentControl",
"var_name": "fluentControl"
},
{
"declarator": "element",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void testElementNotFound() {\n assertThatThrownBy(() -> waitHook.findElement()).isExactlyInstanceOf(TimeoutException.class);\n }",
"class_method_signature": "WaitHookTest.testElementNotFound()",
"constructor": false,
"full_signature": "@Test public void testElementNotFound... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/hook/wait/WaitHook.java",
"identifier": "WaitHook",
"interfaces": "",
"methods": [
{
"class_method_signature": "WaitHook.WaitHook(FluentControl control, ComponentInstantiator instantiator, Supplier<WebElement> elementSupp... | {
"body": "@Override\n public WebElement findElement() {\n return buildAwait().until(new Function<FluentControl, WebElement>() {\n\n @Override\n public WebElement apply(FluentControl input) {\n return WaitHook.super.findElement();\n }\n\n @Override\... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_44 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void shouldFailWhenHasClass() {\n when(element.attribute(\"class\")).thenReturn(\"clazz other-clazz\");\n assertThatAssertionErrorIsThrownBy(() -> elementAssert.hasNotClass(\"clazz\"))\n .hasMessage(\"The element has class: clazz\");\n }",
"class_method_s... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasNotClass(String htmlClass) {\n String actualClasses = actual.attribute(CLASS_ATTRIBUTE);\n if (actualClasses != null && getClasses(actualClasses).contains(htmlClass)) {\n failWithMessage(\"The element has class: \" + htmlClass);\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_184 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private static",
"original_string": "private static AnnotationConfiguration configuration;",
"type": "AnnotationConfiguration",
"var_name": "configuration"
},
{
"declarator": "defaultConfiguration",
"modi... | {
"body": "@Test\n public void capabilitiesFactory() {\n Assertions.assertThat(capabilitiesFactoryConfiguration.getCapabilities()).isExactlyInstanceOf(TestCapabilities.class);\n }",
"class_method_signature": "AnnotationConfigurationTest.capabilitiesFactory()",
"constructor": false,
"full_signature"... | {
"fields": [
{
"declarator": "configuration",
"modifier": "private final",
"original_string": "private final FluentConfiguration configuration;",
"type": "FluentConfiguration",
"var_name": "configuration"
},
{
"declarator": "customProperties = new HashMap<>()",
"... | {
"body": "@Override\n public Capabilities getCapabilities() {\n return getConfig(() -> getCapabilitiesValue(configuration.capabilities()));\n }",
"class_method_signature": "AnnotationConfiguration.getCapabilities()",
"constructor": false,
"full_signature": "@Override public Capabilities getCapabil... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_491 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentWebElement",
"modifier": "@M... | {
"body": "@Test\n public void atMost() {\n assertThat(wait.atMost(10, TimeUnit.MILLISECONDS)).isSameAs(wait);\n Mockito.verify(fluentControlWait).atMost(Duration.ofMillis(10));\n }",
"class_method_signature": "FluentWaitElementTest.atMost()",
"constructor": false,
"full_signature": "@Test p... | {
"fields": [
{
"declarator": "element",
"modifier": "private final",
"original_string": "private final FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "controlWait",
"modifier": "private final",
"original_str... | {
"body": "@Override\n public FluentWaitElement atMost(Duration duration) {\n controlWait.atMost(duration);\n return this;\n }",
"class_method_signature": "FluentWaitElement.atMost(Duration duration)",
"constructor": false,
"full_signature": "@Override public FluentWaitElement atMost(Duratio... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_645 | {
"fields": [
{
"declarator": "driver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver driver;",
"type": "WebDriver",
"var_name": "driver"
},
{
"declarator": "searchContext",
"modifier": "@Mock\n private",
"original_str... | {
"body": "@Test\n public void shouldThrowErrorWhenPositionNotFound() {\n assertThatThrownBy(() -> search.find(\"cssStyle\").index(0).now())\n .isInstanceOf(NoSuchElementException.class)\n .hasMessageContaining(\"By.cssSelector\")\n .hasMessageContaining(\"cssSty... | {
"fields": [
{
"declarator": "searchContext",
"modifier": "private final",
"original_string": "private final SearchContext searchContext;",
"type": "SearchContext",
"var_name": "searchContext"
},
{
"declarator": "container",
"modifier": "private final",
"or... | {
"body": "@Override\n public FluentList<FluentWebElement> find(String selector, SearchFilter... filters) {\n StringBuilder stringBuilder = new StringBuilder(selector);\n List<SearchFilter> postFilterSelector = new ArrayList<>();\n if (filters != null && filters.length > 0) {\n for ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_215 | {
"fields": [
{
"declarator": "configuration",
"modifier": "private",
"original_string": "private ProgrammaticConfiguration configuration;",
"type": "ProgrammaticConfiguration",
"var_name": "configuration"
},
{
"declarator": "configurationProperties1",
"modifier":... | {
"body": "@Test\n public void screenshotMode() {\n testImpl(ConfigurationProperties::getScreenshotMode, input -> {\n composed.setScreenshotMode(input);\n return null;\n }, null, ConfigurationProperties.TriggerMode.MANUAL, ConfigurationProperties.TriggerMode.AUTOMATIC_ON_FAIL);\... | {
"fields": [
{
"declarator": "configurations",
"modifier": "private final",
"original_string": "private final ConfigurationProperties[] configurations;",
"type": "ConfigurationProperties[]",
"var_name": "configurations"
},
{
"declarator": "writableConfiguration",
... | {
"body": "@Override\n public void setScreenshotMode(TriggerMode screenshotMode) {\n getWritableConfiguration().setScreenshotMode(screenshotMode);\n }",
"class_method_signature": "ComposedConfiguration.setScreenshotMode(TriggerMode screenshotMode)",
"constructor": false,
"full_signature": "@Overrid... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_13 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testIsNotPresentOk() {\n when(element.present()).thenReturn(false);\n elementAssert.isNotPresent();\n }",
"class_method_signature": "FluentWebElementAssertTest.testIsNotPresentOk()",
"constructor": false,
"full_signature": "@Test public void testIsNotPresentOk(... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert isNotPresent() {\n if (actual.present()) {\n failWithMessage(\"Element in assertion is present\");\n }\n return this;\n }",
"class_method_signature": "FluentWebElementAssert.isNotPresent()",
"constructor": false,
"full_si... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_350 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/conditions/StringConditionsImplTest.java",
"identifier": "StringConditionsImplTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldReturnFalseForContainsIfTargetStringIsNull() {\n StringConditions stringConditions = new StringConditionsImpl(null);\n\n assertThat(stringConditions.contains(\"magical\")).isFalse();\n }",
"class_method_signature": "StringConditionsImplTest.shouldReturnFalseF... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/StringConditionsImpl.java",
"identifier": "StringConditionsImpl",
"interfaces": "implements StringConditions",
"methods": [
{
"class_method_signature": "StringConditionsImpl.StringConditionsImpl(String string)"... | {
"body": "@Override\n public boolean contains(CharSequence charSequence) {\n return verify(input -> {\n if (input == null) {\n return false;\n }\n return input.contains(charSequence);\n });\n }",
"class_method_signature": "StringConditionsImpl.con... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_583 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element1;",
"type": "FluentWebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
... | {
"body": "@Test\n public void testClick() {\n when(element2.conditions().clickable()).thenReturn(true);\n when(element3.conditions().clickable()).thenReturn(true);\n\n list.click();\n\n verify(element1, never()).click();\n verify(element2).click();\n verify(element3).clic... | {
"fields": [
{
"declarator": "DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5)",
"modifier": "private static final",
"original_string": "private static final Duration DEFAULT_WAIT_AND_CLICK_DURATION = Duration.ofSeconds(5);",
"type": "Duration",
"var_name": "DEFAULT_WAIT_AND_... | {
"body": "@Override\n public FluentList<E> click() {\n return doClick(FluentWebElement::click, \"click\");\n }",
"class_method_signature": "FluentListImpl.click()",
"constructor": false,
"full_signature": "@Override public FluentList<E> click()",
"identifier": "click",
"invocations": [
"do... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_429 | {
"fields": [],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/core/filter/matcher/NotContainsMatcherTest.java",
"identifier": "NotContainsMatcherTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void shouldContainPattern() {\n NotContainsMatcher matcher = new NotContainsMatcher(Pattern.compile(\"me value.*\"));\n\n assertThat(matcher.isSatisfiedBy(\"some value\")).isFalse();\n }",
"class_method_signature": "NotContainsMatcherTest.shouldContainPattern()",
"con... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/filter/matcher/NotContainsMatcher.java",
"identifier": "NotContainsMatcher",
"interfaces": "",
"methods": [
{
"class_method_signature": "NotContainsMatcher.NotContainsMatcher(String value)",
"constructor": true,
... | {
"body": "@Override\n public boolean isSatisfiedBy(String currentValue) {\n return !CalculateService.contains(getPattern(), getValue(), currentValue);\n }",
"class_method_signature": "NotContainsMatcher.isSatisfiedBy(String currentValue)",
"constructor": false,
"full_signature": "@Override public ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_203 | {
"fields": [
{
"declarator": "webDrivers",
"modifier": "private",
"original_string": "private WebDriversRegistryImpl webDrivers;",
"type": "WebDriversRegistryImpl",
"var_name": "webDrivers"
}
],
"file": "fluentlenium-core/src/test/java/org/fluentlenium/configuration/WebDrive... | {
"body": "@Test\n public void testCustomClassName() {\n WebDriverFactory customWebFactory = webDrivers.get(CustomWebDriver.class.getName());\n WebDriver webDriver = customWebFactory.newWebDriver(null, null);\n\n try {\n assertThat(webDriver).isExactlyInstanceOf(CustomWebDriver.clas... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/configuration/WebDriversRegistryImpl.java",
"identifier": "WebDriversRegistryImpl",
"interfaces": "",
"methods": [
{
"class_method_signature": "WebDriversRegistryImpl.WebDriversRegistryImpl()",
"constructor": true,
... | {
"body": "public WebDriver newWebDriver(String name, Capabilities capabilities, ConfigurationProperties configuration) {\n synchronized (this) {\n return get(name).newWebDriver(capabilities, configuration);\n }\n }",
"class_method_signature": "WebDriversRegistryImpl.newWebDriver(String ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_653 | {
"fields": [
{
"declarator": "webDriver",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebDriver webDriver;",
"type": "WebDriver",
"var_name": "webDriver"
},
{
"declarator": "configuration",
"modifier": "@Mock\n private",
"ori... | {
"body": "@Test\n public void shouldGoToPage() {\n fluentDriver = spy(new FluentDriver(webDriver, configuration, adapter));\n FluentPage fluentPage = mock(FluentPage.class);\n when(fluentPage.go()).thenReturn(mock(FluentPage.class));\n\n fluentDriver.goTo(fluentPage);\n verify(f... | {
"fields": [
{
"declarator": "LOGGER =\n LoggerFactory.getLogger(FluentDriver.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER =\n LoggerFactory.getLogger(FluentDriver.class);",
"type": "Logger",
"var_name": "L... | {
"body": "@Override\n public <P extends FluentPage> P goTo(P page) {\n checkArgument(page, \"It is required to specify an instance of FluentPage for navigation.\");\n page.go();\n return page;\n }",
"class_method_signature": "FluentDriver.goTo(P page)",
"constructor": false,
"full_si... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_346 | {
"fields": [
{
"declarator": "element1",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private WebElement element1;",
"type": "WebElement",
"var_name": "element1"
},
{
"declarator": "element2",
"modifier": "@Mock\n private",
"original_... | {
"body": "@Test\n public void testWithMockElements() {\n ElementListInstanceLocator locator = new ElementListInstanceLocator(\n Arrays.asList(element1, element2, element3, element4));\n\n Assertions.assertThat(locator.findElement()).isSameAs(element1);\n Assertions.assertThat(l... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/proxy/ElementListInstanceLocator.java",
"identifier": "ElementListInstanceLocator",
"interfaces": "implements WrapsElements",
"methods": [
{
"class_method_signature": "ElementListInstanceLocator.ElementListInstanceLocator... | {
"body": "@Override\n public List<WebElement> getWrappedElements() {\n return findElements();\n }",
"class_method_signature": "ElementListInstanceLocator.getWrappedElements()",
"constructor": false,
"full_signature": "@Override public List<WebElement> getWrappedElements()",
"identifier": "getWra... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_595 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test\n public void testClick() {\n fluentElement.click();\n verify(element).click();\n }",
"class_method_signature": "FluentWebElementTest.testClick()",
"constructor": false,
"full_signature": "@Test public void testClick()",
"identifier": "testClick",
"invocations": [
"c... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "@Override\n public FluentWebElement click() {\n webElement.click();\n return this;\n }",
"class_method_signature": "FluentWebElement.click()",
"constructor": false,
"full_signature": "@Override public FluentWebElement click()",
"identifier": "click",
"invocations": [
"clic... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_604 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private LocatableElement element;",
"type": "LocatableElement",
"var_name": "element"
},
{
"declarator": "driver",
"modifier": "@Mock\n private",
"or... | {
"body": "@Test(expected = ComponentException.class)\n public void testAsInvalidClass() {\n fluentElement.as(InvalidComponent.class);\n }",
"class_method_signature": "FluentWebElementTest.testAsInvalidClass()",
"constructor": false,
"full_signature": "@Test(expected = ComponentException.class) pub... | {
"fields": [
{
"declarator": "search",
"modifier": "private final",
"original_string": "private final Search search;",
"type": "Search",
"var_name": "search"
},
{
"declarator": "dom",
"modifier": "private final",
"original_string": "private final Dom dom;",... | {
"body": "public <T> T as(Class<T> componentClass) {\n T component = instantiator.newComponent(componentClass, getElement());\n control.injectComponent(component, this, getElement());\n return component;\n }",
"class_method_signature": "FluentWebElement.as(Class<T> componentClass)",
"cons... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_254 | {
"fields": [
{
"declarator": "css",
"modifier": "@FindBy(css = \"css\")\n private",
"original_string": "@FindBy(css = \"css\")\n private FluentWebElement css;",
"type": "FluentWebElement",
"var_name": "css"
},
{
"declarator": "xpath",
"modifier": "@FindBy(x... | {
"body": "@Test\n public void shouldInjectWindowsAutomationField() throws NoSuchFieldException {\n Field windowsField = this.getClass().getDeclaredField(\"windowsAutomation\");\n InjectionAnnotations annotations = new InjectionAnnotations(windowsField, getWindowsCapabilities());\n By by = ann... | {
"fields": [
{
"declarator": "classAnnotations",
"modifier": "private final",
"original_string": "private final ClassAnnotations classAnnotations;",
"type": "ClassAnnotations",
"var_name": "classAnnotations"
},
{
"declarator": "fieldAnnotations",
"modifier": "pri... | {
"body": "@Override\n public By buildBy() {\n if (mobileElement) {\n return defaultElementByBuilder.buildBy();\n }\n By fieldBy = fieldAnnotations.buildBy();\n By classBy = classAnnotations.buildBy();\n\n if (classBy != null && fieldBy instanceof ByIdOrName) {\n ... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_52 | {
"fields": [
{
"declarator": "element",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWebElement element;",
"type": "FluentWebElement",
"var_name": "element"
},
{
"declarator": "elementAssert",
"modifier": "private",
"origin... | {
"body": "@Test\n public void testHasTextOk() {\n when(element.text()).thenReturn(\"There is a 5% increase\");\n elementAssert.hasText(\"There is a 5% increase\");\n }",
"class_method_signature": "FluentWebElementAssertTest.testHasTextOk()",
"constructor": false,
"full_signature": "@Test pu... | {
"fields": [],
"file": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"identifier": "FluentWebElementAssert",
"interfaces": "implements ElementStateAssert, ElementAttributeAssert",
"methods": [
{
"class_method_signature": "FluentWebElementAssert.Fl... | {
"body": "@Override\n public FluentWebElementAssert hasText(String textToFind) {\n String actualText = actual.text();\n if (!actualText.contains(textToFind)) {\n failWithMessage(\"The element does not contain the text: \" + textToFind\n + \". Actual text found : \" + ac... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_311 | {
"fields": [
{
"declarator": "fluentControl",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentControl fluentControl;",
"type": "FluentControl",
"var_name": "fluentControl"
},
{
"declarator": "element",
"modifier": "@Mock\n privat... | {
"body": "@Test\n public void testElementClick() {\n WebElement childElement = mock(WebElement.class);\n\n waitHook.click();\n verify(element).click();\n }",
"class_method_signature": "WaitHookTest.testElementClick()",
"constructor": false,
"full_signature": "@Test public void testEl... | {
"fields": [],
"file": "fluentlenium-core/src/main/java/org/fluentlenium/core/hook/wait/WaitHook.java",
"identifier": "WaitHook",
"interfaces": "",
"methods": [
{
"class_method_signature": "WaitHook.WaitHook(FluentControl control, ComponentInstantiator instantiator, Supplier<WebElement> elementSupp... | {
"body": "@Override\n public void click() {\n buildAwait().until(() -> getFluentWebElement().present() && getFluentWebElement().clickable());\n super.click();\n }",
"class_method_signature": "WaitHook.click()",
"constructor": false,
"full_signature": "@Override public void click()",
"iden... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
2088736_468 | {
"fields": [
{
"declarator": "fluentControlWait",
"modifier": "@Mock\n private",
"original_string": "@Mock\n private FluentWait fluentControlWait;",
"type": "FluentWait",
"var_name": "fluentControlWait"
},
{
"declarator": "fluentList",
"modifier": "@Mock\n ... | {
"body": "@Test\n public void ignoring() {\n Class<? extends RuntimeException> exceptionType = RuntimeException.class;\n\n assertThat(wait.ignoring(exceptionType)).isSameAs(wait);\n Mockito.verify(fluentControlWait).ignoring(exceptionType);\n }",
"class_method_signature": "FluentWaitElem... | {
"fields": [
{
"declarator": "elements",
"modifier": "private final",
"original_string": "private final List<? extends FluentWebElement> elements;",
"type": "List<? extends FluentWebElement>",
"var_name": "elements"
},
{
"declarator": "controlWait",
"modifier": "... | {
"body": "@Override\n public FluentWaitElementList ignoring(Class<? extends RuntimeException> exceptionType) {\n controlWait.ignoring(exceptionType);\n return this;\n }",
"class_method_signature": "FluentWaitElementList.ignoring(Class<? extends RuntimeException> exceptionType)",
"constructor"... | {
"created": "7/22/2011 1:26:37 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 2088736,
"size": null,
"stargazer_count": null,
"stars": 723,
"updates": "2020-01-25T15:44:19+00:00",
"url": "https://github.com/FluentLenium/Flue... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.