Class SingleThreadHighlighterImpl
- java.lang.Object
-
- ru.iopump.qa.support.selenium.listener.SingleThreadHighlighterImpl
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,Highlighter
@NotThreadSafe public class SingleThreadHighlighterImpl extends java.lang.Object implements Highlighter
Single thread and singleWebDriverimplementation.
-
-
Constructor Summary
Constructors Constructor Description SingleThreadHighlighterImpl()Constructor.SingleThreadHighlighterImpl(int px, java.lang.String color)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddropState()Remove last Highlighted element and other cache.booleanhighlight(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Highlight element in driver and save this element forHighlighter.unhighlightPrev(org.openqa.selenium.WebElement, org.openqa.selenium.WebDriver).booleanunhighlightPrev(org.openqa.selenium.WebElement elementWillBeHighlighted, org.openqa.selenium.WebDriver driver)Turn off highlighting for last saved element duringHighlighter.highlight(org.openqa.selenium.WebElement, org.openqa.selenium.WebDriver)or do nothing if no active element.
-
-
-
Method Detail
-
highlight
public boolean highlight(org.openqa.selenium.WebElement element, org.openqa.selenium.WebDriver driver)Description copied from interface:HighlighterHighlight element in driver and save this element forHighlighter.unhighlightPrev(org.openqa.selenium.WebElement, org.openqa.selenium.WebDriver).- Specified by:
highlightin interfaceHighlighter- Parameters:
element- WebDriver to Highlight.driver- WebDriver with JS.- Returns:
- success action
-
unhighlightPrev
public boolean unhighlightPrev(org.openqa.selenium.WebElement elementWillBeHighlighted, org.openqa.selenium.WebDriver driver)Description copied from interface:HighlighterTurn off highlighting for last saved element duringHighlighter.highlight(org.openqa.selenium.WebElement, org.openqa.selenium.WebDriver)or do nothing if no active element.- Specified by:
unhighlightPrevin interfaceHighlighter- Parameters:
elementWillBeHighlighted- WebDriver to Turn off highlighting.driver- WebDriver with JS.- Returns:
- success action
-
dropState
public void dropState()
Description copied from interface:HighlighterRemove last Highlighted element and other cache.- Specified by:
dropStatein interfaceHighlighter
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-