com.epam.healenium.processor.FindElementsProcessor Maven / Gradle / Ivy
The newest version!
package com.epam.healenium.processor;
import lombok.extern.slf4j.Slf4j;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.remote.RemoteWebElement;
import java.util.List;
/**
* Find webElements from driver processor
*/
@Slf4j(topic = "healenium")
public class FindElementsProcessor extends BaseProcessor {
public FindElementsProcessor(BaseProcessor nextProcessor) {
super(nextProcessor);
}
@Override
public void execute() {
List pageElements = driver.findElements(context.getBy());
pageElements.forEach(e -> context.getElementIds().add(((RemoteWebElement) e).getId()));
engine.saveElements(context, pageElements);
context.setElements(pageElements);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy