From 86f63d0870d17ca3c6bef5becbe99faf3cf1946d Mon Sep 17 00:00:00 2001 From: "Meleshko, Aleksey2" Date: Mon, 17 Feb 2020 16:19:48 +0300 Subject: [PATCH] Fix javadocs errors and warnings --- .../core/elements/interfaces/IElement.java | 2 +- .../elements/interfaces/IElementFactory.java | 48 +++++++++++++------ .../elements/interfaces/IElementFinder.java | 2 +- .../selenium/core/logging/Logger.java | 1 + 4 files changed, 36 insertions(+), 17 deletions(-) diff --git a/src/main/java/aquality/selenium/core/elements/interfaces/IElement.java b/src/main/java/aquality/selenium/core/elements/interfaces/IElement.java index 1240daa..a7871f5 100644 --- a/src/main/java/aquality/selenium/core/elements/interfaces/IElement.java +++ b/src/main/java/aquality/selenium/core/elements/interfaces/IElement.java @@ -29,7 +29,7 @@ public interface IElement extends IParent { /** * Gets current element by specified {@link #getLocator()} - * Default timeout is provided in {@link aquality.selenium.core.configurations.ITimeoutConfiguration}/> + * Default timeout is provided in {@link aquality.selenium.core.configurations.ITimeoutConfiguration} * {@link org.openqa.selenium.NoSuchElementException} throws if element not found * * @return instance of {@link RemoteWebElement} if found. diff --git a/src/main/java/aquality/selenium/core/elements/interfaces/IElementFactory.java b/src/main/java/aquality/selenium/core/elements/interfaces/IElementFactory.java index 7d9f9fa..63e09bf 100644 --- a/src/main/java/aquality/selenium/core/elements/interfaces/IElementFactory.java +++ b/src/main/java/aquality/selenium/core/elements/interfaces/IElementFactory.java @@ -39,10 +39,10 @@ default T getCustomElement(IElementSupplier elementSuppl /** * Create custom element according to passed parameters. * - * @param clazz Class or interface of the element to be obtained. - * @param locator Locator of the target element. - * @param name Name of the target element. - * @param Type of the target element. + * @param clazz Class or interface of the element to be obtained. + * @param locator Locator of the target element. + * @param name Name of the target element. + * @param Type of the target element. * @return Instance of custom element. */ default T getCustomElement(Class clazz, By locator, String name) { @@ -52,11 +52,11 @@ default T getCustomElement(Class clazz, By locator, Stri /** * Create custom element according to passed parameters. * - * @param clazz Class or interface of the element to be obtained. - * @param locator Locator of the target element. - * @param name Name of the target element. - * @param state Visibility state of the target element. - * @param Type of the target element. + * @param clazz Class or interface of the element to be obtained. + * @param locator Locator of the target element. + * @param name Name of the target element. + * @param state Visibility state of the target element. + * @param Type of the target element. * @return Instance of custom element. */ T getCustomElement(Class clazz, By locator, String name, ElementState state); @@ -69,6 +69,7 @@ default T getCustomElement(Class clazz, By locator, Stri * @param name Child element name. * @param parentElement Parent element for relative search of child element. * @param state Visibility state of target element. + * @param Type of the target element. * @return Child element. */ T findChildElement(IElement parentElement, By childLoc, String name, @@ -81,10 +82,11 @@ T findChildElement(IElement parentElement, By childLoc, Str * @param clazz Class or interface of the element to be obtained. * @param name Child element name. * @param parentElement Parent element for relative search of child element. + * @param Type of the target element. * @return Child element. */ default T findChildElement(IElement parentElement, By childLoc, String name, - Class clazz) { + Class clazz) { return findChildElement(parentElement, childLoc, name, clazz, ElementState.EXISTS_IN_ANY_STATE); } @@ -95,6 +97,7 @@ default T findChildElement(IElement parentElement, By child * @param clazz Class or interface of the element to be obtained. * @param parentElement Parent element for relative search of child element. * @param state Visibility state of child element. + * @param Type of the target element. * @return Child element. */ default T findChildElement(IElement parentElement, By childLoc, @@ -108,6 +111,7 @@ default T findChildElement(IElement parentElement, By child * @param childLoc Locator of child element relative to its parent. * @param clazz Class or interface of the element to be obtained. * @param parentElement Parent element for relative search of child element. + * @param Type of the target element. * @return Child element. */ default T findChildElement(IElement parentElement, By childLoc, @@ -122,10 +126,11 @@ default T findChildElement(IElement parentElement, By child * @param supplier Required element's supplier. * @param name Child element name. * @param parentElement Parent element for relative search of child element. + * @param Type of the target element. * @return Child element. */ default T findChildElement(IElement parentElement, By childLoc, String name, - IElementSupplier supplier) { + IElementSupplier supplier) { return findChildElement(parentElement, childLoc, name, supplier, ElementState.EXISTS_IN_ANY_STATE); } @@ -137,6 +142,7 @@ default T findChildElement(IElement parentElement, By child * @param name Child element name. * @param parentElement Parent element for relative search of child element. * @param state Visibility state of child element. + * @param Type of the target element. * @return Child element. */ T findChildElement(IElement parentElement, By childLoc, String name, @@ -149,10 +155,11 @@ T findChildElement(IElement parentElement, By childLoc, Str * @param supplier Required element's supplier. * @param parentElement Parent element for relative search of child element. * @param state Visibility state of child element. + * @param Type of the target element. * @return Child element. */ default T findChildElement(IElement parentElement, By childLoc, - IElementSupplier supplier, ElementState state) { + IElementSupplier supplier, ElementState state) { return findChildElement(parentElement, childLoc, null, supplier, state); } @@ -162,10 +169,11 @@ default T findChildElement(IElement parentElement, By child * @param childLoc Locator of child element relative to its parent. * @param supplier Required element's supplier. * @param parentElement Parent element for relative search of child element. + * @param Type of the target element. * @return Child element. */ default T findChildElement(IElement parentElement, By childLoc, - IElementSupplier supplier) { + IElementSupplier supplier) { return findChildElement(parentElement, childLoc, supplier, ElementState.EXISTS_IN_ANY_STATE); } @@ -173,10 +181,11 @@ default T findChildElement(IElement parentElement, By child * Find list of elements. * * @param locator Elements selector. - * @param name Child element name. + * @param name Child element name. * @param supplier Required elements' supplier. * @param count Expected number of elements that have to be found (zero, more then zero, any). * @param state Visibility state of target elements. + * @param Type of the target element. * @return List of elements. */ List findElements(By locator, String name, IElementSupplier supplier, ElementsCount count, @@ -189,10 +198,11 @@ List findElements(By locator, String name, IElementSuppl * @param supplier Required elements' supplier. * @param count Expected number of elements that have to be found (zero, more then zero, any). * @param state Visibility state of target elements. + * @param Type of the target element. * @return List of elements. */ default List findElements(By locator, IElementSupplier supplier, ElementsCount count, - ElementState state) { + ElementState state) { return findElements(locator, null, supplier, count, state); } @@ -203,6 +213,8 @@ default List findElements(By locator, IElementSupplier Type of the target element. * @return List of elements. */ List findElements(By locator, String name, Class clazz, ElementsCount count, ElementState state); @@ -213,6 +225,8 @@ default List findElements(By locator, IElementSupplier Type of the target element. * @return List of elements. */ default List findElements(By locator, Class clazz, ElementsCount count, ElementState state) { @@ -224,6 +238,7 @@ default List findElements(By locator, Class clazz, El * * @param locator Elements selector. * @param clazz Class or interface of elements to be obtained. + * @param Type of the target element. * @return List of elements. */ default List findElements(By locator, Class clazz) { @@ -237,6 +252,7 @@ default List findElements(By locator, Class clazz) { * @param clazz Class or interface of elements to be obtained. * @param name Child element name. * @param count Expected number of elements that have to be found (zero, more then zero, any). + * @param Type of the target element. * @return List of elements. */ default List findElements(By locator, String name, Class clazz, ElementsCount count) { @@ -249,6 +265,7 @@ default List findElements(By locator, String name, Class * @param locator Elements selector. * @param name Child element name. * @param clazz Class or interface of elements to be obtained. + * @param Type of the target element. * @return List of elements. */ default List findElements(By locator, String name, Class clazz) { @@ -261,6 +278,7 @@ default List findElements(By locator, String name, Class * @param locator Elements selector. * @param clazz Class or interface of elements to be obtained. * @param count Expected number of elements that have to be found (zero, more then zero, any). + * @param Type of the target element. * @return List of elements. */ default List findElements(By locator, Class clazz, ElementsCount count) { diff --git a/src/main/java/aquality/selenium/core/elements/interfaces/IElementFinder.java b/src/main/java/aquality/selenium/core/elements/interfaces/IElementFinder.java index f4fcc01..1787b65 100644 --- a/src/main/java/aquality/selenium/core/elements/interfaces/IElementFinder.java +++ b/src/main/java/aquality/selenium/core/elements/interfaces/IElementFinder.java @@ -16,7 +16,7 @@ * - empty - to get all elements; * - desired {@link ElementState}; * - with {@link DesiredState}; - * - with {@link Predicate}. + * - with {@link Predicate}. */ public interface IElementFinder extends SearchContext { diff --git a/src/main/java/aquality/selenium/core/logging/Logger.java b/src/main/java/aquality/selenium/core/logging/Logger.java index 28a8256..d366cee 100644 --- a/src/main/java/aquality/selenium/core/logging/Logger.java +++ b/src/main/java/aquality/selenium/core/logging/Logger.java @@ -27,6 +27,7 @@ public static Logger getInstance() { * Adds appender * * @param appender Appender to be added + * @return logger instance */ public Logger addAppender(Appender appender) { log4J.get().addAppender(appender);