@Override
public void onAccessibilityEvent(AccessibilityEvent event) {
if (event.getEventType() == AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED) {
AccessibilityNodeInfo rootNode = getRootInActiveWindow();
if (rootNode != null) {
if (scanForTargetName(rootNode)) {
stopSwiping();
return;
}
}
startSwiping();
}
}
import com.codeborne.selenide.Selenide;
import org.openqa.selenium.Cookie;
import java.util.Set;
public class CookieExample {
public static void main(String[] args) {
Selenide.open("https://example.com/login");
Set<Cookie> cookies = Selenide.getWebDriver().manage().getCookies();
for (Cookie cookie : cookies) {
if (cookie.getName().equals("refresh")) {
String refreshToken = cookie.getValue();
System.out.println("Refresh Token: " + refreshToken);
}
}
}
}
dependencies {
implementation 'com.codeborne:selenide:6.10.0'
}
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import java.io.FileInputStream;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
FileInputStream file = new FileInputStream("C:\\Users\\user\\Downloads\\report.xlsx");
XSSFWorkbook workbook = new XSSFWorkbook(file);
XSSFSheet sheet = workbook.getSheetAt(0);
workbook.close();
file.close();
}
}