2025-07-07 22:00~23:00
* 복본검사 검색대상(도서관) : 기본입력을 한글로 검색시 검색윈도우 최소화 기능 일시 중지 검색옵션추가 (전체, 오류+없음, 오류, 없음)
This commit is contained in:
@@ -212,7 +212,7 @@ namespace BokBonCheck
|
||||
options.AddArgument("--no-sandbox");
|
||||
options.AddArgument("--disable-dev-shm-usage");
|
||||
options.AddArgument("--disable-gpu");
|
||||
options.AddArgument("--window-size=1920,1080");
|
||||
options.AddArgument("--window-size=640,700");
|
||||
options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36");
|
||||
options.AddArgument("--disable-blink-features=AutomationControlled");
|
||||
options.AddExcludedArgument("enable-automation");
|
||||
@@ -277,11 +277,12 @@ namespace BokBonCheck
|
||||
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
||||
|
||||
// 모든 감지 방법이 끝나면 크롬창 최소화
|
||||
IntPtr chromeWindow = FindWindow("Chrome_WidgetWin_1", null);
|
||||
if (chromeWindow != IntPtr.Zero)
|
||||
{
|
||||
ShowWindow(chromeWindow, SW_MINIMIZE);
|
||||
}
|
||||
// whale 브라우저가 최소화되어 우선해제
|
||||
//IntPtr chromeWindow = FindWindow("Chrome_WidgetWin_1", null);
|
||||
//if (chromeWindow != IntPtr.Zero)
|
||||
//{
|
||||
// ShowWindow(chromeWindow, SW_MINIMIZE);
|
||||
//}
|
||||
|
||||
//대상도서관 선택
|
||||
SelectLibrary(wait);
|
||||
@@ -425,7 +426,9 @@ namespace BokBonCheck
|
||||
// 방법 5: 특정 텍스트가 페이지에 나타날 때까지 대기
|
||||
wait.Until(d =>
|
||||
{
|
||||
var pageText = d.FindElement(By.TagName("body")).Text;
|
||||
var elm = d.FindElement(By.TagName("body"));
|
||||
if (elm == null) return false;
|
||||
var pageText = elm.Text;
|
||||
return pageText.Contains("전체") || pageText.Contains("건") || pageText.Contains("검색결과");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user