Remove unused findInput and findSubmit methods
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
28c2263601
commit
9ef9f8bce4
@ -280,40 +280,6 @@ public class EtsScraper {
|
||||
System.out.println("[*] Notification dialog closed");
|
||||
}
|
||||
|
||||
private static String findInput(Page page, String[] selectors) {
|
||||
for (String selector : selectors) {
|
||||
try {
|
||||
if (page.locator(selector).first().isVisible(
|
||||
new Locator.IsVisibleOptions().setTimeout(1000))) {
|
||||
return selector;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String findSubmit(Page page) {
|
||||
String[] selectors = new String[]{
|
||||
"button[type='submit']",
|
||||
"input[type='submit']",
|
||||
"button:has-text('登录')",
|
||||
"button:has-text('Login')",
|
||||
".login-btn",
|
||||
"#loginBtn",
|
||||
};
|
||||
for (String selector : selectors) {
|
||||
try {
|
||||
if (page.locator(selector).first().isVisible(
|
||||
new Locator.IsVisibleOptions().setTimeout(1000))) {
|
||||
return selector;
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void screenshot(Page page, String name) {
|
||||
try {
|
||||
String timestamp = LocalDateTime.now()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user