posting_zon 3.89.799 → 3.91.799
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/posting_zon.rb +1960 -1467
- metadata +2 -2
data/lib/posting_zon.rb
CHANGED
@@ -530,17 +530,14 @@ class Naver
|
|
530
530
|
end
|
531
531
|
|
532
532
|
begin
|
533
|
-
|
534
|
-
|
535
|
-
|
536
533
|
@driver.get('https://chromewebstore.google.com/detail/captcha-solver-auto-recog/ifibfemgeogfhoebkmokieepdoobkbpo?hl=ko')
|
537
|
-
sleep(
|
534
|
+
sleep(2)
|
538
535
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
539
536
|
#요소가 나타날 때까지 3초 동안 기다립니다.
|
540
537
|
wait.until { @driver.find_element(xpath: '//section[@class="lwrbTd"]//button[@jsname="ajZLRd"]') } #추가 되어 있음
|
541
|
-
|
538
|
+
|
542
539
|
@driver.manage.window.maximize
|
543
|
-
|
540
|
+
sleep(1)
|
544
541
|
rescue => e
|
545
542
|
puts '-[√] 연결 실패.......'.red
|
546
543
|
@driver.window_handles.each do |handle|
|
@@ -553,7 +550,7 @@ class Naver
|
|
553
550
|
end
|
554
551
|
end
|
555
552
|
@driver.quit
|
556
|
-
|
553
|
+
# return 0
|
557
554
|
end
|
558
555
|
end
|
559
556
|
|
@@ -1050,7 +1047,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1050
1047
|
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
1051
1048
|
puts e
|
1052
1049
|
@driver.close
|
1053
|
-
return 0
|
1050
|
+
#return 0
|
1054
1051
|
|
1055
1052
|
end
|
1056
1053
|
end
|
@@ -1222,27 +1219,63 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1222
1219
|
##가입필드에 체크박스 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
1223
1220
|
puts '-[√] 회원가입 체크박스 3차 탐색.......'.yellow
|
1224
1221
|
begin
|
1225
|
-
@driver.find_element(:xpath, '//*[@type="checkbox"]')
|
1222
|
+
el = @driver.find_element(:xpath, '//*[@type="checkbox" and @name="accept_agreement"]')
|
1223
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1224
|
+
sleep(1)
|
1225
|
+
@driver.find_element(:xpath, '//*[@type="checkbox" and @name="accept_agreement"]').click
|
1226
|
+
sleep(1)
|
1226
1227
|
rescue
|
1227
1228
|
begin
|
1228
|
-
@driver.find_element(:xpath, '//*[@
|
1229
|
+
el = @driver.find_element(:xpath, '//*[@type="checkbox"]')
|
1230
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1231
|
+
sleep(1)
|
1232
|
+
@driver.find_element(:xpath, '//*[@type="checkbox"]').click
|
1233
|
+
sleep(1)
|
1229
1234
|
rescue
|
1230
1235
|
begin
|
1231
|
-
@driver.find_element(:
|
1236
|
+
el = @driver.find_element(:xpath, '//*[@id="accept_agree"]')
|
1237
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1238
|
+
sleep(1)
|
1239
|
+
@driver.find_element(:xpath, '//*[@id="accept_agree"]').click
|
1240
|
+
sleep(1)
|
1232
1241
|
rescue
|
1233
1242
|
begin
|
1234
|
-
@driver.find_element(:
|
1243
|
+
el = @driver.find_element(:partial_link_text, ' 약관에 동의합니다.')
|
1244
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1245
|
+
sleep(1)
|
1246
|
+
@driver.find_element(:partial_link_text, ' 약관에 동의합니다.').click #요소같고 텍스트가 다를때 텍스트로 타겟
|
1247
|
+
sleep(1)
|
1235
1248
|
rescue
|
1236
1249
|
begin
|
1237
|
-
@driver.find_element(:xpath, '//*[@
|
1250
|
+
el = @driver.find_element(:xpath, '//*[@class="ico-checkbox helper-checks helper-checks-checkbox-chk_term"]')
|
1251
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1252
|
+
sleep(1)
|
1253
|
+
@driver.find_element(:xpath, '//*[@class="ico-checkbox helper-checks helper-checks-checkbox-chk_term"]').click
|
1254
|
+
sleep(1)
|
1238
1255
|
rescue
|
1239
1256
|
begin
|
1240
|
-
@driver.find_element(:xpath, '//*[@id="
|
1257
|
+
el = @driver.find_element(:xpath, '//*[@id="accept_agreement_1"]')
|
1258
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1259
|
+
sleep(1)
|
1260
|
+
@driver.find_element(:xpath, '//*[@id="accept_agreement_1"]').click
|
1261
|
+
sleep(1)
|
1241
1262
|
rescue
|
1242
1263
|
begin
|
1243
|
-
@driver.find_element(:xpath, '//*[@
|
1264
|
+
el = @driver.find_element(:xpath, '//*[@id="agree"]')
|
1265
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1266
|
+
sleep(1)
|
1267
|
+
@driver.find_element(:xpath, '//*[@id="agree"]').click
|
1268
|
+
sleep(1)
|
1244
1269
|
rescue
|
1245
|
-
|
1270
|
+
begin
|
1271
|
+
el = @driver.find_element(:xpath, '//*[@name="check_2"]')
|
1272
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1273
|
+
sleep(1)
|
1274
|
+
@driver.find_element(:xpath, '//*[@name="check_2"]').click
|
1275
|
+
sleep(1)
|
1276
|
+
rescue
|
1277
|
+
|
1278
|
+
end
|
1246
1279
|
end
|
1247
1280
|
end
|
1248
1281
|
end
|
@@ -1264,7 +1297,11 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1264
1297
|
|
1265
1298
|
##아이디 입력 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
1266
1299
|
puts '-[√] 아이디 입력 시도.......'.yellow
|
1267
|
-
|
1300
|
+
letters = ('a'..'z').to_a.sample(7).join
|
1301
|
+
numbers = ('0'..'9').to_a.sample(7).join
|
1302
|
+
user_id = letters + numbers
|
1303
|
+
|
1304
|
+
|
1268
1305
|
begin
|
1269
1306
|
@driver.find_element(:xpath, '//*[@id="reg_mb_id"]').send_keys(user_id)
|
1270
1307
|
rescue
|
@@ -1346,7 +1383,12 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1346
1383
|
|
1347
1384
|
##비밀번호 입력 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
1348
1385
|
puts '-[√] 비밀번호 1회 입력 시도.......'.yellow
|
1349
|
-
|
1386
|
+
letters = ('a'..'z').to_a.sample(7).join
|
1387
|
+
numbers = ('0'..'9').to_a.sample(7).join
|
1388
|
+
user_pw = letters + numbers
|
1389
|
+
begin
|
1390
|
+
@driver.find_element(:xpath, '//*[@type="password" and @name="password" and @id="password"]').send_keys(user_pw)
|
1391
|
+
rescue
|
1350
1392
|
begin
|
1351
1393
|
@driver.find_element(:xpath, '//*[@id="reg_mb_password"]').send_keys(user_pw)
|
1352
1394
|
rescue
|
@@ -1384,6 +1426,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1384
1426
|
end
|
1385
1427
|
end
|
1386
1428
|
end
|
1429
|
+
end
|
1387
1430
|
sleep(1)
|
1388
1431
|
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
1389
1432
|
##비밀번호2 입력 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
@@ -1441,9 +1484,9 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1441
1484
|
|
1442
1485
|
##이름 입력 확인 부분─────────────────────────────────────────────────────────────────────>
|
1443
1486
|
puts '-[√] 이름 이름 항목 체크.......'.yellow
|
1444
|
-
name1_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','
|
1445
|
-
name2_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','
|
1446
|
-
name3_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','
|
1487
|
+
name1_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','제','작','과','련','된','없','도','공','간','점','즉','블','그','면','누','텍','스','래','픽','해','견','디','털','카','메','운','념','세','부','날','짜','별','성','상','손','쉽','록','완','벽','독','적','보','저','파'].sample
|
1488
|
+
name2_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','제','작','과','련','된','없','도','공','간','점','즉','블','그','면','누','텍','스','래','픽','해','견','디','털','카','메','운','념','세','부','날','짜','별','성','상','손','쉽','록','완','벽','독','적','보','저','파'].sample
|
1489
|
+
name3_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','제','작','과','련','된','없','도','공','간','점','즉','블','그','면','누','텍','스','래','픽','해','견','디','털','카','메','운','념','세','부','날','짜','별','성','상','손','쉽','록','완','벽','독','적','보','저','파'].sample
|
1447
1490
|
|
1448
1491
|
begin
|
1449
1492
|
@driver.find_element(:xpath, '//*[@id="reg_mb_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
@@ -1452,7 +1495,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1452
1495
|
@driver.find_element(:xpath, '//*[@id="customerName"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1453
1496
|
rescue
|
1454
1497
|
begin
|
1455
|
-
@driver.find_element(:xpath, '//*[@id="
|
1498
|
+
@driver.find_element(:xpath, '//*[@id="user_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1456
1499
|
rescue
|
1457
1500
|
begin
|
1458
1501
|
@driver.find_element(:xpath, '//*[@id="reg_mb_signature "]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
@@ -1461,7 +1504,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1461
1504
|
@driver.find_element(:xpath, '//*[@id="reg_mb_5"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1462
1505
|
rescue
|
1463
1506
|
begin
|
1464
|
-
@driver.find_element(:xpath, '//*[@id="
|
1507
|
+
@driver.find_element(:xpath, '//*[@id="find_account_answer"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1465
1508
|
rescue
|
1466
1509
|
begin
|
1467
1510
|
@driver.find_element(:xpath, '//*[@id="mb_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
@@ -1472,7 +1515,11 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1472
1515
|
begin
|
1473
1516
|
@driver.find_element(:xpath, '//*[@name="first_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1474
1517
|
rescue
|
1518
|
+
begin
|
1519
|
+
@driver.find_element(:xpath, '//*[@name="user_name" and @id="user_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1520
|
+
rescue
|
1475
1521
|
|
1522
|
+
end
|
1476
1523
|
end
|
1477
1524
|
end
|
1478
1525
|
end
|
@@ -1487,7 +1534,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1487
1534
|
|
1488
1535
|
##이름 입력 확인 부분─────────────────────────────────────────────────────────────────────>
|
1489
1536
|
puts '-[√] 닉네임(별명) 항목 체크.......'.yellow
|
1490
|
-
nick1_value = ['Abel','아벨','생명력','넘치는','Adonis','아도니스','여신','아프로디테가','사랑한','미소녀','Adora','아도라','사랑이','넘치는','Afecto','아펙토','
|
1537
|
+
nick1_value = ['Abel','아벨','생명력','넘치는','Adonis','아도니스','여신','아프로디테가','사랑한','미소녀','Adora','아도라','사랑이','넘치는','Afecto','아펙토','그리운','애정이','깊은-스페인어로','Agatha','아가사','선량','Agnes','아그네스','정숙','신중한','Ailish','앨리쉬','엘리자베스','같은','Alan','알란','잘생긴','Alchemy','앨커미','신비한','마력의','Alice','엘리스','기품있는','Alika','앨리카','진실한','Allie','앨리','순결한','Aloha','알로하','사랑스러운','Alvin','앨빈','고귀한','Amanda','아만다','사랑받을','만한','Angela','엔젤라','천사','Arcanum','아케이넘','비밀의','Arista','아리스타','최고의','그리스인','Arvid','아비드','폴란드','독수리','Asha','아샤','생명','Ashley','애쉴리','요정같은','Aurora','오로라','새벽의','힘','Austin','어스틴','힘이','넘치는','Avalon','아발론','최후의','보루','Bailey','베일리','성벽에','둘러쌓인','안뜰','Baron','바론','독일','귀족','Bechy','베키','마음을','사로잡는','Belita','벨리타','아름다운','Bessie','베시','신성함','Biana','비안나','숨기는','Bliss','블리스','황홀한','기쁨','Bonita','보니타','예쁜','Bono','보노','훌륭한','Bruno','브루노','남자이름','Caley','칼리','용감한','전사','Calix','칼릭스','매우','잘생긴','Calla','칼라','아름다운','Callia','칼리아','아름다움','Callie','캘리','아름다운','Carmen','카르멘','아름다운','목소리','Caroline','캐럴린','용감한','튼튼한','Catherine','캐서린','순결한','Cecil','세실','눈','먼','Celina','셀리나','달','Chavi','샤비','귀여운','여자','아이','Cherie','쉐리','사랑받는','Clara','클라라','깨끗한','Colin','콜린','강한','인내력','있는','Crimson','크림슨','진붉은','색의','Cyma','시마','번영하다','Danika','다니카','금성','Daria','다리아','여왕같은','Della','델라','고귀한','Delling','델링','불꽃을','튀기다','Denver','덴버','푸른계곡','Diallo','디알로','굵은','Dino','디노','단검','Doris','도리스','해양의','여신','Dorothy','도로시','신의','선물','Douglas','더글라스','검은','언덕','Dustin','더스틴','용맹스러운','전사','Dyllis','딜리스','꾸밈없는','Ebony','에보니','흑단단단하고','어두운','나무','재료','Edan','에단','불타는','듯한','Edeline','에델린','높은','신분으로','태어난','Eden','이든','낙원','Edwin','에드윈','행복한','정복자','Elle','엘르','여성','Ellen','엘렌','횃불','Elva','엘버','신기한','Elysia','엘리시아','축복받은','Farrell','파렐','용맹스러운','Favian','파비앙','용감한','남자','Fedora','페도라','신성한','선물','Felice','펠리체','행복한','Felix','펠릭스','운이','좋은','Fidelio','피델리오','성실한','Fiesta','피에스타','사랑놀이','Flamy','플레이미','불타는','Fleta','플레타','쾌속의','Flint','플린트','부싯돌','Floria','플로리아','꽃이','만발한','Gemma','제마','보석','Gloria','글로리아','영광','Grace','그레이스','신의','은혜','Haley','할리','영웅','Halona','할로나','운','좋은','Hannah','해나','신의','은총','Harold','해롤드','군','통치자','Helia','헬리아','태양','Herrscher','헤르셔','지배자','Hilda','힐더','여자','병사','Hollis','홀리스','영웅','Hubert','휴버트','깨끗한','마음','Humphery','험프리','평화의','옹호자','Iliana','일리아나','밝은','Indira','인드라','천둥의','신','Ingrid','잉그리드','목초지','Isis','이시스','강한','이집트','여인','Jamie','제이미','대신하는','자','Jennet','제넷','신의','은총','Jennifer','제니퍼','매혹적인','여자','Jeremy','제레미','대예언자','Jessica','제시카','신의','은총','Jodie','조디','찬양하다','Jordan','조르단','구전되는','전설','Justin','저스틴','진실','Kama','카마','사랑의','신','Karis','카리스','은혜로운','Kassia','카시아','순수한','Kellan','켈란','강력한','Kelly','켈리','여전사','Kylie','카일리','숲의','Kyra','카이라','품위','있는','Lakia','라키아','재산','Lamis','라미스','부드러운','Lani','라니','하늘','Lawrence','로렌스','뛰어난','전사','Leena','리나','조명','Lelia','렐리아','옳은','말','Lev','레브','마음','Lewis','루이스','뛰어난','전사','ily','릴리','백합','순백한','Lois','로이스','우수한','Lowell','로웰','사랑받는','Lucus','루카스','빛','Luna','루나','달','Mabel','마벨','나의','아름다운','사람','Makaio','마카이오','신의','선물','Malissa','멜리사','달콤한','꿀','Malo','말로','승리자','Mandelina','만델리나','사랑스러운','Marcia','마르시아','용기','Maven','메이븐','전문가','Melina','멜리나','화려한','불빛','Mikayla','미카일라','신을','닮은','Nalo','날로','사랑스러운','Natty','나티','멋진','세련된','Navid','나비드','좋은','소식','Neal','닐','최고의','우승','Odelia','오델리아','헌신적인','맹세의','Olga','올가','성스러운','신성의','Pamela','파멜라','연인','Patrick','패트릭','귀족','Pello','펠로','돌','Penda','펜다','사랑받는','Peppi','페피','인내하다','Petra','페트라','돌','Phoenix','피닉스','젊은','여자','Pluto','플루토','명왕성','Primo','프리모','장남','처음의','Queena','퀴너','매우','고귀하다','Rabia','라비아','봄','Rachel','레이첼','모성이','강한','Raina','레이나','평화','Rania','라니안','여왕','Ravi','라비','태양','Redford','레드포드','붉은','강','Rei','레이','법','규칙','Richard','리차드','대단히','강한','Ricky','리키','부유한','Rico','리코','부유한','풍족한','Ringo','링고','반지','Rio','리오','강','Risa','리사','웃음소리','Roja','로자','붉은-스페인어로','Rosie','로지','장미','Roxy','록시','빛나는','새벽','Sabrina','사브리나','성숙하고','예쁜','Sally','샐리','소풍','앞서나가는','Sasha','사샤','협력자','동료','배우자','Scarlet','스칼렛','타는','듯이','붉은','Scoop','스쿠프','국자','일확천금','Sekhment','세크멘트','강력한','권위있는','Severino','셀브리노','엄격한','Shaina','샤이나','아름다운','Sheri','쉐리','아끼는','친애하는','Sierra','시에라','청순한','Sonia','소니아','지혜','Spotty','스포티','얼룩덜룩한','반점이','Stella','스텔라','밝은','별','Swoony','스우니','귀여운','Sylvester','실베스터','숲','남자이름','Sylvia','실비아','여자이름','Taky','테이키','마음이','이끌리는','Talia','탈리아','아침이슬','Talli','탈리','영웅','Tanesia','타네시아','월요일에','태어난','Tania','타니아','불꽃같은','여왕','Theodore','테오도르','신의','선물','Tomo','토모','지적인','Trisha','트리샤','귀부인','Trudy','트루디','사랑','받는','Unicum','유니쿰','희귀하고','드물지','않은','Urbane','어베인','세련되고','고귀한','Valencia','발렌시아','용감한','정신','Velica','벨리카','거대한','Vera','베라','진실','Winni','위니','착한','선량한','Winsome','윈썸','주도력','있는','마음을','이끄는','Winston','윈스톤','남자이름','Yeriel','예리엘','신이','선택한','Yuki','유키','눈','snow','Zena','제나','공손한','사람','Zenia','제니아','인심좋은'].sample
|
1491
1538
|
nick2_value = ['김','이','박','최','정','강','조','윤','장','한','송','황','임','전','서','신','오','문','양','고','진','배','용','야','마','미','사','천','중','나','라','만','에','처','음','등','하','다','새','로','올','리','는','글','맨','위','가','일','지','형','식','으','되','어','있','런','름','반','인','들','자','관','심','따','기','칼','럼','을','유','롭','게','릴','수','뿐','아','니','개','출','판','방','커','뮤','티','까','태','를','취','종','의','웹','시','홈','페','컴','퓨','터','능','혼','합','소','프','트','웨','무','료','또','싼','격','구','입','할','며','넷','','제','작','과','','련','된','없','도','공','간','점','즉','블','그','면','누','텍','스','래','픽','해','견','디','털','카','메','운','념','세','부','날','짜','별','성','상','손','쉽','록','완','벽','독','적','보','저','파'].sample
|
1492
1539
|
|
1493
1540
|
begin
|
@@ -1545,7 +1592,12 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1545
1592
|
@driver.find_element(:xpath, '//*[@x-on:click="checkNameDup()"]').click
|
1546
1593
|
sleep(2)
|
1547
1594
|
rescue
|
1548
|
-
|
1595
|
+
begin
|
1596
|
+
@driver.find_element(:partial_link_text, '중복 검사').click
|
1597
|
+
sleep(2)
|
1598
|
+
rescue
|
1599
|
+
|
1600
|
+
end
|
1549
1601
|
end
|
1550
1602
|
end
|
1551
1603
|
end
|
@@ -3052,6 +3104,14 @@ login_url = option['login_url'].to_s
|
|
3052
3104
|
rescue
|
3053
3105
|
end
|
3054
3106
|
|
3107
|
+
begin
|
3108
|
+
|
3109
|
+
chat_box = @driver.find_elements(:xpath, '//*[@class="google-auto-placed"]')[3]
|
3110
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
3111
|
+
puts '-[√] 숨김 code 7 제거 완료.......'.green
|
3112
|
+
sleep(1)
|
3113
|
+
rescue
|
3114
|
+
end
|
3055
3115
|
|
3056
3116
|
|
3057
3117
|
##팝업 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
@@ -3122,6 +3182,7 @@ login_url = option['login_url'].to_s
|
|
3122
3182
|
sleep(1)
|
3123
3183
|
rescue
|
3124
3184
|
begin
|
3185
|
+
@driver.switch_to.default_content()
|
3125
3186
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
3126
3187
|
sleep(1)
|
3127
3188
|
rescue
|
@@ -3234,6 +3295,7 @@ login_url = option['login_url'].to_s
|
|
3234
3295
|
sleep(1)
|
3235
3296
|
rescue
|
3236
3297
|
begin
|
3298
|
+
@driver.switch_to.default_content()
|
3237
3299
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
3238
3300
|
sleep(1)
|
3239
3301
|
rescue
|
@@ -3346,6 +3408,7 @@ login_url = option['login_url'].to_s
|
|
3346
3408
|
sleep(1)
|
3347
3409
|
rescue
|
3348
3410
|
begin
|
3411
|
+
@driver.switch_to.default_content()
|
3349
3412
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
3350
3413
|
sleep(1)
|
3351
3414
|
rescue
|
@@ -3458,6 +3521,7 @@ login_url = option['login_url'].to_s
|
|
3458
3521
|
sleep(1)
|
3459
3522
|
rescue
|
3460
3523
|
begin
|
3524
|
+
@driver.switch_to.default_content()
|
3461
3525
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
3462
3526
|
sleep(1)
|
3463
3527
|
rescue
|
@@ -3570,6 +3634,7 @@ login_url = option['login_url'].to_s
|
|
3570
3634
|
sleep(1)
|
3571
3635
|
rescue
|
3572
3636
|
begin
|
3637
|
+
@driver.switch_to.default_content()
|
3573
3638
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
3574
3639
|
sleep(1)
|
3575
3640
|
rescue
|
@@ -3624,7 +3689,7 @@ login_url = option['login_url'].to_s
|
|
3624
3689
|
return 0
|
3625
3690
|
end
|
3626
3691
|
rescue Selenium::WebDriver::Error::NoSuchElementError
|
3627
|
-
#
|
3692
|
+
@driver.action.key_down(:tab).key_up(:tab).perform #x탭
|
3628
3693
|
end
|
3629
3694
|
|
3630
3695
|
##아이디 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
@@ -3742,6 +3807,21 @@ login_url = option['login_url'].to_s
|
|
3742
3807
|
@driver.find_element(:xpath, '//*[@fw-label="아이디"]').send_keys(user_id)
|
3743
3808
|
sleep(3)
|
3744
3809
|
rescue
|
3810
|
+
begin
|
3811
|
+
@driver.find_element(:xpath, '//*[@name="username-41"]').send_keys(user_id)
|
3812
|
+
sleep(3)
|
3813
|
+
rescue
|
3814
|
+
begin
|
3815
|
+
@driver.find_element(:xpath, '//*[@id="user" and @name="user"]').send_keys(user_id)
|
3816
|
+
sleep(3)
|
3817
|
+
rescue
|
3818
|
+
begin
|
3819
|
+
@driver.find_element(:xpath, '//*[@for="login_id"]').send_keys(user_id)
|
3820
|
+
sleep(3)
|
3821
|
+
rescue
|
3822
|
+
end
|
3823
|
+
end
|
3824
|
+
end
|
3745
3825
|
end
|
3746
3826
|
end
|
3747
3827
|
end
|
@@ -3865,8 +3945,13 @@ login_url = option['login_url'].to_s
|
|
3865
3945
|
@driver.find_element(:xpath, '//*[@id="login_mb_password2"]').send_keys(user_pw)
|
3866
3946
|
sleep(1)
|
3867
3947
|
rescue
|
3868
|
-
|
3869
|
-
@driver.
|
3948
|
+
begin
|
3949
|
+
@driver.find_element(:xpath, '//*[@name="user_password-41"]').send_keys(user_pw)
|
3950
|
+
sleep(1)
|
3951
|
+
rescue
|
3952
|
+
|
3953
|
+
@driver.action.key_down(:tab).key_up(:tab).perform #x탭
|
3954
|
+
end
|
3870
3955
|
end
|
3871
3956
|
end
|
3872
3957
|
end
|
@@ -3936,63 +4021,75 @@ login_url = option['login_url'].to_s
|
|
3936
4021
|
sleep(3)
|
3937
4022
|
rescue
|
3938
4023
|
begin
|
3939
|
-
@driver.find_element(xpath: "
|
4024
|
+
@driver.find_element(xpath: '//*[@type="submit" and @class="v-btn-neutral mt-4 mb-2"]').click
|
3940
4025
|
puts '-[√] 로그인 버튼 코드 8 타겟.......'.cyan
|
3941
4026
|
sleep(3)
|
3942
4027
|
rescue
|
3943
4028
|
begin
|
3944
|
-
@driver.find_element(:
|
3945
|
-
puts '-[√] 로그인 버튼 코드
|
4029
|
+
@driver.find_element(xpath: "//button[contains(text(), '로그인')]").click
|
4030
|
+
puts '-[√] 로그인 버튼 코드 9 타겟.......'.cyan
|
3946
4031
|
sleep(3)
|
3947
4032
|
rescue
|
3948
4033
|
begin
|
3949
|
-
@driver.find_element(:xpath, '//*[@
|
3950
|
-
puts '-[√] 로그인 버튼 코드
|
4034
|
+
@driver.find_element(:xpath, '//*[@alt="로그인"]').click
|
4035
|
+
puts '-[√] 로그인 버튼 코드 10 타겟.......'.cyan
|
3951
4036
|
sleep(3)
|
3952
4037
|
rescue
|
3953
4038
|
begin
|
3954
|
-
@driver.find_element(:xpath, '//*[@id="
|
3955
|
-
puts '-[√] 로그인 버튼 코드
|
4039
|
+
@driver.find_element(:xpath, '//*[@id="mb_login"]/form/div[5]/button').click
|
4040
|
+
puts '-[√] 로그인 버튼 코드 11 타겟.......'.cyan
|
3956
4041
|
sleep(3)
|
3957
4042
|
rescue
|
3958
4043
|
begin
|
3959
|
-
@driver.find_element(:xpath, '//*[@
|
3960
|
-
puts '-[√] 로그인 버튼 코드
|
4044
|
+
@driver.find_element(:xpath, '//*[@id="ol_submit"]').click
|
4045
|
+
puts '-[√] 로그인 버튼 코드 12 타겟.......'.cyan
|
3961
4046
|
sleep(3)
|
3962
4047
|
rescue
|
3963
4048
|
begin
|
3964
|
-
@driver.find_element(:xpath, '//*[@
|
3965
|
-
puts '-[√] 로그인 버튼 코드
|
4049
|
+
@driver.find_element(:xpath, '//*[@alt="login"]').click
|
4050
|
+
puts '-[√] 로그인 버튼 코드 13 타겟.......'.cyan
|
3966
4051
|
sleep(3)
|
3967
4052
|
rescue
|
3968
4053
|
begin
|
3969
|
-
@driver.find_element(:xpath, '//*[@
|
3970
|
-
puts '-[√] 로그인 버튼 코드
|
4054
|
+
@driver.find_element(:xpath, '//*[@title="login"]').click
|
4055
|
+
puts '-[√] 로그인 버튼 코드 14 타겟.......'.cyan
|
3971
4056
|
sleep(3)
|
3972
4057
|
rescue
|
3973
4058
|
begin
|
3974
|
-
@driver.find_element(:xpath, '//*[@id="
|
3975
|
-
puts '-[√] 로그인 버튼 코드
|
4059
|
+
@driver.find_element(:xpath, '//*[@id="signIn_1"]').click
|
4060
|
+
puts '-[√] 로그인 버튼 코드 15 타겟.......'.cyan
|
3976
4061
|
sleep(3)
|
3977
4062
|
rescue
|
3978
4063
|
begin
|
3979
|
-
@driver.find_element(:xpath, '//*[@
|
3980
|
-
puts '-[√] 로그인 버튼 코드
|
4064
|
+
@driver.find_element(:xpath, '//*[@id="btn_login"]').click
|
4065
|
+
puts '-[√] 로그인 버튼 코드 16 타겟.......'.cyan
|
3981
4066
|
sleep(3)
|
3982
4067
|
rescue
|
3983
4068
|
begin
|
3984
|
-
@driver.find_element(:xpath, '//*[@
|
3985
|
-
puts '-[√] 로그인 버튼 코드
|
4069
|
+
@driver.find_element(:xpath, '//*[@name="wp-submit"]').click
|
4070
|
+
puts '-[√] 로그인 버튼 코드 17 타겟.......'.cyan
|
3986
4071
|
sleep(3)
|
3987
4072
|
rescue
|
3988
4073
|
begin
|
3989
|
-
@driver.find_element(:xpath, '//*[@
|
3990
|
-
puts '-[√] 로그인 버튼 코드
|
4074
|
+
@driver.find_element(:xpath, '//*[@id="um-submit-btn"]').click
|
4075
|
+
puts '-[√] 로그인 버튼 코드 18 타겟.......'.cyan
|
3991
4076
|
sleep(3)
|
3992
4077
|
rescue
|
3993
|
-
|
3994
|
-
|
3995
|
-
|
4078
|
+
begin
|
4079
|
+
@driver.find_element(:xpath, '//*[@class="left_login_box"]//*[@class="left_login_btn"]').click
|
4080
|
+
puts '-[√] 로그인 버튼 코드 19 타겟.......'.cyan
|
4081
|
+
sleep(3)
|
4082
|
+
rescue
|
4083
|
+
begin
|
4084
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-color"]').click
|
4085
|
+
puts '-[√] 로그인 버튼 코드 20 타겟.......'.cyan
|
4086
|
+
sleep(3)
|
4087
|
+
rescue
|
4088
|
+
|
4089
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
4090
|
+
sleep(3)
|
4091
|
+
end
|
4092
|
+
end
|
3996
4093
|
end
|
3997
4094
|
end
|
3998
4095
|
end
|
@@ -4110,7 +4207,8 @@ begin
|
|
4110
4207
|
##캡챠 해제 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
4111
4208
|
begin
|
4112
4209
|
sleep(5)
|
4113
|
-
|
4210
|
+
|
4211
|
+
|
4114
4212
|
|
4115
4213
|
# 타임아웃을 3초로 설정
|
4116
4214
|
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
@@ -4189,30 +4287,54 @@ begin
|
|
4189
4287
|
|
4190
4288
|
|
4191
4289
|
##출석 체크 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
4192
|
-
cctxt_value = ['ㅊㅊ','출석체크','
|
4290
|
+
cctxt_value = ['ㅊㅊ','출석체크','출석체크해요','출첵~','추추','출석~','출석체크하고가요','출석합니다.','안녕하세요','출첵왔어요','출석체크합니다.','출석체크~','출석했어요','출첵!!','출석체크~','출석도장쾅~!','출석도장쾅쾅!!','출석하고가요','출첵^^*','출석체크~!^^','^^','^*^','출첵*_*','추추^^*'].sample
|
4193
4291
|
begin
|
4292
|
+
@driver.find_element(:xpath, '//*[@id="wr_content"]').clear
|
4293
|
+
sleep(1)
|
4194
4294
|
@driver.find_element(:xpath, '//*[@id="wr_content"]').send_keys(cctxt_value)
|
4295
|
+
sleep(5)
|
4195
4296
|
rescue
|
4196
4297
|
begin
|
4197
|
-
|
4298
|
+
@driver.find_element(:xpath, '//*[@name="wr_content"]').clear
|
4299
|
+
sleep(1)
|
4300
|
+
@driver.find_element(:xpath, '//*[@name="wr_content"]').send_keys(cctxt_value)
|
4301
|
+
sleep(5)
|
4198
4302
|
rescue
|
4199
4303
|
begin
|
4200
|
-
|
4304
|
+
@driver.find_element(:xpath, '//*[@class="form-control input-sm"]').clear
|
4305
|
+
sleep(1)
|
4306
|
+
@driver.find_element(:xpath, '//*[@class="form-control input-sm"]').send_keys(cctxt_value)
|
4307
|
+
sleep(5)
|
4201
4308
|
rescue
|
4202
4309
|
begin
|
4203
|
-
|
4310
|
+
@driver.find_element(:xpath, '//*[@name="greetings"]').clear
|
4311
|
+
sleep(1)
|
4312
|
+
@driver.find_element(:xpath, '//*[@name="greetings"]').send_keys(cctxt_value)
|
4313
|
+
sleep(5)
|
4204
4314
|
rescue
|
4205
4315
|
begin
|
4206
|
-
|
4316
|
+
@driver.find_element(:xpath, '//*[@id="greetings"]').clear
|
4317
|
+
sleep(1)
|
4318
|
+
@driver.find_element(:xpath, '//*[@id="greetings"]').send_keys(cctxt_value)
|
4319
|
+
sleep(5)
|
4207
4320
|
rescue
|
4208
4321
|
begin
|
4209
|
-
|
4322
|
+
@driver.find_element(:xpath, '//*[@id="subject"]').clear
|
4323
|
+
sleep(1)
|
4324
|
+
@driver.find_element(:xpath, '//*[@id="subject"]').send_keys(cctxt_value)
|
4325
|
+
sleep(5)
|
4210
4326
|
rescue
|
4211
4327
|
begin
|
4212
|
-
|
4328
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').clear
|
4329
|
+
sleep(1)
|
4330
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys(cctxt_value)
|
4331
|
+
sleep(5)
|
4213
4332
|
rescue
|
4214
4333
|
begin
|
4215
|
-
|
4334
|
+
@driver.find_element(:xpath, '//*[@placeholder="인사말"]').clear
|
4335
|
+
sleep(1)
|
4336
|
+
@driver.find_element(:xpath, '//*[@placeholder="인사말"]').send_keys(cctxt_value)
|
4337
|
+
sleep(5)
|
4216
4338
|
rescue
|
4217
4339
|
|
4218
4340
|
end
|
@@ -4275,9 +4397,19 @@ begin
|
|
4275
4397
|
@driver.find_element(:xpath, '//*[@value="출석하기"]').click
|
4276
4398
|
sleep(5)
|
4277
4399
|
rescue
|
4278
|
-
|
4279
|
-
|
4280
|
-
|
4400
|
+
begin
|
4401
|
+
@driver.find_element(:xpath, '//*[@class="attnd-btn"]').click
|
4402
|
+
sleep(5)
|
4403
|
+
rescue
|
4404
|
+
begin
|
4405
|
+
@driver.find_element(:xpath, '//*[@id="my" and @onclick="gold_chk()" and @class="myButton"]').click
|
4406
|
+
sleep(5)
|
4407
|
+
rescue
|
4408
|
+
sleep(1)
|
4409
|
+
@driver.action.key_down(:enter).key_up(:enter).perform
|
4410
|
+
sleep(5)
|
4411
|
+
end
|
4412
|
+
end
|
4281
4413
|
end
|
4282
4414
|
end
|
4283
4415
|
end
|
@@ -4313,17 +4445,23 @@ end
|
|
4313
4445
|
|
4314
4446
|
|
4315
4447
|
|
4316
|
-
|
4317
|
-
|
4448
|
+
#loop do #반복루프
|
4449
|
+
already_retried = false
|
4450
|
+
loop do #반복루프
|
4318
4451
|
post_url = option['post_url'].to_s
|
4319
4452
|
|
4453
|
+
|
4320
4454
|
begin
|
4455
|
+
|
4321
4456
|
if post_url == '' or post_url == '게시판 글쓰기 url'
|
4322
4457
|
|
4323
4458
|
else
|
4459
|
+
|
4460
|
+
@driver.get(post_url)
|
4461
|
+
sleep(1)
|
4324
4462
|
@driver.get(post_url)
|
4325
4463
|
puts '-[√] 게시판 페이지 URL 이동.......'.magenta
|
4326
|
-
|
4464
|
+
|
4327
4465
|
|
4328
4466
|
|
4329
4467
|
|
@@ -4573,7 +4711,7 @@ post_url = option['post_url'].to_s
|
|
4573
4711
|
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
4574
4712
|
puts e
|
4575
4713
|
@driver.quit
|
4576
|
-
return 0
|
4714
|
+
#return 0
|
4577
4715
|
end
|
4578
4716
|
end
|
4579
4717
|
|
@@ -4761,9 +4899,21 @@ post_url = option['post_url'].to_s
|
|
4761
4899
|
rescue
|
4762
4900
|
end
|
4763
4901
|
|
4902
|
+
begin
|
4903
|
+
chat_box = @driver.find_element(:xpath, '//*[@data-id="eb97bcb" and @data-element_type="section"]')
|
4904
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
4905
|
+
|
4906
|
+
sleep(1)
|
4907
|
+
rescue
|
4908
|
+
end
|
4909
|
+
|
4910
|
+
|
4911
|
+
|
4912
|
+
|
4764
4913
|
end
|
4765
4914
|
|
4766
4915
|
|
4916
|
+
|
4767
4917
|
|
4768
4918
|
##팝업 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
4769
4919
|
|
@@ -4848,6 +4998,7 @@ post_url = option['post_url'].to_s
|
|
4848
4998
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
4849
4999
|
rescue
|
4850
5000
|
begin
|
5001
|
+
@driver.switch_to.default_content()
|
4851
5002
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
4852
5003
|
sleep(1)
|
4853
5004
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
@@ -4986,6 +5137,7 @@ post_url = option['post_url'].to_s
|
|
4986
5137
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
4987
5138
|
rescue
|
4988
5139
|
begin
|
5140
|
+
@driver.switch_to.default_content()
|
4989
5141
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
4990
5142
|
sleep(1)
|
4991
5143
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
@@ -5116,6 +5268,7 @@ post_url = option['post_url'].to_s
|
|
5116
5268
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
5117
5269
|
rescue
|
5118
5270
|
begin
|
5271
|
+
@driver.switch_to.default_content()
|
5119
5272
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
5120
5273
|
sleep(1)
|
5121
5274
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
@@ -5247,6 +5400,7 @@ post_url = option['post_url'].to_s
|
|
5247
5400
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
5248
5401
|
rescue
|
5249
5402
|
begin
|
5403
|
+
@driver.switch_to.default_content()
|
5250
5404
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
5251
5405
|
sleep(1)
|
5252
5406
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
@@ -5378,6 +5532,7 @@ post_url = option['post_url'].to_s
|
|
5378
5532
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
5379
5533
|
rescue
|
5380
5534
|
begin
|
5535
|
+
@driver.switch_to.default_content()
|
5381
5536
|
@driver.find_element(:xpath, '//*[@id="footer-btn-icon"]').click
|
5382
5537
|
sleep(1)
|
5383
5538
|
puts '-[√] 팝업 여부 확인 체크.......'.yellow
|
@@ -5439,10 +5594,6 @@ post_url = option['post_url'].to_s
|
|
5439
5594
|
|
5440
5595
|
|
5441
5596
|
|
5442
|
-
|
5443
|
-
|
5444
|
-
|
5445
|
-
|
5446
5597
|
##닉네임 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
5447
5598
|
|
5448
5599
|
|
@@ -5835,7 +5986,13 @@ begin
|
|
5835
5986
|
@driver.find_element(:xpath, '//*[@name="board_email"]').send_keys(more_txt1)
|
5836
5987
|
sleep(1)
|
5837
5988
|
rescue
|
5838
|
-
|
5989
|
+
begin
|
5990
|
+
@driver.find_element(:xpath, '//*[@type="url" and @class="homepage rx_ev_url"]').send_keys(more_txt1)
|
5991
|
+
sleep(1)
|
5992
|
+
rescue
|
5993
|
+
|
5994
|
+
|
5995
|
+
end
|
5839
5996
|
|
5840
5997
|
end
|
5841
5998
|
|
@@ -6070,6 +6227,11 @@ begin
|
|
6070
6227
|
@driver.find_element(:xpath, '//*[@id="category"]').click
|
6071
6228
|
sleep(1)
|
6072
6229
|
rescue
|
6230
|
+
begin
|
6231
|
+
@driver.find_element(:xpath, '//*[@form="write" and @name="subjectId"]').click
|
6232
|
+
sleep(1)
|
6233
|
+
rescue
|
6234
|
+
end
|
6073
6235
|
end
|
6074
6236
|
end
|
6075
6237
|
end
|
@@ -6260,348 +6422,345 @@ begin
|
|
6260
6422
|
rescue
|
6261
6423
|
end
|
6262
6424
|
|
6263
|
-
|
6264
|
-
#요소 자체 제거 하기 기능
|
6265
|
-
|
6266
|
-
# chat_box = @driver.find_element(:xpath, '//*[@title="reCAPTCHA"]')
|
6267
|
-
# @driver.execute_script("arguments[0].remove();", chat_box)
|
6268
|
-
# puts '방해 code 제거 완료.......'.green
|
6269
|
-
# sleep(1)
|
6270
|
-
# rescue
|
6271
|
-
# end
|
6272
|
-
|
6273
|
-
|
6274
|
-
|
6425
|
+
|
6275
6426
|
|
6276
6427
|
|
6277
|
-
title = title.strip
|
6278
|
-
##제목 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
6279
|
-
#puts '-[√] 제목 입력 필드 탐색 시작.......'.yellow
|
6280
6428
|
|
6281
|
-
begin
|
6282
|
-
@driver.find_element(:xpath, '//*[@id="wr_subject"]').click
|
6283
|
-
sleep(1)
|
6284
|
-
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys(title)
|
6285
|
-
puts '-[√] 제목 code 1.......'.yellow
|
6286
|
-
rescue
|
6287
|
-
begin
|
6288
|
-
@driver.find_element(:xpath, '//*[@fw-label="제목"]').click
|
6289
|
-
sleep(1)
|
6290
|
-
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys(title)
|
6291
|
-
puts '-[√] 제목 code 2.......'.yellow
|
6292
|
-
rescue
|
6293
|
-
begin
|
6294
|
-
@driver.find_element(:xpath, '//*[@name="subject"]').click
|
6295
|
-
sleep(1)
|
6296
|
-
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys(title)
|
6297
|
-
puts '-[√] 제목 code 3.......'.yellow
|
6298
|
-
rescue
|
6299
|
-
begin
|
6300
|
-
@driver.find_element(:xpath, '//*[@name="title"]').click
|
6301
|
-
sleep(1)
|
6302
|
-
@driver.find_element(:xpath, '//*[@name="title"]').send_keys(title)
|
6303
|
-
puts '-[√] 제목 code 4.......'.yellow
|
6304
|
-
rescue
|
6305
|
-
begin
|
6306
|
-
@driver.find_element(:xpath, '//*[@id="wr_title"]').click
|
6307
|
-
sleep(1)
|
6308
|
-
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys(title)
|
6309
|
-
puts '-[√] 제목 code 5.......'.yellow
|
6310
|
-
rescue
|
6311
|
-
begin
|
6312
|
-
@driver.find_element(:xpath, '//*[@id="title"]').click
|
6313
|
-
sleep(1)
|
6314
|
-
@driver.find_element(:xpath, '//*[@id="title"]').send_keys(title)
|
6315
|
-
puts '-[√] 제목 code 6.......'.yellow
|
6316
|
-
rescue
|
6317
|
-
begin
|
6318
|
-
@driver.find_element(:xpath, '//*[@id="postTitle"]').click
|
6319
|
-
sleep(1)
|
6320
|
-
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys(title)
|
6321
|
-
puts '-[√] 제목 code 7.......'.yellow
|
6322
|
-
rescue
|
6323
|
-
begin
|
6324
|
-
@driver.find_element(:xpath, '//*[@title="input"]').click
|
6325
|
-
sleep(1)
|
6326
|
-
@driver.find_element(:xpath, '//*[@title="input"]').send_keys(title)
|
6327
|
-
puts '-[√] 제목 code 8.......'.yellow
|
6328
|
-
rescue
|
6329
|
-
begin
|
6330
|
-
@driver.find_element(:xpath, '//*[@name="wr_subject"]').click
|
6331
|
-
sleep(1)
|
6332
|
-
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys(title)
|
6333
|
-
puts '-[√] 제목 code 9.......'.yellow
|
6334
|
-
rescue
|
6335
|
-
begin
|
6336
|
-
@driver.find_element(:xpath, '//*[@name="post_title"]').click
|
6337
|
-
sleep(1)
|
6338
|
-
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys(title)
|
6339
|
-
puts '-[√] 제목 code 11.......'.yellow
|
6340
|
-
rescue
|
6341
|
-
begin
|
6342
|
-
@driver.find_element(:xpath, '//*[@title="제목"]').click
|
6343
|
-
sleep(1)
|
6344
|
-
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys(title)
|
6345
|
-
puts '-[√] 제목 code 12.......'.yellow
|
6346
|
-
rescue
|
6347
|
-
begin
|
6348
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').click
|
6349
|
-
sleep(1)
|
6350
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys(title)
|
6351
|
-
puts '-[√] 제목 code 13.......'.yellow
|
6352
|
-
rescue
|
6353
|
-
begin
|
6354
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목"]').click
|
6355
|
-
sleep(1)
|
6356
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys(title)
|
6357
|
-
puts '-[√] 제목 code 14.......'.yellow
|
6358
|
-
rescue
|
6359
|
-
begin
|
6360
|
-
@driver.find_element(:xpath, '//*[@hname="제목"]').click
|
6361
|
-
sleep(1)
|
6362
|
-
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys(title)
|
6363
|
-
puts '-[√] 제목 code 15.......'.yellow
|
6364
|
-
rescue
|
6365
|
-
begin
|
6366
|
-
@driver.find_element(:xpath, '//*[@id="post_subject"]').click
|
6367
|
-
sleep(1)
|
6368
|
-
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys(title)
|
6369
|
-
puts '-[√] 제목 code 16.......'.yellow
|
6370
|
-
rescue
|
6371
|
-
begin
|
6372
|
-
@driver.find_element(:xpath, '//*[@id="search_bar"]').click
|
6373
|
-
sleep(1)
|
6374
|
-
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys(title)
|
6375
|
-
puts '-[√] 제목 code 17.......'.yellow
|
6376
|
-
rescue
|
6377
|
-
begin
|
6378
|
-
@driver.find_element(:xpath, '//*[@for="wr_subject"]').click
|
6379
|
-
sleep(1)
|
6380
|
-
@driver.find_element(:xpath, '//*[@for="wr_subject"]').send_keys(title)
|
6381
|
-
puts '-[√] 제목 code 18.......'.yellow
|
6382
|
-
|
6383
|
-
rescue
|
6384
|
-
########################################################2차@#######################################
|
6385
|
-
begin
|
6386
|
-
|
6387
|
-
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys(title)
|
6388
|
-
puts '-[√] 제목 code 19.......'.yellow
|
6389
|
-
rescue
|
6390
|
-
begin
|
6391
|
-
|
6392
|
-
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys(title)
|
6393
|
-
puts '-[√] 제목 code 20.......'.yellow
|
6394
|
-
rescue
|
6395
|
-
begin
|
6396
|
-
|
6397
|
-
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys(title)
|
6398
|
-
puts '-[√] 제목 code 21.......'.yellow
|
6399
|
-
rescue
|
6400
|
-
begin
|
6401
|
-
|
6402
|
-
@driver.find_element(:xpath, '//*[@name="title"]').send_keys(title)
|
6403
|
-
puts '-[√] 제목 code 22.......'.yellow
|
6404
|
-
rescue
|
6405
|
-
begin
|
6406
|
-
|
6407
|
-
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys(title)
|
6408
|
-
puts '-[√] 제목 code 23.......'.yellow
|
6409
|
-
rescue
|
6410
|
-
begin
|
6411
|
-
|
6412
|
-
@driver.find_element(:xpath, '//*[@id="title"]').send_keys(title)
|
6413
|
-
puts '-[√] 제목 code 24.......'.yellow
|
6414
|
-
rescue
|
6415
|
-
begin
|
6416
|
-
|
6417
|
-
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys(title)
|
6418
|
-
puts '-[√] 제목 code 25.......'.yellow
|
6419
|
-
rescue
|
6420
|
-
begin
|
6421
|
-
|
6422
|
-
@driver.find_element(:xpath, '//*[@title="input"]').send_keys(title)
|
6423
|
-
puts '-[√] 제목 code 26.......'.yellow
|
6424
|
-
rescue
|
6425
|
-
begin
|
6426
|
-
|
6427
|
-
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys(title)
|
6428
|
-
puts '-[√] 제목 code 27.......'.yellow
|
6429
|
-
rescue
|
6430
|
-
begin
|
6431
|
-
|
6432
|
-
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys(title)
|
6433
|
-
puts '-[√] 제목 code 28.......'.yellow
|
6434
|
-
rescue
|
6435
|
-
begin
|
6436
|
-
|
6437
|
-
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys(title)
|
6438
|
-
puts '-[√] 제목 code 29.......'.yellow
|
6439
|
-
rescue
|
6440
|
-
begin
|
6441
|
-
|
6442
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys(title)
|
6443
|
-
puts '-[√] 제목 code 30.......'.yellow
|
6444
|
-
rescue
|
6445
|
-
begin
|
6446
|
-
|
6447
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys(title)
|
6448
|
-
puts '-[√] 제목 code 31.......'.yellow
|
6449
|
-
rescue
|
6450
|
-
begin
|
6451
|
-
|
6452
|
-
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys(title)
|
6453
|
-
puts '-[√] 제목 code 32.......'.yellow
|
6454
|
-
rescue
|
6455
|
-
begin
|
6456
|
-
|
6457
|
-
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys(title)
|
6458
|
-
puts '-[√] 제목 code 33.......'.yellow
|
6459
|
-
rescue
|
6460
|
-
begin
|
6461
|
-
|
6462
|
-
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys(title)
|
6463
|
-
puts '-[√] 제목 code 34.......'.yellow
|
6464
|
-
rescue
|
6465
|
-
begin
|
6466
|
-
|
6467
|
-
@driver.find_element(:xpath, '//*[@for="wr_subject"]').send_keys(title)
|
6468
|
-
puts '-[√] 제목 code 35.......'.yellow
|
6469
|
-
|
6470
|
-
rescue
|
6471
|
-
begin
|
6472
|
-
|
6473
|
-
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').send_keys(title)
|
6474
|
-
sleep(1)
|
6475
|
-
@driver.action.key_down(:tab).key_up(:tab).perform #x탭
|
6476
|
-
puts '-[√] 제목 code 36.......'.yellow
|
6477
|
-
|
6478
|
-
rescue
|
6479
|
-
begin
|
6480
|
-
|
6481
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요."]').send_keys(title)
|
6482
|
-
sleep(1)
|
6483
|
-
puts '-[√] 제목 code 37.......'.yellow
|
6484
|
-
|
6485
|
-
|
6486
|
-
|
6487
|
-
|
6488
|
-
rescue
|
6489
|
-
begin
|
6490
|
-
|
6491
|
-
@driver.find_element(:xpath, '//*[@id="sj"]').send_keys(title)
|
6492
|
-
sleep(1)
|
6493
|
-
puts '-[√] 제목 code 38.......'.yellow
|
6494
|
-
rescue
|
6495
|
-
begin
|
6496
|
-
|
6497
|
-
@driver.find_element(:xpath, '//*[@class="i_text wid02"]').send_keys(title)
|
6498
|
-
sleep(1)
|
6499
|
-
puts '-[√] 제목 code 39.......'.yellow
|
6500
|
-
rescue
|
6501
|
-
begin
|
6502
|
-
|
6503
|
-
@driver.find_element(:xpath, '//*[@name="rg_title"]').send_keys(title)
|
6504
|
-
sleep(1)
|
6505
|
-
puts '-[√] 제목 code 40.......'.yellow
|
6506
|
-
rescue
|
6507
|
-
begin
|
6508
|
-
|
6509
|
-
@driver.find_element(:css, 'input[@name="title"]').send_keys(title)
|
6510
|
-
sleep(1)
|
6511
|
-
puts '-[√] 제목 code 41.......'.yellow
|
6512
|
-
rescue
|
6513
|
-
begin
|
6514
|
-
@driver.find_element(:xpath, '//*[@id="fm_title"]').send_keys(title)
|
6515
|
-
sleep(1)
|
6516
|
-
puts '-[√] 제목 code 42.......'.yellow
|
6517
|
-
rescue
|
6518
|
-
begin
|
6519
|
-
@driver.find_element(:xpath, '//*[@id="mb_review_i_title"]').send_keys(title)
|
6520
|
-
sleep(1)
|
6521
|
-
puts '-[√] 제목 code 43.......'.yellow
|
6522
|
-
rescue
|
6523
|
-
begin
|
6524
|
-
@driver.find_element(:xpath, '//*[@name="b_subject"]').send_keys(title)
|
6525
|
-
sleep(1)
|
6526
|
-
puts '-[√] 제목 code 44.......'.yellow
|
6527
|
-
rescue
|
6528
|
-
begin
|
6529
|
-
@driver.find_element(:xpath, '//*[@name="board_subject"]').send_keys(title)
|
6530
|
-
sleep(1)
|
6531
|
-
puts '-[√] 제목 code 45.......'.yellow
|
6532
|
-
rescue => e
|
6533
|
-
puts '-[√] 제목 입력 항목 코드 탐색 실패!!.......'.red
|
6534
|
-
puts '-[√] 다음 작업 준비 중으로 1~60 초 정도 기다려주세요.......'.red
|
6535
|
-
|
6536
|
-
@driver.window_handles.each do |handle|
|
6537
|
-
@driver.switch_to.window(handle)
|
6538
|
-
begin
|
6539
|
-
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
6540
|
-
@driver.close
|
6541
|
-
|
6542
|
-
rescue Selenium::WebDriver::Error::WebDriverError => e
|
6543
|
-
puts "크롬 브라우저 종료: #{e.message}"
|
6544
|
-
end
|
6545
|
-
end
|
6546
|
-
return 0
|
6547
|
-
@driver.quit
|
6548
|
-
end
|
6549
|
-
end
|
6550
|
-
end
|
6551
|
-
end
|
6552
|
-
end
|
6553
|
-
end
|
6554
|
-
end
|
6555
|
-
end
|
6556
|
-
end
|
6557
|
-
end
|
6558
|
-
end
|
6559
|
-
end
|
6560
|
-
end
|
6561
|
-
end
|
6562
|
-
end
|
6563
|
-
end
|
6564
|
-
end
|
6565
|
-
end
|
6566
|
-
end
|
6567
|
-
end
|
6568
|
-
end
|
6569
|
-
end
|
6570
|
-
end
|
6571
|
-
end
|
6572
|
-
end
|
6573
|
-
end
|
6574
|
-
end
|
6575
|
-
############################2차 끝######################################
|
6576
|
-
|
6577
|
-
end
|
6578
|
-
end
|
6579
|
-
end
|
6580
|
-
end
|
6581
|
-
end
|
6582
|
-
end
|
6583
|
-
end
|
6584
|
-
end
|
6585
|
-
end
|
6586
|
-
end
|
6587
|
-
end
|
6588
|
-
end
|
6589
|
-
end
|
6590
|
-
end
|
6591
|
-
end
|
6592
|
-
end
|
6593
|
-
end
|
6594
|
-
|
6595
|
-
#puts '-[√] 제목 입력 필드 탐색 종료.......'.yellow
|
6596
|
-
sleep(1)
|
6597
|
-
##<─────────────────────────────────────────────────────────────────────제목 입력 코드 부분
|
6598
6429
|
|
6599
6430
|
|
6600
|
-
|
6601
|
-
|
6431
|
+
title = title.strip
|
6432
|
+
##제목 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
6433
|
+
#puts '-[√] 제목 입력 필드 탐색 시작.......'.yellow
|
6602
6434
|
|
6603
|
-
|
6604
|
-
|
6435
|
+
begin
|
6436
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').click
|
6437
|
+
sleep(1)
|
6438
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys(title)
|
6439
|
+
puts '-[√] 제목 code 1.......'.yellow
|
6440
|
+
rescue
|
6441
|
+
begin
|
6442
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').click
|
6443
|
+
sleep(1)
|
6444
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys(title)
|
6445
|
+
puts '-[√] 제목 code 2.......'.yellow
|
6446
|
+
rescue
|
6447
|
+
begin
|
6448
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').click
|
6449
|
+
sleep(1)
|
6450
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys(title)
|
6451
|
+
puts '-[√] 제목 code 3.......'.yellow
|
6452
|
+
rescue
|
6453
|
+
begin
|
6454
|
+
@driver.find_element(:xpath, '//*[@name="title"]').click
|
6455
|
+
sleep(1)
|
6456
|
+
@driver.find_element(:xpath, '//*[@name="title"]').send_keys(title)
|
6457
|
+
puts '-[√] 제목 code 4.......'.yellow
|
6458
|
+
rescue
|
6459
|
+
begin
|
6460
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').click
|
6461
|
+
sleep(1)
|
6462
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys(title)
|
6463
|
+
puts '-[√] 제목 code 5.......'.yellow
|
6464
|
+
rescue
|
6465
|
+
begin
|
6466
|
+
@driver.find_element(:xpath, '//*[@id="title"]').click
|
6467
|
+
sleep(1)
|
6468
|
+
@driver.find_element(:xpath, '//*[@id="title"]').send_keys(title)
|
6469
|
+
puts '-[√] 제목 code 6.......'.yellow
|
6470
|
+
rescue
|
6471
|
+
begin
|
6472
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').click
|
6473
|
+
sleep(1)
|
6474
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys(title)
|
6475
|
+
puts '-[√] 제목 code 7.......'.yellow
|
6476
|
+
rescue
|
6477
|
+
begin
|
6478
|
+
@driver.find_element(:xpath, '//*[@title="input"]').click
|
6479
|
+
sleep(1)
|
6480
|
+
@driver.find_element(:xpath, '//*[@title="input"]').send_keys(title)
|
6481
|
+
puts '-[√] 제목 code 8.......'.yellow
|
6482
|
+
rescue
|
6483
|
+
begin
|
6484
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').click
|
6485
|
+
sleep(1)
|
6486
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys(title)
|
6487
|
+
puts '-[√] 제목 code 9.......'.yellow
|
6488
|
+
rescue
|
6489
|
+
begin
|
6490
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').click
|
6491
|
+
sleep(1)
|
6492
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys(title)
|
6493
|
+
puts '-[√] 제목 code 11.......'.yellow
|
6494
|
+
rescue
|
6495
|
+
begin
|
6496
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').click
|
6497
|
+
sleep(1)
|
6498
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys(title)
|
6499
|
+
puts '-[√] 제목 code 12.......'.yellow
|
6500
|
+
rescue
|
6501
|
+
begin
|
6502
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').click
|
6503
|
+
sleep(1)
|
6504
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys(title)
|
6505
|
+
puts '-[√] 제목 code 13.......'.yellow
|
6506
|
+
rescue
|
6507
|
+
begin
|
6508
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').click
|
6509
|
+
sleep(1)
|
6510
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys(title)
|
6511
|
+
puts '-[√] 제목 code 14.......'.yellow
|
6512
|
+
rescue
|
6513
|
+
begin
|
6514
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').click
|
6515
|
+
sleep(1)
|
6516
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys(title)
|
6517
|
+
puts '-[√] 제목 code 15.......'.yellow
|
6518
|
+
rescue
|
6519
|
+
begin
|
6520
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').click
|
6521
|
+
sleep(1)
|
6522
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys(title)
|
6523
|
+
puts '-[√] 제목 code 16.......'.yellow
|
6524
|
+
rescue
|
6525
|
+
begin
|
6526
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').click
|
6527
|
+
sleep(1)
|
6528
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys(title)
|
6529
|
+
puts '-[√] 제목 code 17.......'.yellow
|
6530
|
+
rescue
|
6531
|
+
begin
|
6532
|
+
@driver.find_element(:xpath, '//*[@for="wr_subject"]').click
|
6533
|
+
sleep(1)
|
6534
|
+
@driver.find_element(:xpath, '//*[@for="wr_subject"]').send_keys(title)
|
6535
|
+
puts '-[√] 제목 code 18.......'.yellow
|
6536
|
+
|
6537
|
+
rescue
|
6538
|
+
########################################################2차@#######################################
|
6539
|
+
begin
|
6540
|
+
|
6541
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys(title)
|
6542
|
+
puts '-[√] 제목 code 19.......'.yellow
|
6543
|
+
rescue
|
6544
|
+
begin
|
6545
|
+
|
6546
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys(title)
|
6547
|
+
puts '-[√] 제목 code 20.......'.yellow
|
6548
|
+
rescue
|
6549
|
+
begin
|
6550
|
+
|
6551
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys(title)
|
6552
|
+
puts '-[√] 제목 code 21.......'.yellow
|
6553
|
+
rescue
|
6554
|
+
begin
|
6555
|
+
|
6556
|
+
@driver.find_element(:xpath, '//*[@name="title"]').send_keys(title)
|
6557
|
+
puts '-[√] 제목 code 22.......'.yellow
|
6558
|
+
rescue
|
6559
|
+
begin
|
6560
|
+
|
6561
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys(title)
|
6562
|
+
puts '-[√] 제목 code 23.......'.yellow
|
6563
|
+
rescue
|
6564
|
+
begin
|
6565
|
+
|
6566
|
+
@driver.find_element(:xpath, '//*[@id="title"]').send_keys(title)
|
6567
|
+
puts '-[√] 제목 code 24.......'.yellow
|
6568
|
+
rescue
|
6569
|
+
begin
|
6570
|
+
|
6571
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys(title)
|
6572
|
+
puts '-[√] 제목 code 25.......'.yellow
|
6573
|
+
rescue
|
6574
|
+
begin
|
6575
|
+
|
6576
|
+
@driver.find_element(:xpath, '//*[@title="input"]').send_keys(title)
|
6577
|
+
puts '-[√] 제목 code 26.......'.yellow
|
6578
|
+
rescue
|
6579
|
+
begin
|
6580
|
+
|
6581
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys(title)
|
6582
|
+
puts '-[√] 제목 code 27.......'.yellow
|
6583
|
+
rescue
|
6584
|
+
begin
|
6585
|
+
|
6586
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys(title)
|
6587
|
+
puts '-[√] 제목 code 28.......'.yellow
|
6588
|
+
rescue
|
6589
|
+
begin
|
6590
|
+
|
6591
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys(title)
|
6592
|
+
puts '-[√] 제목 code 29.......'.yellow
|
6593
|
+
rescue
|
6594
|
+
begin
|
6595
|
+
|
6596
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys(title)
|
6597
|
+
puts '-[√] 제목 code 30.......'.yellow
|
6598
|
+
rescue
|
6599
|
+
begin
|
6600
|
+
|
6601
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys(title)
|
6602
|
+
puts '-[√] 제목 code 31.......'.yellow
|
6603
|
+
rescue
|
6604
|
+
begin
|
6605
|
+
|
6606
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys(title)
|
6607
|
+
puts '-[√] 제목 code 32.......'.yellow
|
6608
|
+
rescue
|
6609
|
+
begin
|
6610
|
+
|
6611
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys(title)
|
6612
|
+
puts '-[√] 제목 code 33.......'.yellow
|
6613
|
+
rescue
|
6614
|
+
begin
|
6615
|
+
|
6616
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys(title)
|
6617
|
+
puts '-[√] 제목 code 34.......'.yellow
|
6618
|
+
rescue
|
6619
|
+
begin
|
6620
|
+
|
6621
|
+
@driver.find_element(:xpath, '//*[@for="wr_subject"]').send_keys(title)
|
6622
|
+
puts '-[√] 제목 code 35.......'.yellow
|
6623
|
+
|
6624
|
+
rescue
|
6625
|
+
begin
|
6626
|
+
|
6627
|
+
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').send_keys(title)
|
6628
|
+
sleep(1)
|
6629
|
+
@driver.action.key_down(:tab).key_up(:tab).perform #x탭
|
6630
|
+
puts '-[√] 제목 code 36.......'.yellow
|
6631
|
+
|
6632
|
+
rescue
|
6633
|
+
begin
|
6634
|
+
|
6635
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요."]').send_keys(title)
|
6636
|
+
sleep(1)
|
6637
|
+
puts '-[√] 제목 code 37.......'.yellow
|
6638
|
+
|
6639
|
+
|
6640
|
+
|
6641
|
+
|
6642
|
+
rescue
|
6643
|
+
begin
|
6644
|
+
|
6645
|
+
@driver.find_element(:xpath, '//*[@id="sj"]').send_keys(title)
|
6646
|
+
sleep(1)
|
6647
|
+
puts '-[√] 제목 code 38.......'.yellow
|
6648
|
+
rescue
|
6649
|
+
begin
|
6650
|
+
|
6651
|
+
@driver.find_element(:xpath, '//*[@class="i_text wid02"]').send_keys(title)
|
6652
|
+
sleep(1)
|
6653
|
+
puts '-[√] 제목 code 39.......'.yellow
|
6654
|
+
rescue
|
6655
|
+
begin
|
6656
|
+
|
6657
|
+
@driver.find_element(:xpath, '//*[@name="rg_title"]').send_keys(title)
|
6658
|
+
sleep(1)
|
6659
|
+
puts '-[√] 제목 code 40.......'.yellow
|
6660
|
+
rescue
|
6661
|
+
begin
|
6662
|
+
|
6663
|
+
@driver.find_element(:css, 'input[@name="title"]').send_keys(title)
|
6664
|
+
sleep(1)
|
6665
|
+
puts '-[√] 제목 code 41.......'.yellow
|
6666
|
+
rescue
|
6667
|
+
begin
|
6668
|
+
@driver.find_element(:xpath, '//*[@id="fm_title"]').send_keys(title)
|
6669
|
+
sleep(1)
|
6670
|
+
puts '-[√] 제목 code 42.......'.yellow
|
6671
|
+
rescue
|
6672
|
+
begin
|
6673
|
+
@driver.find_element(:xpath, '//*[@id="mb_review_i_title"]').send_keys(title)
|
6674
|
+
sleep(1)
|
6675
|
+
puts '-[√] 제목 code 43.......'.yellow
|
6676
|
+
rescue
|
6677
|
+
begin
|
6678
|
+
@driver.find_element(:xpath, '//*[@name="b_subject"]').send_keys(title)
|
6679
|
+
sleep(1)
|
6680
|
+
puts '-[√] 제목 code 44.......'.yellow
|
6681
|
+
rescue
|
6682
|
+
begin
|
6683
|
+
@driver.find_element(:xpath, '//*[@name="board_subject"]').send_keys(title)
|
6684
|
+
sleep(1)
|
6685
|
+
puts '-[√] 제목 code 45.......'.yellow
|
6686
|
+
rescue
|
6687
|
+
begin
|
6688
|
+
@driver.find_element(:xpath, '//*[@id="csTitle"]').send_keys(title)
|
6689
|
+
sleep(1)
|
6690
|
+
puts '-[√] 제목 code 45.......'.yellow
|
6691
|
+
rescue => e
|
6692
|
+
puts '-[√] 제목 입력 항목 코드 탐색 실패!!.......'.red
|
6693
|
+
puts '-[√] 다음 작업 준비 중으로 1~60 초 정도 기다려주세요.......'.red
|
6694
|
+
|
6695
|
+
@driver.window_handles.each do |handle|
|
6696
|
+
@driver.switch_to.window(handle)
|
6697
|
+
begin
|
6698
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
6699
|
+
@driver.close
|
6700
|
+
|
6701
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
6702
|
+
puts "크롬 브라우저 종료: #{e.message}"
|
6703
|
+
end
|
6704
|
+
end
|
6705
|
+
return 0
|
6706
|
+
@driver.quit
|
6707
|
+
end
|
6708
|
+
end
|
6709
|
+
end
|
6710
|
+
end
|
6711
|
+
end
|
6712
|
+
end
|
6713
|
+
end
|
6714
|
+
end
|
6715
|
+
end
|
6716
|
+
end
|
6717
|
+
end
|
6718
|
+
end
|
6719
|
+
end
|
6720
|
+
end
|
6721
|
+
end
|
6722
|
+
end
|
6723
|
+
end
|
6724
|
+
end
|
6725
|
+
end
|
6726
|
+
end
|
6727
|
+
end
|
6728
|
+
end
|
6729
|
+
end
|
6730
|
+
end
|
6731
|
+
end
|
6732
|
+
end
|
6733
|
+
end
|
6734
|
+
end
|
6735
|
+
############################2차 끝######################################
|
6736
|
+
|
6737
|
+
end
|
6738
|
+
end
|
6739
|
+
end
|
6740
|
+
end
|
6741
|
+
end
|
6742
|
+
end
|
6743
|
+
end
|
6744
|
+
end
|
6745
|
+
end
|
6746
|
+
end
|
6747
|
+
end
|
6748
|
+
end
|
6749
|
+
end
|
6750
|
+
end
|
6751
|
+
end
|
6752
|
+
end
|
6753
|
+
end
|
6754
|
+
|
6755
|
+
#puts '-[√] 제목 입력 필드 탐색 종료.......'.yellow
|
6756
|
+
sleep(1)
|
6757
|
+
##<─────────────────────────────────────────────────────────────────────제목 입력 코드 부분
|
6758
|
+
|
6759
|
+
##HTML 버튼 코드 부분─────────────────────────────────────────────────────────────────────>
|
6760
|
+
# puts '-[√] HTML 코드 변경 버튼 탐색 시작.......'.yellow
|
6761
|
+
|
6762
|
+
begin
|
6763
|
+
#아이프레임에서 코드 선택
|
6605
6764
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
6606
6765
|
|
6607
6766
|
html_bb = @driver.find_element(:xpath, '//*[@class="se2_to_html"]')
|
@@ -6614,7 +6773,7 @@ begin
|
|
6614
6773
|
sleep(1)
|
6615
6774
|
rescue
|
6616
6775
|
begin
|
6617
|
-
|
6776
|
+
@driver.switch_to.default_content()
|
6618
6777
|
html_bb = @driver.find_element(:xpath, '//*[@title="HTML 편집"]')
|
6619
6778
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
6620
6779
|
puts '-[√] HTML 코드 2 code.......'.yellow
|
@@ -6835,9 +6994,10 @@ begin
|
|
6835
6994
|
puts '-[√] HTML 코드 29 code.......'.yellow
|
6836
6995
|
sleep(1)
|
6837
6996
|
@driver.find_element(:xpath, '//*[@id="html"]').click
|
6838
|
-
@driver.switch_to.default_content
|
6997
|
+
@driver.switch_to.default_content()
|
6839
6998
|
rescue
|
6840
6999
|
begin
|
7000
|
+
@driver.switch_to.default_content()
|
6841
7001
|
html_bb = @driver.find_element(:xpath, '//*[@type="radio" and @name="rg_html_use" and @value="1"]')
|
6842
7002
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
6843
7003
|
puts '-[√] HTML 코드 28 code.......'.yellow
|
@@ -6858,6 +7018,7 @@ begin
|
|
6858
7018
|
sleep(1)
|
6859
7019
|
rescue
|
6860
7020
|
begin
|
7021
|
+
@driver.switch_to.default_content()
|
6861
7022
|
html_bb = @driver.find_element(:xpath, '//*[@type="checkbox" and @name="ctype" and @value="H"]')
|
6862
7023
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
6863
7024
|
#아이프레임 나오기
|
@@ -6935,7 +7096,7 @@ begin
|
|
6935
7096
|
end
|
6936
7097
|
end
|
6937
7098
|
end
|
6938
|
-
|
7099
|
+
|
6939
7100
|
|
6940
7101
|
|
6941
7102
|
begin
|
@@ -6954,338 +7115,340 @@ begin
|
|
6954
7115
|
|
6955
7116
|
##<─────────────────────────────────────────────────────────────────────HTML 버튼 코드 부분
|
6956
7117
|
|
6957
|
-
|
6958
|
-
|
6959
7118
|
|
6960
7119
|
##내용 입력 필드 코드 부분─────────────────────────────────────────────────────────────────────>
|
6961
7120
|
#puts '-[√] 내용 입력 부분 탐색 시작.......'.yellow
|
6962
7121
|
#sleep(1)
|
6963
7122
|
|
6964
7123
|
begin
|
6965
|
-
|
6966
|
-
|
6967
|
-
|
7124
|
+
@driver.find_element(:xpath, '//*[@name="content"]').click
|
7125
|
+
sleep(1)
|
7126
|
+
puts '내용 항목 코드 타겟 1.......'.red
|
6968
7127
|
rescue
|
6969
|
-
|
6970
|
-
|
6971
|
-
|
6972
|
-
|
6973
|
-
|
6974
|
-
|
6975
|
-
|
6976
|
-
|
6977
|
-
|
6978
|
-
|
6979
|
-
|
6980
|
-
|
6981
|
-
|
6982
|
-
|
6983
|
-
|
6984
|
-
|
6985
|
-
|
6986
|
-
|
6987
|
-
|
6988
|
-
|
6989
|
-
|
6990
|
-
|
6991
|
-
|
6992
|
-
|
6993
|
-
|
6994
|
-
|
6995
|
-
|
6996
|
-
|
6997
|
-
|
6998
|
-
|
6999
|
-
|
7000
|
-
|
7001
|
-
|
7002
|
-
|
7003
|
-
|
7004
|
-
|
7005
|
-
|
7006
|
-
|
7007
|
-
|
7008
|
-
|
7009
|
-
|
7010
|
-
|
7011
|
-
|
7012
|
-
|
7013
|
-
|
7014
|
-
|
7015
|
-
|
7016
|
-
|
7017
|
-
|
7018
|
-
|
7019
|
-
|
7020
|
-
|
7021
|
-
|
7022
|
-
|
7023
|
-
|
7024
|
-
|
7025
|
-
|
7026
|
-
|
7027
|
-
|
7028
|
-
|
7029
|
-
|
7030
|
-
|
7031
|
-
|
7032
|
-
|
7033
|
-
|
7034
|
-
|
7035
|
-
|
7036
|
-
|
7037
|
-
|
7038
|
-
|
7039
|
-
|
7040
|
-
|
7041
|
-
|
7042
|
-
|
7043
|
-
|
7044
|
-
|
7045
|
-
|
7046
|
-
|
7047
|
-
|
7048
|
-
|
7049
|
-
|
7050
|
-
|
7051
|
-
|
7052
|
-
|
7053
|
-
|
7054
|
-
|
7055
|
-
|
7056
|
-
|
7057
|
-
|
7058
|
-
|
7059
|
-
|
7060
|
-
|
7061
|
-
|
7062
|
-
|
7063
|
-
|
7064
|
-
|
7065
|
-
|
7066
|
-
|
7067
|
-
|
7068
|
-
|
7069
|
-
|
7070
|
-
|
7071
|
-
|
7072
|
-
|
7073
|
-
|
7074
|
-
|
7075
|
-
|
7076
|
-
|
7077
|
-
|
7078
|
-
|
7079
|
-
|
7080
|
-
|
7081
|
-
|
7082
|
-
|
7083
|
-
|
7084
|
-
|
7085
|
-
|
7086
|
-
|
7087
|
-
|
7088
|
-
|
7089
|
-
|
7090
|
-
|
7091
|
-
|
7092
|
-
|
7093
|
-
|
7094
|
-
|
7095
|
-
|
7096
|
-
|
7097
|
-
|
7098
|
-
|
7099
|
-
|
7100
|
-
|
7101
|
-
|
7102
|
-
|
7103
|
-
|
7104
|
-
|
7105
|
-
|
7106
|
-
|
7107
|
-
|
7108
|
-
|
7109
|
-
|
7110
|
-
|
7111
|
-
|
7112
|
-
|
7113
|
-
|
7114
|
-
|
7115
|
-
|
7116
|
-
|
7117
|
-
|
7118
|
-
|
7119
|
-
|
7120
|
-
|
7121
|
-
|
7122
|
-
|
7123
|
-
|
7124
|
-
|
7125
|
-
|
7126
|
-
|
7127
|
-
|
7128
|
-
|
7129
|
-
|
7130
|
-
|
7131
|
-
|
7132
|
-
|
7133
|
-
|
7134
|
-
|
7135
|
-
|
7136
|
-
|
7137
|
-
|
7138
|
-
|
7139
|
-
|
7140
|
-
|
7141
|
-
|
7142
|
-
|
7143
|
-
|
7144
|
-
|
7145
|
-
|
7146
|
-
|
7147
|
-
|
7148
|
-
|
7149
|
-
|
7150
|
-
|
7151
|
-
|
7152
|
-
|
7153
|
-
|
7154
|
-
|
7155
|
-
|
7156
|
-
|
7157
|
-
|
7158
|
-
|
7159
|
-
|
7160
|
-
|
7161
|
-
|
7162
|
-
|
7163
|
-
|
7164
|
-
|
7165
|
-
|
7166
|
-
|
7167
|
-
|
7168
|
-
|
7169
|
-
|
7170
|
-
|
7171
|
-
|
7172
|
-
|
7173
|
-
|
7174
|
-
|
7175
|
-
|
7176
|
-
|
7177
|
-
|
7178
|
-
|
7179
|
-
|
7180
|
-
|
7181
|
-
|
7182
|
-
|
7183
|
-
|
7184
|
-
|
7185
|
-
|
7186
|
-
|
7187
|
-
|
7188
|
-
|
7189
|
-
|
7190
|
-
|
7191
|
-
|
7192
|
-
|
7193
|
-
|
7194
|
-
|
7195
|
-
|
7196
|
-
|
7197
|
-
|
7198
|
-
|
7199
|
-
|
7200
|
-
|
7201
|
-
|
7202
|
-
|
7203
|
-
|
7204
|
-
|
7205
|
-
|
7206
|
-
|
7207
|
-
|
7208
|
-
|
7209
|
-
|
7210
|
-
|
7211
|
-
|
7212
|
-
|
7213
|
-
|
7214
|
-
|
7215
|
-
|
7216
|
-
|
7217
|
-
|
7218
|
-
|
7219
|
-
|
7220
|
-
|
7221
|
-
|
7222
|
-
|
7223
|
-
|
7224
|
-
|
7225
|
-
|
7226
|
-
|
7227
|
-
|
7228
|
-
|
7229
|
-
|
7230
|
-
|
7231
|
-
|
7232
|
-
|
7233
|
-
|
7234
|
-
|
7235
|
-
|
7236
|
-
|
7237
|
-
|
7238
|
-
|
7239
|
-
|
7240
|
-
|
7241
|
-
|
7242
|
-
|
7243
|
-
|
7244
|
-
|
7245
|
-
|
7246
|
-
|
7247
|
-
|
7248
|
-
|
7249
|
-
|
7250
|
-
|
7251
|
-
|
7252
|
-
|
7253
|
-
|
7254
|
-
|
7255
|
-
|
7256
|
-
|
7257
|
-
|
7258
|
-
|
7259
|
-
|
7260
|
-
|
7261
|
-
|
7262
|
-
|
7263
|
-
|
7264
|
-
|
7265
|
-
|
7266
|
-
|
7267
|
-
|
7268
|
-
|
7269
|
-
|
7270
|
-
|
7271
|
-
|
7272
|
-
|
7273
|
-
|
7274
|
-
|
7275
|
-
|
7276
|
-
|
7277
|
-
|
7278
|
-
|
7279
|
-
|
7280
|
-
|
7281
|
-
|
7282
|
-
|
7283
|
-
|
7284
|
-
|
7285
|
-
|
7286
|
-
|
7287
|
-
|
7288
|
-
|
7128
|
+
begin
|
7129
|
+
@driver.find_element(:xpath, '//*[@class="note-codable"]').click
|
7130
|
+
sleep(1)
|
7131
|
+
puts '내용 항목 코드 타겟 2.......'.red
|
7132
|
+
rescue
|
7133
|
+
begin
|
7134
|
+
#아이프레임에서 코드 선택
|
7135
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="content_IFRAME"]'))
|
7136
|
+
@driver.find_element(:xpath, '//*[@id="content_BODY"]').click
|
7137
|
+
#아이프레임 나오기
|
7138
|
+
@driver.switch_to.default_content()
|
7139
|
+
sleep(1)
|
7140
|
+
puts '내용 항목 코드 타겟 3.......'.red
|
7141
|
+
rescue
|
7142
|
+
begin
|
7143
|
+
@driver.find_element(:xpath, '//*[@class="wr_content"]').click
|
7144
|
+
sleep(1)
|
7145
|
+
puts '내용 항목 코드 타겟 4.......'.red
|
7146
|
+
rescue
|
7147
|
+
begin
|
7148
|
+
@driver.find_element(:xpath, '//*[@id="wr_content"]').click
|
7149
|
+
sleep(1)
|
7150
|
+
puts '내용 항목 코드 타겟 5.......'.red
|
7151
|
+
rescue
|
7152
|
+
begin
|
7153
|
+
@driver.find_element(:xpath, '//*[@name="wr_content"]').click
|
7154
|
+
sleep(1)
|
7155
|
+
puts '내용 항목 코드 타겟 6.......'.red
|
7156
|
+
rescue
|
7157
|
+
begin
|
7158
|
+
#아이프레임에서 코드 선택
|
7159
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
7160
|
+
@driver.find_element(:xpath, '/html').click
|
7161
|
+
#아이프레임 나오기
|
7162
|
+
@driver.switch_to.default_content()
|
7163
|
+
sleep(1)
|
7164
|
+
puts '내용 항목 코드 타겟 7.......'.red
|
7165
|
+
rescue
|
7166
|
+
begin
|
7167
|
+
@driver.find_element(:xpath, '//*[@id="edit_contents_textareaBox"]/td/textarea').click
|
7168
|
+
sleep(1)
|
7169
|
+
puts '내용 항목 코드 타겟 8.......'.red
|
7170
|
+
rescue
|
7171
|
+
begin
|
7172
|
+
@driver.find_element(:xpath, '//*[@name="kboard_content"]').click
|
7173
|
+
sleep(1)
|
7174
|
+
puts '내용 항목 코드 타겟 9.......'.red
|
7175
|
+
rescue
|
7176
|
+
begin
|
7177
|
+
@driver.find_element(:xpath, '//*[@class="kboard-content"]').click
|
7178
|
+
sleep(1)
|
7179
|
+
puts '내용 항목 코드 타겟 9-1.......'.red
|
7180
|
+
rescue
|
7181
|
+
begin
|
7182
|
+
#아이프레임에서 코드 선택
|
7183
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
7184
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집 모드"]').click
|
7185
|
+
#아이프레임 나오기
|
7186
|
+
@driver.switch_to.default_content()
|
7187
|
+
sleep(1)
|
7188
|
+
puts '내용 항목 코드 타겟 10.......'.red
|
7189
|
+
rescue
|
7190
|
+
begin
|
7191
|
+
@driver.find_element(:xpath, '//*[@title="리치 텍스트 편집기, content"]').click
|
7192
|
+
sleep(1)
|
7193
|
+
puts '내용 항목 코드 타겟 11.......'.red
|
7194
|
+
rescue
|
7195
|
+
begin
|
7196
|
+
@driver.find_element(:xpath, '//*[@aria-label="리치 텍스트 편집기, content"]').click
|
7197
|
+
sleep(1)
|
7198
|
+
puts '내용 항목 코드 타겟 12.......'.red
|
7199
|
+
rescue
|
7200
|
+
begin
|
7201
|
+
@driver.find_element(:xpath, '//*[@aria-label="리치 텍스트 편집기, editor1"]').click
|
7202
|
+
sleep(1)
|
7203
|
+
puts '내용 항목 코드 타겟 13.......'.red
|
7204
|
+
rescue
|
7205
|
+
begin
|
7206
|
+
@driver.find_element(:xpath, '//*[@title="리치 텍스트 편집기, editor1"]').click
|
7207
|
+
sleep(1)
|
7208
|
+
puts '내용 항목 코드 타겟 14.......'.red
|
7209
|
+
rescue
|
7210
|
+
begin
|
7211
|
+
@driver.find_element(:xpath, '//*[@id="cke_1_contents"]/textarea]').click
|
7212
|
+
sleep(1)
|
7213
|
+
puts '내용 항목 코드 타겟 15.......'.red
|
7214
|
+
rescue
|
7215
|
+
begin
|
7216
|
+
@driver.find_element(:xpath, '//*[@placeholder="내용을 구체적으로 등록해 주세요."]').click
|
7217
|
+
sleep(1)
|
7218
|
+
puts '내용 항목 코드 타겟 16.......'.red
|
7219
|
+
rescue
|
7220
|
+
begin
|
7221
|
+
@driver.find_element(:xpath, '//*[@class="fr-code"]').click
|
7222
|
+
sleep(1)
|
7223
|
+
puts '내용 항목 코드 타겟 17.......'.red
|
7224
|
+
rescue
|
7225
|
+
begin
|
7226
|
+
@driver.find_element(:xpath, '//*[@title="내용"]').click
|
7227
|
+
sleep(1)
|
7228
|
+
puts '내용 항목 코드 타겟 18.......'.red
|
7229
|
+
rescue
|
7230
|
+
begin
|
7231
|
+
@driver.find_element(:xpath, '//*[@class="cheditor-editarea-text-content"]').click
|
7232
|
+
sleep(1)
|
7233
|
+
puts '내용 항목 코드 타겟 19.......'.red
|
7234
|
+
rescue
|
7235
|
+
begin
|
7236
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="bowrite_content"]/div/iframe"]'))
|
7237
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집 모드"]').click
|
7238
|
+
@driver.switch_to.default_content()
|
7239
|
+
sleep(1)
|
7240
|
+
puts '내용 항목 코드 타겟 20.......'.red
|
7241
|
+
rescue
|
7242
|
+
begin
|
7243
|
+
@driver.find_element(:xpath, '//*[@class="CodeMirror-lines"]').click
|
7244
|
+
sleep(1)
|
7245
|
+
puts '내용 항목 코드 타겟 21.......'.red
|
7246
|
+
rescue
|
7247
|
+
begin
|
7248
|
+
@driver.find_element(:xpath, '//*[@id="tx_canvas_source"]').click
|
7249
|
+
sleep(1)
|
7250
|
+
puts '내용 항목 코드 타겟 22.......'.red
|
7251
|
+
rescue
|
7252
|
+
begin
|
7253
|
+
@driver.find_element(:xpath, '//*[@class="note-editable"]').click
|
7254
|
+
sleep(1)
|
7255
|
+
puts '내용 항목 코드 타겟 23.......'.red
|
7256
|
+
rescue
|
7257
|
+
begin
|
7258
|
+
@driver.find_element(:xpath, '//*[@id="simpleeditor_instance_3"]').click
|
7259
|
+
sleep(1)
|
7260
|
+
puts '내용 항목 코드 타겟 23-1.......'.red
|
7261
|
+
rescue
|
7262
|
+
begin
|
7263
|
+
@driver.find_element(:xpath, '//*[@role="textbox"]').click
|
7264
|
+
sleep(1)
|
7265
|
+
puts '내용 항목 코드 타겟 24.......'.red
|
7266
|
+
rescue
|
7267
|
+
begin
|
7268
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cke_1_contents"]/iframe'))
|
7269
|
+
@driver.find_element(:xpath, '/html').click
|
7270
|
+
sleep(1)
|
7271
|
+
puts '내용 항목 코드 타겟 25.......'.red
|
7272
|
+
rescue
|
7273
|
+
begin
|
7274
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="b_content_ifr"]'))
|
7275
|
+
@driver.find_element(:xpath, '//*[@id="tinymce"]').click
|
7276
|
+
sleep(1)
|
7277
|
+
puts '내용 항목 코드 타겟 26.......'.red
|
7278
|
+
rescue
|
7279
|
+
begin
|
7280
|
+
@driver.find_element(:xpath, '//*[@id="com_txt_box"]').click
|
7281
|
+
sleep(1)
|
7282
|
+
puts '내용 항목 코드 타겟 27.......'.red
|
7283
|
+
rescue
|
7284
|
+
begin
|
7285
|
+
@driver.find_element(:xpath, '//*[@aria-label="Source code editing area"]').click
|
7286
|
+
sleep(1)
|
7287
|
+
puts '내용 항목 코드 타겟 28.......'.red
|
7288
|
+
rescue
|
7289
|
+
begin
|
7290
|
+
@driver.find_element(:xpath, '//*[@title="리치 텍스트 편집기, postContent"]').click
|
7291
|
+
sleep(1)
|
7292
|
+
puts '내용 항목 코드 타겟 29.......'.red
|
7293
|
+
rescue
|
7294
|
+
begin
|
7295
|
+
@driver.find_element(:xpath, '//*[@id="post_body"]/div[1]/div').click
|
7296
|
+
sleep(1)
|
7297
|
+
puts '내용 항목 코드 타겟 30.......'.red
|
7298
|
+
rescue
|
7299
|
+
begin
|
7300
|
+
@driver.find_element(:xpath, '//*[@class="fr-element fr-view"]').click
|
7301
|
+
sleep(1)
|
7302
|
+
puts '내용 항목 코드 타겟 31.......'.red
|
7303
|
+
rescue
|
7304
|
+
begin
|
7305
|
+
@driver.find_element(:xpath, '//*[@id="CONTENT"]').click
|
7306
|
+
sleep(1)
|
7307
|
+
puts '내용 항목 코드 타겟 32.......'.red
|
7308
|
+
rescue
|
7309
|
+
begin
|
7310
|
+
@driver.find_element(:xpath, '//*[@id="div_text"]').click
|
7311
|
+
sleep(1)
|
7312
|
+
puts '내용 항목 코드 타겟 33.......'.red
|
7313
|
+
rescue
|
7314
|
+
begin
|
7315
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@frameborder="0"]'))
|
7316
|
+
sleep(1)
|
7317
|
+
@driver.find_element(:xpath, '/html/body').click
|
7318
|
+
sleep(1)
|
7319
|
+
puts '내용 항목 코드 타겟 34.......'.red
|
7320
|
+
rescue
|
7321
|
+
begin
|
7322
|
+
@driver.find_element(:xpath, '//*[@class="b_textarea"]').click
|
7323
|
+
puts '내용 항목 코드 타겟 35.......'.red
|
7324
|
+
rescue
|
7325
|
+
begin
|
7326
|
+
@driver.find_element(:xpath, '/html/body/div[1]/div[2]/div/div/section/form/div[4]/div/textarea').click
|
7327
|
+
sleep(1)
|
7328
|
+
puts '내용 항목 코드 타겟 36.......'.red
|
7329
|
+
rescue
|
7330
|
+
begin
|
7331
|
+
@driver.find_element(:xpath, '//textarea[@name="comment"]').click
|
7332
|
+
sleep(1)
|
7333
|
+
puts '내용 항목 코드 타겟 37.......'.red
|
7334
|
+
rescue
|
7335
|
+
begin
|
7336
|
+
@driver.find_element(:xpath, '//*[@class="CodeMirror-lines"]').click
|
7337
|
+
sleep(1)
|
7338
|
+
puts '내용 항목 코드 타겟 38.......'.red
|
7339
|
+
rescue
|
7340
|
+
begin
|
7341
|
+
@driver.find_element(:xpath, '//textarea[@id="kboard_content"]').click
|
7342
|
+
sleep(1)
|
7343
|
+
puts '내용 항목 코드 타겟 39.......'.red
|
7344
|
+
rescue
|
7345
|
+
begin
|
7346
|
+
@driver.find_element(:xpath, '//textarea[@class="editor-textarea "]').click
|
7347
|
+
sleep(1)
|
7348
|
+
puts '내용 항목 코드 타겟 40.......'.red
|
7349
|
+
rescue
|
7350
|
+
begin
|
7351
|
+
@driver.find_element(:xpath, '//textarea[@name="kboard_content"]').click
|
7352
|
+
sleep(1)
|
7353
|
+
puts '내용 항목 코드 타겟 41.......'.red
|
7354
|
+
rescue
|
7355
|
+
begin
|
7356
|
+
@driver.find_element(:xpath, '//*[@class="kboard-attr-row kboard-attr-content required"]').click
|
7357
|
+
sleep(1)
|
7358
|
+
puts '내용 항목 코드 타겟 42.......'.red
|
7359
|
+
rescue
|
7360
|
+
begin
|
7361
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="NamoSE_Ifr__editor"]'))
|
7362
|
+
@driver.find_element(:xpath, '//*[@class="hide-vertical-guideline ruler-hidden"]').click
|
7363
|
+
sleep(1)
|
7364
|
+
@driver.switch_to.default_content
|
7365
|
+
puts '내용 항목 코드 타겟 43.......'.red
|
7366
|
+
rescue
|
7367
|
+
begin
|
7368
|
+
@driver.find_element(:xpath, '//*[@placeholder="내용"]').click
|
7369
|
+
sleep(1)
|
7370
|
+
puts '내용 항목 코드 타겟 44.......'.red
|
7371
|
+
rescue
|
7372
|
+
begin
|
7373
|
+
@driver.find_element(:xpath, '//*[@align="center"]').click
|
7374
|
+
sleep(1)
|
7375
|
+
puts '내용 항목 코드 타겟 45.......'.red
|
7376
|
+
rescue
|
7377
|
+
begin
|
7378
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
7379
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집 모드"]').click
|
7380
|
+
sleep(1)
|
7381
|
+
@driver.switch_to.default_content
|
7382
|
+
puts '내용 항목 코드 타겟 46.......'.red
|
7383
|
+
rescue
|
7384
|
+
begin
|
7385
|
+
@driver.find_element(:xpath, '//*[@name="board_body"]').click
|
7386
|
+
sleep(1)
|
7387
|
+
puts '내용 항목 코드 타겟 47.......'.red
|
7388
|
+
rescue
|
7389
|
+
begin
|
7390
|
+
@driver.find_element(:xpath, '//textarea[@id="wr_content"]').click
|
7391
|
+
sleep(1)
|
7392
|
+
puts '내용 항목 코드 타겟 48.......'.red
|
7393
|
+
rescue
|
7394
|
+
begin
|
7395
|
+
textarea = @driver.find_element(:id, 'kboard_content')
|
7396
|
+
@driver.execute_script("arguments[0].scrollIntoView(true);", textarea)
|
7397
|
+
@driver.find_element(:id, 'kboard_content').click
|
7398
|
+
puts '내용 항목 코드 타겟 49.......'.red
|
7399
|
+
rescue
|
7400
|
+
end
|
7401
|
+
end
|
7402
|
+
end
|
7403
|
+
end
|
7404
|
+
end
|
7405
|
+
end
|
7406
|
+
end
|
7407
|
+
end
|
7408
|
+
end
|
7409
|
+
end
|
7410
|
+
end
|
7411
|
+
end
|
7412
|
+
end
|
7413
|
+
end
|
7414
|
+
end
|
7415
|
+
end
|
7416
|
+
end
|
7417
|
+
end
|
7418
|
+
end
|
7419
|
+
end
|
7420
|
+
end
|
7421
|
+
end
|
7422
|
+
end
|
7423
|
+
end
|
7424
|
+
end
|
7425
|
+
end
|
7426
|
+
end
|
7427
|
+
end
|
7428
|
+
end
|
7429
|
+
end
|
7430
|
+
end
|
7431
|
+
end
|
7432
|
+
end
|
7433
|
+
end
|
7434
|
+
end
|
7435
|
+
end
|
7436
|
+
end
|
7437
|
+
end
|
7438
|
+
end
|
7439
|
+
end
|
7440
|
+
end
|
7441
|
+
end
|
7442
|
+
end
|
7443
|
+
end
|
7444
|
+
end
|
7445
|
+
end
|
7446
|
+
end
|
7447
|
+
end
|
7448
|
+
end
|
7449
|
+
end
|
7450
|
+
|
7451
|
+
|
7289
7452
|
end
|
7290
7453
|
sleep(1)
|
7291
7454
|
|
@@ -7320,9 +7483,10 @@ Clipboard.copy(content)
|
|
7320
7483
|
#내용 입력<<─────────────────────────────────────────────────────────────────────
|
7321
7484
|
|
7322
7485
|
|
7323
|
-
|
7324
|
-
|
7325
|
-
|
7486
|
+
begin
|
7487
|
+
@driver.execute_script("document.body.insertAdjacentHTML('beforeend', arguments[0]);", original_html)
|
7488
|
+
rescue
|
7489
|
+
end
|
7326
7490
|
|
7327
7491
|
if option['내용사진자동삽입'] == 'true'
|
7328
7492
|
begin
|
@@ -8275,15 +8439,30 @@ if option['내용사진자동삽입'] == 'true'
|
|
8275
8439
|
else
|
8276
8440
|
end
|
8277
8441
|
sleep(1)
|
8278
|
-
|
8279
|
-
|
8280
|
-
|
8281
8442
|
end
|
8282
8443
|
|
8444
|
+
#없어도 되는 캡챠 삭제
|
8445
|
+
begin
|
8446
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="mb_main_tr_kcaptcha_img"]')
|
8447
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
8448
|
+
sleep(1)
|
8449
|
+
rescue
|
8450
|
+
begin
|
8451
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="mb_ggong_tr_kcaptcha_img"]')
|
8452
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
8453
|
+
sleep(1)
|
8454
|
+
rescue
|
8455
|
+
begin
|
8456
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="mb_freemoney_tr_kcaptcha_img"]')
|
8457
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
8458
|
+
sleep(1)
|
8459
|
+
rescue
|
8460
|
+
end
|
8461
|
+
end
|
8462
|
+
end
|
8283
8463
|
|
8284
8464
|
|
8285
8465
|
begin
|
8286
|
-
|
8287
8466
|
@driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]')
|
8288
8467
|
check_captcha = 1
|
8289
8468
|
|
@@ -8350,7 +8529,7 @@ if check_captcha == 1
|
|
8350
8529
|
@driver.find_element(:xpath, '//*[@name="user_captcha"]').click
|
8351
8530
|
sleep(1)
|
8352
8531
|
@driver.action.key_down(:right).key_up(:right).perform
|
8353
|
-
|
8532
|
+
rescuem
|
8354
8533
|
begin
|
8355
8534
|
@driver.find_element(:xpath, '//*[@id="user_captcha"]').click
|
8356
8535
|
sleep(1)
|
@@ -8839,6 +9018,10 @@ if check_captcha == 0
|
|
8839
9018
|
end
|
8840
9019
|
|
8841
9020
|
sleep(1)
|
9021
|
+
begin
|
9022
|
+
@driver.switch_to.default_content()
|
9023
|
+
rescue
|
9024
|
+
end
|
8842
9025
|
|
8843
9026
|
puts '-[√] 캡챠 입력 항목 탐색.......'.green
|
8844
9027
|
begin
|
@@ -8875,7 +9058,13 @@ if check_captcha == 0
|
|
8875
9058
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
8876
9059
|
end
|
8877
9060
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
8878
|
-
|
9061
|
+
|
9062
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9063
|
+
sleep(2)
|
9064
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9065
|
+
sleep(2)
|
9066
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9067
|
+
sleep(1)
|
8879
9068
|
rescue
|
8880
9069
|
begin
|
8881
9070
|
@driver.find_element(:xpath, '//*[@id="captcha_key"]').click
|
@@ -8911,7 +9100,13 @@ if check_captcha == 0
|
|
8911
9100
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
8912
9101
|
end
|
8913
9102
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
8914
|
-
|
9103
|
+
|
9104
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9105
|
+
sleep(2)
|
9106
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9107
|
+
sleep(2)
|
9108
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9109
|
+
sleep(1)
|
8915
9110
|
rescue
|
8916
9111
|
begin
|
8917
9112
|
@driver.find_element(:xpath, '=//*[@id="code"]').click
|
@@ -8947,7 +9142,13 @@ if check_captcha == 0
|
|
8947
9142
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
8948
9143
|
end
|
8949
9144
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
8950
|
-
|
9145
|
+
|
9146
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9147
|
+
sleep(2)
|
9148
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9149
|
+
sleep(2)
|
9150
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9151
|
+
sleep(1)
|
8951
9152
|
rescue
|
8952
9153
|
begin
|
8953
9154
|
@driver.find_element(:xpath, '//*[@id="kboard-input-captcha"]').click
|
@@ -8983,7 +9184,13 @@ if check_captcha == 0
|
|
8983
9184
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
8984
9185
|
end
|
8985
9186
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
8986
|
-
|
9187
|
+
|
9188
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9189
|
+
sleep(2)
|
9190
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9191
|
+
sleep(2)
|
9192
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9193
|
+
sleep(1)
|
8987
9194
|
rescue
|
8988
9195
|
begin
|
8989
9196
|
@driver.find_element(:xpath, '//*[@fw-label="보안문자"]').click
|
@@ -9019,7 +9226,13 @@ if check_captcha == 0
|
|
9019
9226
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9020
9227
|
end
|
9021
9228
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9022
|
-
|
9229
|
+
|
9230
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9231
|
+
sleep(2)
|
9232
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9233
|
+
sleep(2)
|
9234
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9235
|
+
sleep(1)
|
9023
9236
|
rescue
|
9024
9237
|
begin
|
9025
9238
|
@driver.find_element(:xpath, '//*[@name="captcha"]').click
|
@@ -9054,7 +9267,13 @@ if check_captcha == 0
|
|
9054
9267
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9055
9268
|
end
|
9056
9269
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9057
|
-
|
9270
|
+
|
9271
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9272
|
+
sleep(2)
|
9273
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9274
|
+
sleep(2)
|
9275
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9276
|
+
sleep(1)
|
9058
9277
|
rescue
|
9059
9278
|
begin
|
9060
9279
|
@driver.find_element(:xpath, '//*[@id="spamCode"]').click
|
@@ -9089,7 +9308,13 @@ if check_captcha == 0
|
|
9089
9308
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9090
9309
|
end
|
9091
9310
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9092
|
-
|
9311
|
+
|
9312
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9313
|
+
sleep(2)
|
9314
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9315
|
+
sleep(2)
|
9316
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9317
|
+
sleep(1)
|
9093
9318
|
rescue
|
9094
9319
|
begin
|
9095
9320
|
@driver.find_element(:xpath, '//*[@id="norobot_code"]').click
|
@@ -9124,11 +9349,16 @@ if check_captcha == 0
|
|
9124
9349
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9125
9350
|
end
|
9126
9351
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9127
|
-
|
9352
|
+
|
9353
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9354
|
+
sleep(2)
|
9355
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9356
|
+
sleep(2)
|
9357
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9358
|
+
sleep(1)
|
9128
9359
|
rescue
|
9129
9360
|
begin
|
9130
|
-
|
9131
|
-
sleep(1)
|
9361
|
+
|
9132
9362
|
@driver.find_element(:xpath, '//*[@name="kcaptcha_code"]').click
|
9133
9363
|
|
9134
9364
|
sleep(1)
|
@@ -9162,11 +9392,16 @@ if check_captcha == 0
|
|
9162
9392
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9163
9393
|
end
|
9164
9394
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9395
|
+
|
9396
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9397
|
+
sleep(2)
|
9398
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9399
|
+
sleep(2)
|
9400
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9165
9401
|
sleep(1)
|
9166
9402
|
rescue
|
9167
9403
|
begin
|
9168
|
-
|
9169
|
-
sleep(1)
|
9404
|
+
|
9170
9405
|
@driver.find_element(:xpath, '//*[@title="자동글쓰기방지"]').click
|
9171
9406
|
|
9172
9407
|
sleep(1)
|
@@ -9200,11 +9435,16 @@ if check_captcha == 0
|
|
9200
9435
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9201
9436
|
end
|
9202
9437
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9438
|
+
|
9439
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9440
|
+
sleep(2)
|
9441
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9442
|
+
sleep(2)
|
9443
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9203
9444
|
sleep(1)
|
9204
9445
|
rescue
|
9205
9446
|
begin
|
9206
|
-
|
9207
|
-
sleep(1)
|
9447
|
+
|
9208
9448
|
@driver.find_element(:xpath, '//*[@id="user_captcha"]').click
|
9209
9449
|
|
9210
9450
|
sleep(1)
|
@@ -9238,11 +9478,16 @@ if check_captcha == 0
|
|
9238
9478
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9239
9479
|
end
|
9240
9480
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9481
|
+
|
9482
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9483
|
+
sleep(2)
|
9484
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9485
|
+
sleep(2)
|
9486
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9241
9487
|
sleep(1)
|
9242
9488
|
rescue
|
9243
9489
|
begin
|
9244
|
-
|
9245
|
-
sleep(1)
|
9490
|
+
|
9246
9491
|
@driver.find_element(:xpath, '//*[@itemname="자동등록방지"]').click
|
9247
9492
|
|
9248
9493
|
sleep(1)
|
@@ -9276,11 +9521,16 @@ if check_captcha == 0
|
|
9276
9521
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9277
9522
|
end
|
9278
9523
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9524
|
+
|
9525
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9526
|
+
sleep(2)
|
9527
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9528
|
+
sleep(2)
|
9529
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9279
9530
|
sleep(1)
|
9280
9531
|
rescue
|
9281
9532
|
begin
|
9282
|
-
|
9283
|
-
sleep(1)
|
9533
|
+
|
9284
9534
|
@driver.find_element(:xpath, '//*[@name="wr_key"]').click
|
9285
9535
|
|
9286
9536
|
sleep(1)
|
@@ -9314,11 +9564,16 @@ if check_captcha == 0
|
|
9314
9564
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9315
9565
|
end
|
9316
9566
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9567
|
+
|
9568
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9569
|
+
sleep(2)
|
9570
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9571
|
+
sleep(2)
|
9572
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9317
9573
|
sleep(1)
|
9318
9574
|
rescue
|
9319
9575
|
begin
|
9320
|
-
|
9321
|
-
sleep(1)
|
9576
|
+
|
9322
9577
|
@driver.find_element(:xpath, '//*[@title="자동등록방지"]').click
|
9323
9578
|
|
9324
9579
|
sleep(1)
|
@@ -9352,11 +9607,16 @@ if check_captcha == 0
|
|
9352
9607
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9353
9608
|
end
|
9354
9609
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9610
|
+
|
9611
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9612
|
+
sleep(2)
|
9613
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9614
|
+
sleep(2)
|
9615
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9355
9616
|
sleep(1)
|
9356
9617
|
rescue
|
9357
9618
|
begin
|
9358
|
-
|
9359
|
-
sleep(1)
|
9619
|
+
|
9360
9620
|
@driver.find_element(:xpath, '//input[@name="kcaptcha_img"]').click
|
9361
9621
|
|
9362
9622
|
sleep(1)
|
@@ -9390,11 +9650,16 @@ if check_captcha == 0
|
|
9390
9650
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9391
9651
|
end
|
9392
9652
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9653
|
+
|
9654
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9655
|
+
sleep(2)
|
9656
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9657
|
+
sleep(2)
|
9658
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9393
9659
|
sleep(1)
|
9394
9660
|
rescue
|
9395
9661
|
begin
|
9396
|
-
|
9397
|
-
sleep(1)
|
9662
|
+
|
9398
9663
|
@driver.find_element(:xpath, '//*[@id="zsfCode"]').click
|
9399
9664
|
|
9400
9665
|
sleep(1)
|
@@ -9428,11 +9693,16 @@ if check_captcha == 0
|
|
9428
9693
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9429
9694
|
end
|
9430
9695
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9431
|
-
|
9696
|
+
|
9697
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9698
|
+
sleep(2)
|
9699
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9700
|
+
sleep(2)
|
9701
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9702
|
+
sleep(1)
|
9432
9703
|
rescue
|
9433
9704
|
begin
|
9434
|
-
|
9435
|
-
sleep(1)
|
9705
|
+
|
9436
9706
|
@driver.find_element(:xpath, '//*[@name="spamCode"]').click
|
9437
9707
|
sleep(1)
|
9438
9708
|
|
@@ -9465,11 +9735,16 @@ if check_captcha == 0
|
|
9465
9735
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9466
9736
|
end
|
9467
9737
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9738
|
+
|
9739
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9740
|
+
sleep(2)
|
9741
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9742
|
+
sleep(2)
|
9743
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9468
9744
|
sleep(1)
|
9469
9745
|
rescue
|
9470
9746
|
begin
|
9471
|
-
|
9472
|
-
sleep(1)
|
9747
|
+
|
9473
9748
|
@driver.find_element(:xpath, '//*[@for="spamCode"]').click
|
9474
9749
|
sleep(1)
|
9475
9750
|
|
@@ -9502,11 +9777,16 @@ if check_captcha == 0
|
|
9502
9777
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9503
9778
|
end
|
9504
9779
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9780
|
+
|
9781
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9782
|
+
sleep(2)
|
9783
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9784
|
+
sleep(2)
|
9785
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9505
9786
|
sleep(1)
|
9506
9787
|
rescue
|
9507
9788
|
begin
|
9508
|
-
|
9509
|
-
sleep(1)
|
9789
|
+
|
9510
9790
|
@driver.find_element(:xpath, '//*[@name="autoWriteProtect"]').click
|
9511
9791
|
sleep(1)
|
9512
9792
|
|
@@ -9539,11 +9819,16 @@ if check_captcha == 0
|
|
9539
9819
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9540
9820
|
end
|
9541
9821
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9822
|
+
|
9823
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9824
|
+
sleep(2)
|
9825
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9826
|
+
sleep(2)
|
9827
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9542
9828
|
sleep(1)
|
9543
9829
|
rescue
|
9544
9830
|
begin
|
9545
|
-
|
9546
|
-
sleep(1)
|
9831
|
+
|
9547
9832
|
@driver.find_element(:xpath, '//input[@name="vcode" and @id="vcode"]').click
|
9548
9833
|
sleep(1)
|
9549
9834
|
el2 = @driver.find_element(:xpath, '//input[@name="vcode" and @id="vcode"]')
|
@@ -9575,11 +9860,16 @@ if check_captcha == 0
|
|
9575
9860
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9576
9861
|
end
|
9577
9862
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9863
|
+
|
9864
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9865
|
+
sleep(2)
|
9866
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9867
|
+
sleep(2)
|
9868
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9578
9869
|
sleep(1)
|
9579
9870
|
rescue
|
9580
9871
|
begin
|
9581
|
-
|
9582
|
-
sleep(1)
|
9872
|
+
|
9583
9873
|
@driver.find_element(:xpath, '//*[@name="ltm_code"]').click
|
9584
9874
|
sleep(1)
|
9585
9875
|
el2 = @driver.find_element(:xpath, '//*[@name="ltm_code"]')
|
@@ -9611,11 +9901,16 @@ if check_captcha == 0
|
|
9611
9901
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9612
9902
|
end
|
9613
9903
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9614
|
-
|
9904
|
+
|
9905
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9906
|
+
sleep(2)
|
9907
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9908
|
+
sleep(2)
|
9909
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9910
|
+
sleep(1)
|
9615
9911
|
rescue
|
9616
9912
|
begin
|
9617
|
-
|
9618
|
-
sleep(1)
|
9913
|
+
|
9619
9914
|
@driver.find_element(:xpath, '//*[@id="spamcode_chk"]').click
|
9620
9915
|
sleep(1)
|
9621
9916
|
el2 = @driver.find_element(:xpath, '//*[@id="spamcode_chk"]')
|
@@ -9647,7 +9942,13 @@ if check_captcha == 0
|
|
9647
9942
|
wait.until { @driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]') }
|
9648
9943
|
end
|
9649
9944
|
puts '-[√] 캡챠 코드 타겟 완료2.......'.blue
|
9650
|
-
|
9945
|
+
|
9946
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9947
|
+
sleep(2)
|
9948
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9949
|
+
sleep(2)
|
9950
|
+
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9951
|
+
sleep(1)
|
9651
9952
|
rescue
|
9652
9953
|
|
9653
9954
|
end
|
@@ -9678,12 +9979,7 @@ if check_captcha == 0
|
|
9678
9979
|
sleep(1)
|
9679
9980
|
##캡챠 해제 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
9680
9981
|
begin
|
9681
|
-
|
9682
|
-
sleep(2)
|
9683
|
-
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9684
|
-
sleep(2)
|
9685
|
-
puts '-[√] 캡챠 해제 가능 유무 확인.......'.green
|
9686
|
-
sleep(1)
|
9982
|
+
|
9687
9983
|
# 타임아웃을 3초로 설정
|
9688
9984
|
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
9689
9985
|
# 요소가 나타날 때까지 30초 동안 기다립니다.
|
@@ -9814,7 +10110,6 @@ sleep(1)
|
|
9814
10110
|
|
9815
10111
|
|
9816
10112
|
|
9817
|
-
|
9818
10113
|
##등록 버튼 코드 부분─────────────────────────────────────────────────────────────────────>
|
9819
10114
|
|
9820
10115
|
begin
|
@@ -9848,685 +10143,760 @@ rescue
|
|
9848
10143
|
end
|
9849
10144
|
|
9850
10145
|
|
9851
|
-
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
9852
10146
|
|
9853
|
-
|
10147
|
+
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
10148
|
+
|
10149
|
+
#@driver.execute_script("document.body.style.zoom = '0.70'")
|
10150
|
+
sleep(1)
|
10151
|
+
##등록 버튼 코드 부분─────────────────────────────────────────────────────────────────────>
|
10152
|
+
puts '-[√] 내용 등록 버튼 탐색 시작.......'.yellow
|
10153
|
+
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 ▼▼▼▼▼▼▼──────────────────────────────#######
|
10154
|
+
begin
|
10155
|
+
ss_button = @driver.find_element(:xpath, '//*[@value="등록"]')
|
10156
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10157
|
+
sleep(1)
|
10158
|
+
|
10159
|
+
@driver.find_element(:xpath, '//*[@value="등록"]').click
|
10160
|
+
puts '-[√] 등록을 1번 코드로 시도하였습니다.......'.magenta
|
10161
|
+
sleep(1)
|
10162
|
+
rescue
|
10163
|
+
begin
|
10164
|
+
ss_button = @driver.find_element(:xpath, '//*[@alt="등록"]')
|
10165
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10166
|
+
sleep(1)
|
10167
|
+
|
10168
|
+
@driver.find_element(:xpath, '//*[@alt="등록"]').click
|
10169
|
+
puts '-[√] 등록을 2번 코드로 시도하였습니다.......'.magenta
|
10170
|
+
sleep(1)
|
10171
|
+
rescue
|
10172
|
+
begin
|
10173
|
+
ss_button = @driver.find_element(:xpath, '//*[@value="작성완료"]')
|
10174
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10175
|
+
sleep(1)
|
10176
|
+
|
10177
|
+
@driver.find_element(:xpath, '//*[@value="작성완료"]').click
|
10178
|
+
puts '-[√] 등록을 3번 코드로 시도하였습니다.......'.magenta
|
10179
|
+
sleep(1)
|
10180
|
+
rescue
|
10181
|
+
begin
|
10182
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="btn_submit"]')
|
10183
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10184
|
+
sleep(1)
|
10185
|
+
@driver.find_element(:xpath, '//*[@id="btn_submit"]').click
|
10186
|
+
puts '-[√] 등록을 4번 코드로 시도하였습니다.......'.magenta
|
10187
|
+
sleep(1)
|
10188
|
+
rescue
|
10189
|
+
begin
|
10190
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]')
|
10191
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10192
|
+
sleep(1)
|
10193
|
+
|
10194
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]').click
|
10195
|
+
puts '-[√] 등록을 5번 코드로 시도하였습니다.......'.magenta
|
10196
|
+
sleep(1)
|
10197
|
+
rescue
|
10198
|
+
begin
|
10199
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]')
|
10200
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10201
|
+
sleep(1)
|
10202
|
+
|
10203
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]').click
|
10204
|
+
puts '-[√] 등록을 6번 코드로 시도하였습니다.......'.magenta
|
10205
|
+
sleep(1)
|
10206
|
+
rescue
|
10207
|
+
begin
|
10208
|
+
ss_button = @driver.find_element(:xpath, '//*[@title="확인"]')
|
10209
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10210
|
+
sleep(1)
|
10211
|
+
|
10212
|
+
@driver.find_element(:xpath, '//*[@title="확인"]').click
|
10213
|
+
puts '-[√] 등록을 7번 코드로 시도하였습니다.......'.magenta
|
10214
|
+
sleep(1)
|
10215
|
+
rescue
|
10216
|
+
begin
|
10217
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="btnSubmit"]')
|
10218
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10219
|
+
sleep(1)
|
10220
|
+
|
10221
|
+
@driver.find_element(:xpath, '//*[@id="btnSubmit"]').click
|
10222
|
+
puts '-[√] 등록을 8번 코드로 시도하였습니다.......'.magenta
|
10223
|
+
sleep(1)
|
10224
|
+
rescue
|
10225
|
+
begin
|
10226
|
+
ss_button = @driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]')
|
10227
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10228
|
+
sleep(1)
|
10229
|
+
|
10230
|
+
@driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]').click
|
10231
|
+
puts '-[√] 등록을 9번 코드로 시도하였습니다.......'.magenta
|
10232
|
+
sleep(1)
|
10233
|
+
rescue
|
10234
|
+
begin
|
10235
|
+
ss_button = @driver.find_element(:xpath, '//input[@type="submit" and @value="확인"]')
|
10236
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10237
|
+
sleep(1)
|
10238
|
+
|
10239
|
+
@driver.find_element(:xpath, '//input[@type="submit" and @value="확인"]').click
|
10240
|
+
puts '-[√] 등록을 10번 코드로 시도하였습니다.......'.magenta
|
10241
|
+
sleep(1)
|
10242
|
+
rescue
|
10243
|
+
begin
|
10244
|
+
ss_button = @driver.find_element(:partial_link_text, '작성완료')
|
10245
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10246
|
+
sleep(1)
|
10247
|
+
|
10248
|
+
@driver.find_element(:partial_link_text, '작성완료').click#요소같고 텍스트가 다를때 텍스트로 타겟
|
10249
|
+
puts '-[√] 등록을 11번 코드로 시도하였습니다.......'.magenta
|
10250
|
+
sleep(1)
|
10251
|
+
rescue
|
10252
|
+
begin
|
10253
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]')
|
10254
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10255
|
+
sleep(1)
|
10256
|
+
|
10257
|
+
@driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]').click
|
10258
|
+
puts '-[√] 등록을 12번 코드로 시도하였습니다.......'.magenta
|
10259
|
+
sleep(1)
|
10260
|
+
rescue
|
10261
|
+
begin
|
10262
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="main_btn_box"]/button')
|
10263
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10264
|
+
sleep(1)
|
10265
|
+
|
10266
|
+
@driver.find_element(:xpath, '//*[@id="main_btn_box"]/button').click
|
10267
|
+
puts '-[√] 등록을 13번 코드로 시도하였습니다.......'.magenta
|
10268
|
+
sleep(1)
|
10269
|
+
rescue
|
10270
|
+
begin
|
10271
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="bttnComplete1"]')
|
10272
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10273
|
+
sleep(1)
|
10274
|
+
|
10275
|
+
@driver.find_element(:xpath, '//*[@id="bttnComplete1"]').click
|
10276
|
+
puts '-[√] 등록을 14번 코드로 시도하였습니다.......'.magenta
|
10277
|
+
sleep(1)
|
10278
|
+
rescue
|
10279
|
+
begin
|
10280
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button')
|
10281
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10282
|
+
sleep(1)
|
10283
|
+
|
10284
|
+
@driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button').click
|
10285
|
+
puts '-[√] 등록을 15번 코드로 시도하였습니다.......'.magenta
|
10286
|
+
sleep(1)
|
10287
|
+
rescue
|
10288
|
+
begin
|
10289
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="com_btn"]')
|
10290
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10291
|
+
sleep(1)
|
10292
|
+
|
10293
|
+
@driver.find_element(:xpath, '//*[@id="com_btn"]').click
|
10294
|
+
puts '-[√] 등록을 16번 코드로 시도하였습니다.......'.magenta
|
10295
|
+
sleep(1)
|
10296
|
+
rescue
|
10297
|
+
begin
|
10298
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="submit"]')
|
10299
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10300
|
+
sleep(1)
|
10301
|
+
|
10302
|
+
@driver.find_element(:xpath, '//*[@class="submit"]').click
|
10303
|
+
puts '-[√] 등록을 17번 코드로 시도하였습니다.......'.magenta
|
10304
|
+
sleep(1)
|
10305
|
+
rescue
|
10306
|
+
begin
|
10307
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="savePostInBoard"]')
|
10308
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10309
|
+
sleep(1)
|
10310
|
+
|
10311
|
+
@driver.find_element(:xpath, '//*[@id="savePostInBoard"]').click
|
10312
|
+
puts '-[√] 등록을 18번 코드로 시도하였습니다.......'.magenta
|
10313
|
+
sleep(1)
|
10314
|
+
rescue
|
10315
|
+
begin
|
10316
|
+
ss_button = @driver.find_element(:css, 'button.btn.mx-auto')
|
10317
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10318
|
+
sleep(1)
|
10319
|
+
|
10320
|
+
@driver.find_element(:css, 'button.btn.mx-auto').click
|
10321
|
+
sleep(1)
|
10322
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10323
|
+
puts '-[√] 등록을 19번 코드로 시도하였습니다.......'.magenta
|
10324
|
+
sleep(1)
|
10325
|
+
|
10326
|
+
rescue
|
10327
|
+
begin
|
10328
|
+
ss_button = @driver.find_element(:xpath, '//*[@form="write"]')
|
10329
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10330
|
+
sleep(1)
|
10331
|
+
|
10332
|
+
@driver.find_element(:xpath, '//*[@form="write"]').click
|
10333
|
+
sleep(1)
|
10334
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10335
|
+
puts '-[√] 등록을 19-1번 코드로 시도하였습니다.......'.magenta
|
10336
|
+
sleep(1)
|
10337
|
+
|
10338
|
+
rescue
|
10339
|
+
begin
|
10340
|
+
ss_button = @driver.find_element(:partial_link_text, '저장하기')
|
10341
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10342
|
+
sleep(1)
|
10343
|
+
|
10344
|
+
@driver.find_element(:partial_link_text, '저장하기').click #요소같고 텍스트가 다를때 텍스트로 타겟
|
10345
|
+
puts '-[√] 등록을 20번 코드로 시도하였습니다.......'.magenta
|
10346
|
+
sleep(1)
|
10347
|
+
|
10348
|
+
rescue
|
10349
|
+
begin
|
10350
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]')
|
10351
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10352
|
+
sleep(1)
|
10353
|
+
|
10354
|
+
@driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]').click
|
10355
|
+
puts '-[√] 등록을 21시도하였습니다.......'.magenta
|
10356
|
+
sleep(1)
|
10357
|
+
|
10358
|
+
rescue
|
10359
|
+
begin
|
10360
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btnWrite"]')
|
10361
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10362
|
+
sleep(1)
|
10363
|
+
|
10364
|
+
@driver.find_element(:xpath, '//*[@class="btnWrite"]').click
|
10365
|
+
puts '-[√] 등록을 22시도하였습니다.......'.magenta
|
10366
|
+
sleep(1)
|
10367
|
+
|
10368
|
+
rescue
|
10369
|
+
begin
|
10370
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]')
|
10371
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10372
|
+
sleep(1)
|
10373
|
+
|
10374
|
+
@driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').click
|
10375
|
+
puts '-[√] 등록을 23번 코드로 시도하였습니다.......'.magenta
|
10376
|
+
sleep(1)
|
10377
|
+
|
10378
|
+
rescue
|
10379
|
+
begin
|
10380
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit"]')
|
10381
|
+
if ss_button.attribute("class") == "upload_btn1"
|
10382
|
+
raise
|
10383
|
+
end
|
10384
|
+
|
10385
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10386
|
+
sleep(1)
|
10387
|
+
|
10388
|
+
ss_button.click
|
10389
|
+
puts '-[√] 등록을 24번 코드로 시도하였습니다.......'.magenta
|
10390
|
+
sleep(1)
|
10391
|
+
|
10392
|
+
|
10393
|
+
rescue
|
10394
|
+
begin
|
10395
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button-agree"]')
|
10396
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10397
|
+
sleep(1)
|
10398
|
+
|
10399
|
+
@driver.find_element(:xpath, '//*[@class="button-agree"]').click
|
10400
|
+
puts '-[√] 등록을 25번 코드로 시도하였습니다.......'.magenta
|
10401
|
+
sleep(1)
|
10402
|
+
|
10403
|
+
rescue
|
10404
|
+
begin
|
10405
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]')
|
10406
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10407
|
+
sleep(1)
|
10408
|
+
|
10409
|
+
@driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]').click
|
10410
|
+
puts '-[√] 등록을 26번 코드로 시도하였습니다.......'.magenta
|
10411
|
+
sleep(1)
|
10412
|
+
|
10413
|
+
rescue
|
10414
|
+
begin
|
10415
|
+
ss_button = @driver.find_element(:xpath, "//button[contains(text(), '글쓰기')]")
|
10416
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10417
|
+
sleep(1)
|
10418
|
+
|
10419
|
+
@driver.find_element(:xpath, "//button[contains(text(), '글쓰기')]").click
|
10420
|
+
puts '-[√] 등록을 27번 코드로 시도하였습니다.......'.magenta
|
10421
|
+
sleep(1)
|
10422
|
+
|
10423
|
+
rescue
|
10424
|
+
begin
|
10425
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="Button button-rounded black button-normal"]')
|
10426
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10427
|
+
sleep(1)
|
10428
|
+
|
10429
|
+
@driver.find_element(:xpath, '//*[@class="Button button-rounded black button-normal"]').click
|
10430
|
+
puts '-[√] 등록을 28번 코드로 시도하였습니다.......'.magenta
|
10431
|
+
sleep(1)
|
10432
|
+
|
10433
|
+
rescue
|
10434
|
+
begin
|
10435
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn_point"]')
|
10436
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10437
|
+
sleep(1)
|
10438
|
+
|
10439
|
+
@driver.find_element(:xpath, '//*[@class="btn btn_point"]').click
|
10440
|
+
puts '-[√] 등록을 28번 코드로 시도하였습니다.......'.magenta
|
10441
|
+
sleep(1)
|
10442
|
+
|
10443
|
+
rescue
|
10444
|
+
begin
|
10445
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "save")]')
|
10446
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10447
|
+
sleep(1)
|
10448
|
+
|
10449
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "save")]').click
|
10450
|
+
puts '-[√] 등록을 29번 코드로 시도하였습니다.......'.magenta
|
10451
|
+
sleep(1)
|
10452
|
+
|
10453
|
+
rescue
|
10454
|
+
begin
|
10455
|
+
ss_button = @driver.find_element(:css, 'input[@type="submit" and @value="확인"]')
|
10456
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10457
|
+
sleep(1)
|
10458
|
+
|
10459
|
+
ss_button = @driver.find_element(:css, 'input[@type="submit" and @value="확인"]').click
|
10460
|
+
puts '-[√] 등록을 30번 코드로 시도하였습니다.......'.magenta
|
10461
|
+
sleep(1)
|
10462
|
+
|
10463
|
+
rescue
|
10464
|
+
begin
|
10465
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="button" and @value="작성"]')
|
10466
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10467
|
+
sleep(1)
|
10468
|
+
|
10469
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="button" and @value="작성"]').click
|
10470
|
+
puts '-[√] 등록을 31번 코드로 시도하였습니다.......'.magenta
|
10471
|
+
sleep(1)
|
10472
|
+
|
10473
|
+
rescue
|
10474
|
+
begin
|
10475
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button button-inverse button-small write_ok"]')
|
10476
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10477
|
+
sleep(1)
|
10478
|
+
|
10479
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button button-inverse button-small write_ok"]').click
|
10480
|
+
puts '-[√] 등록을 32번 코드로 시도하였습니다.......'.magenta
|
10481
|
+
sleep(1)
|
10482
|
+
|
10483
|
+
rescue
|
10484
|
+
begin
|
10485
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "btn/send")]')
|
10486
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10487
|
+
sleep(1)
|
10488
|
+
|
10489
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "btn/send")]').click
|
10490
|
+
puts '-[√] 등록을 33번 코드로 시도하였습니다.......'.magenta
|
10491
|
+
sleep(1)
|
10492
|
+
|
10493
|
+
rescue
|
10494
|
+
begin
|
10495
|
+
ss_button = @driver.find_element(:xpath, '//input[@name="formimage1"]')
|
10496
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9854
10497
|
sleep(1)
|
9855
|
-
|
9856
|
-
|
9857
|
-
|
10498
|
+
|
10499
|
+
ss_button = @driver.find_element(:xpath, '//input[@name="formimage1"]').click
|
10500
|
+
puts '-[√] 등록을 34번 코드로 시도하였습니다.......'.magenta
|
10501
|
+
sleep(1)
|
10502
|
+
|
10503
|
+
rescue
|
9858
10504
|
begin
|
9859
|
-
|
9860
|
-
|
9861
|
-
|
9862
|
-
|
9863
|
-
@driver.find_element(:xpath, '//*[@value="등록"]').click
|
9864
|
-
puts '-[√] 등록을 1번 코드로 시도하였습니다.......'.magenta
|
9865
|
-
sleep(5)
|
9866
|
-
rescue
|
9867
|
-
begin
|
9868
|
-
ss_button = @driver.find_element(:xpath, '//*[@alt="등록"]')
|
9869
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9870
|
-
sleep(1)
|
10505
|
+
ss_button = @driver.find_element(:xpath, '//button[@type="button" and @class="btnSubmit"]')
|
10506
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10507
|
+
sleep(1)
|
9871
10508
|
|
9872
|
-
|
9873
|
-
|
9874
|
-
|
9875
|
-
rescue
|
9876
|
-
begin
|
9877
|
-
ss_button = @driver.find_element(:xpath, '//*[@value="작성완료"]')
|
9878
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9879
|
-
sleep(1)
|
10509
|
+
ss_button = @driver.find_element(:xpath, '//button[@type="button" and @class="btnSubmit"]').click
|
10510
|
+
puts '-[√] 등록을 35번 코드로 시도하였습니다.......'.magenta
|
10511
|
+
sleep(1)
|
9880
10512
|
|
9881
|
-
|
9882
|
-
|
9883
|
-
|
9884
|
-
|
9885
|
-
|
9886
|
-
ss_button = @driver.find_element(:xpath, '//*[@id="btn_submit"]')
|
9887
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9888
|
-
sleep(1)
|
9889
|
-
@driver.find_element(:xpath, '//*[@id="btn_submit"]').click
|
9890
|
-
puts '-[√] 등록을 4번 코드로 시도하였습니다.......'.magenta
|
9891
|
-
sleep(5)
|
9892
|
-
rescue
|
9893
|
-
begin
|
9894
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]')
|
9895
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9896
|
-
sleep(1)
|
10513
|
+
rescue
|
10514
|
+
begin
|
10515
|
+
ss_button = @driver.find_element(:xpath, '//input[@type="button" and @value="전송"]')
|
10516
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10517
|
+
sleep(1)
|
9897
10518
|
|
9898
|
-
|
9899
|
-
|
9900
|
-
|
9901
|
-
rescue
|
9902
|
-
begin
|
9903
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]')
|
9904
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9905
|
-
sleep(1)
|
10519
|
+
ss_button = @driver.find_element(:xpath, '//input[@type="button" and @value="전송"]').click
|
10520
|
+
puts '-[√] 등록을 36번 코드로 시도하였습니다.......'.magenta
|
10521
|
+
sleep(1)
|
9906
10522
|
|
9907
|
-
|
9908
|
-
|
9909
|
-
|
9910
|
-
|
9911
|
-
|
9912
|
-
ss_button = @driver.find_element(:xpath, '//*[@title="확인"]')
|
9913
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9914
|
-
sleep(1)
|
10523
|
+
rescue
|
10524
|
+
begin
|
10525
|
+
ss_button = @driver.find_element(css: 'ul.bt_type li a.bt_type4_w_4')
|
10526
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10527
|
+
sleep(1)
|
9915
10528
|
|
9916
|
-
|
9917
|
-
|
9918
|
-
|
9919
|
-
rescue
|
9920
|
-
begin
|
9921
|
-
ss_button = @driver.find_element(:xpath, '//*[@id="btnSubmit"]')
|
9922
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9923
|
-
sleep(1)
|
10529
|
+
ss_button = @driver.find_element(css: 'ul.bt_type li a.bt_type4_w_4').click
|
10530
|
+
puts '-[√] 등록을 36번 코드로 시도하였습니다.......'.magenta
|
10531
|
+
sleep(1)
|
9924
10532
|
|
9925
|
-
|
9926
|
-
|
9927
|
-
|
9928
|
-
|
9929
|
-
|
9930
|
-
ss_button = @driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]')
|
9931
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9932
|
-
sleep(1)
|
10533
|
+
rescue
|
10534
|
+
begin
|
10535
|
+
ss_button = @driver.find_element(id: 'btn-write')
|
10536
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10537
|
+
sleep(1)
|
9933
10538
|
|
9934
|
-
|
9935
|
-
|
9936
|
-
|
9937
|
-
rescue
|
9938
|
-
begin
|
9939
|
-
ss_button = @driver.find_element(:xpath, '//input[@type="submit" and @value="확인"]')
|
9940
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9941
|
-
sleep(1)
|
9942
|
-
|
9943
|
-
@driver.find_element(:xpath, '//input[@type="submit" and @value="확인"]').click
|
9944
|
-
puts '-[√] 등록을 10번 코드로 시도하였습니다.......'.magenta
|
9945
|
-
sleep(5)
|
9946
|
-
rescue
|
9947
|
-
begin
|
9948
|
-
ss_button = @driver.find_element(:partial_link_text, '작성완료')
|
9949
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9950
|
-
sleep(1)
|
10539
|
+
ss_button = @driver.find_element(id: 'btn-write').click
|
10540
|
+
puts '-[√] 등록을 37번 코드로 시도하였습니다.......'.magenta
|
10541
|
+
sleep(1)
|
9951
10542
|
|
9952
|
-
|
9953
|
-
|
9954
|
-
|
9955
|
-
|
9956
|
-
|
9957
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]')
|
9958
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9959
|
-
sleep(1)
|
10543
|
+
rescue
|
10544
|
+
begin
|
10545
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "img/btn_confirm.gif")]')
|
10546
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10547
|
+
sleep(1)
|
9960
10548
|
|
9961
|
-
|
9962
|
-
|
9963
|
-
|
9964
|
-
rescue
|
9965
|
-
begin
|
9966
|
-
ss_button = @driver.find_element(:xpath, '//*[@id="main_btn_box"]/button')
|
9967
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9968
|
-
sleep(1)
|
10549
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "img/btn_confirm.gif")]').click
|
10550
|
+
puts '-[√] 등록을 38번 코드로 시도하였습니다.......'.magenta
|
10551
|
+
sleep(1)
|
9969
10552
|
|
9970
|
-
|
9971
|
-
|
9972
|
-
|
9973
|
-
|
9974
|
-
|
9975
|
-
ss_button = @driver.find_element(:xpath, '//*[@id="bttnComplete1"]')
|
9976
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9977
|
-
sleep(1)
|
10553
|
+
rescue
|
10554
|
+
begin
|
10555
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn2_1"]')
|
10556
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10557
|
+
sleep(1)
|
9978
10558
|
|
9979
|
-
|
9980
|
-
|
9981
|
-
|
9982
|
-
rescue
|
9983
|
-
begin
|
9984
|
-
ss_button = @driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button')
|
9985
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
9986
|
-
sleep(1)
|
10559
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn2_1"]').click
|
10560
|
+
puts '-[√] 등록을 39번 코드로 시도하였습니다.......'.magenta
|
10561
|
+
sleep(1)
|
9987
10562
|
|
9988
|
-
|
9989
|
-
|
9990
|
-
|
9991
|
-
|
9992
|
-
|
9993
|
-
|
9994
|
-
|
9995
|
-
|
9996
|
-
|
9997
|
-
|
9998
|
-
|
9999
|
-
|
10000
|
-
|
10001
|
-
|
10002
|
-
|
10003
|
-
|
10004
|
-
|
10563
|
+
rescue
|
10564
|
+
begin
|
10565
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="pro-btn large _write"]')
|
10566
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10567
|
+
sleep(1)
|
10568
|
+
|
10569
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="pro-btn large _write"]').click
|
10570
|
+
puts '-[√] 등록을 39번 코드로 시도하였습니다.......'.magenta
|
10571
|
+
sleep(1)
|
10572
|
+
|
10573
|
+
rescue
|
10574
|
+
begin
|
10575
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit" and @name="save" and @value="저장"]')
|
10576
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10577
|
+
sleep(1)
|
10578
|
+
|
10579
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit" and @name="save" and @value="저장"]').click
|
10580
|
+
puts '-[√] 등록을 40번 코드로 시도하였습니다.......'.magenta
|
10581
|
+
sleep(1)
|
10582
|
+
|
10583
|
+
rescue
|
10584
|
+
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
|
10585
|
+
begin
|
10586
|
+
puts '-[√] 등록 버튼 코드 탐색에 실패하였습니다.......'.magenta
|
10587
|
+
puts '-[√] 다른 방법으로 등록을 시도 합니다.......'.magenta
|
10588
|
+
|
10589
|
+
sleep(1)
|
10590
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys()
|
10591
|
+
sleep(1)
|
10592
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').click
|
10593
|
+
sleep(1)
|
10594
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10595
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10596
|
+
sleep(1)
|
10597
|
+
rescue
|
10598
|
+
begin
|
10599
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys()
|
10600
|
+
sleep(1)
|
10601
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').click
|
10602
|
+
sleep(1)
|
10603
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10604
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10605
|
+
sleep(1)
|
10606
|
+
rescue
|
10607
|
+
begin
|
10608
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys()
|
10609
|
+
sleep(1)
|
10610
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').click
|
10611
|
+
sleep(1)
|
10612
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10613
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10614
|
+
sleep(1)
|
10615
|
+
rescue
|
10616
|
+
begin
|
10617
|
+
@driver.find_element(:xpath, '//*[@name="title"]').send_keys()
|
10618
|
+
sleep(1)
|
10619
|
+
@driver.find_element(:xpath, '//*[@name="title"]').click
|
10620
|
+
sleep(1)
|
10621
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10622
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10623
|
+
sleep(1)
|
10624
|
+
rescue
|
10625
|
+
begin
|
10626
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys()
|
10627
|
+
sleep(1)
|
10628
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').click
|
10629
|
+
sleep(1)
|
10630
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10631
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10632
|
+
sleep(1)
|
10633
|
+
rescue
|
10634
|
+
begin
|
10635
|
+
@driver.find_element(:xpath, '//*[@id="title"]').send_keys()
|
10636
|
+
sleep(1)
|
10637
|
+
@driver.find_element(:xpath, '//*[@id="title"]').click
|
10638
|
+
sleep(1)
|
10639
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10640
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10641
|
+
sleep(1)
|
10642
|
+
rescue
|
10643
|
+
begin
|
10644
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys()
|
10645
|
+
sleep(1)
|
10646
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').click
|
10647
|
+
sleep(1)
|
10648
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10649
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10650
|
+
sleep(1)
|
10651
|
+
rescue
|
10652
|
+
begin
|
10653
|
+
@driver.find_element(:xpath, '//*[@title="input"]').send_keys()
|
10654
|
+
sleep(1)
|
10655
|
+
@driver.find_element(:xpath, '//*[@title="input"]').click
|
10656
|
+
sleep(1)
|
10657
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10658
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10659
|
+
sleep(1)
|
10660
|
+
rescue
|
10661
|
+
begin
|
10662
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys()
|
10663
|
+
sleep(1)
|
10664
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').click
|
10665
|
+
sleep(1)
|
10666
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10667
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10668
|
+
sleep(1)
|
10669
|
+
rescue
|
10670
|
+
begin
|
10671
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys()
|
10672
|
+
sleep(1)
|
10673
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').click
|
10674
|
+
sleep(1)
|
10675
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10676
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10677
|
+
sleep(1)
|
10678
|
+
rescue
|
10679
|
+
begin
|
10680
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys()
|
10681
|
+
sleep(1)
|
10682
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').click
|
10683
|
+
sleep(1)
|
10684
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10685
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10686
|
+
sleep(1)
|
10687
|
+
rescue
|
10688
|
+
begin
|
10689
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys()
|
10690
|
+
sleep(1)
|
10691
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').click
|
10692
|
+
sleep(1)
|
10693
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10694
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10695
|
+
sleep(1)
|
10696
|
+
rescue
|
10697
|
+
begin
|
10698
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys()
|
10699
|
+
sleep(1)
|
10700
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').click
|
10701
|
+
sleep(1)
|
10702
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10703
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10704
|
+
sleep(1)
|
10705
|
+
rescue
|
10706
|
+
begin
|
10707
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys()
|
10708
|
+
sleep(1)
|
10709
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').click
|
10710
|
+
sleep(1)
|
10711
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10712
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10713
|
+
sleep(1)
|
10714
|
+
rescue
|
10715
|
+
begin
|
10716
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys()
|
10717
|
+
sleep(1)
|
10718
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').click
|
10719
|
+
sleep(1)
|
10720
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10721
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10722
|
+
sleep(1)
|
10723
|
+
rescue
|
10724
|
+
begin
|
10725
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys()
|
10726
|
+
sleep(1)
|
10727
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').click
|
10728
|
+
sleep(1)
|
10729
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10730
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10731
|
+
sleep(1)
|
10732
|
+
rescue
|
10733
|
+
begin
|
10734
|
+
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').send_keys()
|
10735
|
+
sleep(1)
|
10736
|
+
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').click
|
10737
|
+
sleep(1)
|
10738
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10739
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10740
|
+
sleep(1)
|
10741
|
+
|
10742
|
+
rescue
|
10743
|
+
begin
|
10744
|
+
@driver.find_element(:xpath, '//*[@name="rg_title"]').send_keys()
|
10745
|
+
sleep(1)
|
10746
|
+
@driver.find_element(:xpath, '//*[@name="rg_title"]').click
|
10747
|
+
sleep(1)
|
10748
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10749
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10750
|
+
sleep(1)
|
10751
|
+
|
10752
|
+
rescue => e
|
10753
|
+
puts '-[√] 등록 실패.......'.red
|
10754
|
+
puts '-[√] 로딩 및 코드인식 실패등 기타 이유로 다음 게시판 작업으로 이동합니다.......'.red
|
10755
|
+
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
10756
|
+
@driver.window_handles.each do |handle|
|
10757
|
+
@driver.switch_to.window(handle)
|
10758
|
+
begin
|
10759
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
10760
|
+
@driver.close
|
10761
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
10762
|
+
puts "크롬 브라우저 종료: #{e.message}"
|
10763
|
+
end
|
10764
|
+
end
|
10765
|
+
#return 0
|
10766
|
+
end
|
10767
|
+
end
|
10768
|
+
end
|
10769
|
+
end
|
10770
|
+
end
|
10771
|
+
end
|
10772
|
+
end
|
10773
|
+
end
|
10774
|
+
end
|
10775
|
+
end
|
10776
|
+
end
|
10777
|
+
end
|
10778
|
+
end
|
10779
|
+
end
|
10780
|
+
end
|
10781
|
+
end
|
10782
|
+
end
|
10783
|
+
end
|
10784
|
+
end
|
10785
|
+
end
|
10786
|
+
end
|
10787
|
+
########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 2차 시도 ▲▲▲▲▲▲▲──────────────────────────────#######
|
10788
|
+
end
|
10789
|
+
end
|
10790
|
+
end
|
10791
|
+
end
|
10792
|
+
end
|
10793
|
+
end
|
10794
|
+
end
|
10795
|
+
end
|
10796
|
+
end
|
10797
|
+
end
|
10798
|
+
end
|
10799
|
+
end
|
10800
|
+
end
|
10801
|
+
end
|
10802
|
+
end
|
10803
|
+
end
|
10804
|
+
end
|
10805
|
+
end
|
10806
|
+
end
|
10807
|
+
end
|
10808
|
+
end
|
10809
|
+
end
|
10810
|
+
end
|
10811
|
+
end
|
10812
|
+
end
|
10813
|
+
end
|
10814
|
+
end
|
10815
|
+
end
|
10816
|
+
end
|
10817
|
+
end
|
10818
|
+
end
|
10819
|
+
end
|
10820
|
+
end
|
10821
|
+
end
|
10822
|
+
end
|
10823
|
+
end
|
10824
|
+
end
|
10825
|
+
end
|
10826
|
+
end
|
10827
|
+
end
|
10005
10828
|
|
10006
|
-
|
10007
|
-
|
10008
|
-
sleep(5)
|
10009
|
-
rescue
|
10010
|
-
begin
|
10011
|
-
ss_button = @driver.find_element(:xpath, '//*[@id="savePostInBoard"]')
|
10012
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10013
|
-
sleep(1)
|
10829
|
+
########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 ▲▲▲▲▲▲▲──────────────────────────────#######
|
10830
|
+
########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 ▲▲▲▲▲▲▲──────────────────────────────#######
|
10014
10831
|
|
10015
|
-
|
10016
|
-
|
10017
|
-
|
10018
|
-
|
10019
|
-
|
10020
|
-
|
10021
|
-
|
10022
|
-
|
10832
|
+
rescue => e
|
10833
|
+
puts '-[√] 글쓰기 페이지 접근 및 코드 탐색 ERROR 발생.......'.red
|
10834
|
+
@driver.window_handles.each do |handle|
|
10835
|
+
@driver.switch_to.window(handle)
|
10836
|
+
begin
|
10837
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
10838
|
+
@driver.close
|
10839
|
+
|
10840
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
10841
|
+
puts "크롬 브라우저 종료: #{e.message}"
|
10842
|
+
end
|
10843
|
+
end
|
10844
|
+
#return 0
|
10845
|
+
@driver.quit
|
10846
|
+
end
|
10023
10847
|
|
10024
|
-
|
10025
|
-
|
10026
|
-
|
10027
|
-
|
10028
|
-
|
10848
|
+
begin
|
10849
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 2)
|
10850
|
+
alert = wait.until { @driver.switch_to.alert }
|
10851
|
+
alert_text = alert.text
|
10852
|
+
alert.accept
|
10029
10853
|
|
10030
|
-
|
10031
|
-
begin
|
10032
|
-
ss_button = @driver.find_element(:partial_link_text, '저장하기')
|
10033
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10034
|
-
sleep(1)
|
10854
|
+
banned_word = nil
|
10035
10855
|
|
10036
|
-
|
10037
|
-
|
10038
|
-
|
10856
|
+
# 1. 금지단어('감자') 형식
|
10857
|
+
if alert_text =~ /금지단어\('(.+?)'\)/
|
10858
|
+
banned_word = $1
|
10039
10859
|
|
10040
|
-
|
10041
|
-
|
10042
|
-
|
10043
|
-
|
10044
|
-
sleep(1)
|
10860
|
+
# 2. 내용에 감자 단어 사용이 제한되어 있습니다 형식
|
10861
|
+
elsif alert_text =~ /내용에\s+(.+?)\s+단어 사용이 제한/
|
10862
|
+
banned_word = $1
|
10863
|
+
end
|
10045
10864
|
|
10046
|
-
|
10047
|
-
|
10048
|
-
|
10049
|
-
|
10050
|
-
|
10051
|
-
begin
|
10052
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btnWrite"]')
|
10053
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10054
|
-
sleep(1)
|
10055
|
-
|
10056
|
-
@driver.find_element(:xpath, '//*[@class="btnWrite"]').click
|
10057
|
-
puts '-[√] 등록을 22시도하였습니다.......'.magenta
|
10058
|
-
sleep(5)
|
10865
|
+
if banned_word
|
10866
|
+
puts "금지단어 발견: [#{banned_word}]".red
|
10867
|
+
puts "[#{banned_word}] 금지단어 제거 후 재 시도 진행!!".red
|
10868
|
+
title.gsub!(banned_word, '')
|
10869
|
+
content.gsub!(banned_word, '')
|
10059
10870
|
|
10060
|
-
|
10061
|
-
|
10062
|
-
|
10063
|
-
|
10064
|
-
|
10065
|
-
|
10066
|
-
|
10067
|
-
|
10068
|
-
|
10069
|
-
|
10070
|
-
rescue
|
10071
|
-
begin
|
10072
|
-
ss_button = @driver.find_element(:xpath, '//*[@type="submit"]')
|
10073
|
-
if ss_button.attribute("class") == "upload_btn1"
|
10074
|
-
raise
|
10075
|
-
end
|
10871
|
+
if already_retried
|
10872
|
+
break # 이미 한 번 재시도 했으면 루프 종료
|
10873
|
+
else
|
10874
|
+
already_retried = true
|
10875
|
+
next # 금지단어 제거하고 재시도
|
10876
|
+
end
|
10877
|
+
else
|
10878
|
+
break # 금지단어 형식이 아니면 루프 종료
|
10879
|
+
end
|
10076
10880
|
|
10077
|
-
|
10078
|
-
|
10881
|
+
rescue
|
10882
|
+
break # alert 자체가 없으면 루프 종료
|
10883
|
+
end
|
10079
10884
|
|
10080
|
-
ss_button.click
|
10081
|
-
puts '-[√] 등록을 24번 코드로 시도하였습니다.......'.magenta
|
10082
|
-
sleep(5)
|
10083
10885
|
|
10084
|
-
|
10085
|
-
rescue
|
10086
|
-
begin
|
10087
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="button-agree"]')
|
10088
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10089
|
-
sleep(1)
|
10090
|
-
|
10091
|
-
@driver.find_element(:xpath, '//*[@class="button-agree"]').click
|
10092
|
-
puts '-[√] 등록을 25번 코드로 시도하였습니다.......'.magenta
|
10093
|
-
sleep(5)
|
10094
|
-
|
10095
|
-
rescue
|
10096
|
-
begin
|
10097
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]')
|
10098
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10099
|
-
sleep(1)
|
10100
|
-
|
10101
|
-
@driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]').click
|
10102
|
-
puts '-[√] 등록을 26번 코드로 시도하였습니다.......'.magenta
|
10103
|
-
sleep(5)
|
10104
|
-
|
10105
|
-
rescue
|
10106
|
-
begin
|
10107
|
-
ss_button = @driver.find_element(:xpath, "//button[contains(text(), '글쓰기')]")
|
10108
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10109
|
-
sleep(1)
|
10110
|
-
|
10111
|
-
@driver.find_element(:xpath, "//button[contains(text(), '글쓰기')]").click
|
10112
|
-
puts '-[√] 등록을 27번 코드로 시도하였습니다.......'.magenta
|
10113
|
-
sleep(5)
|
10114
|
-
|
10115
|
-
rescue
|
10116
|
-
begin
|
10117
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="Button button-rounded black button-normal"]')
|
10118
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10119
|
-
sleep(1)
|
10120
|
-
|
10121
|
-
@driver.find_element(:xpath, '//*[@class="Button button-rounded black button-normal"]').click
|
10122
|
-
puts '-[√] 등록을 28번 코드로 시도하였습니다.......'.magenta
|
10123
|
-
sleep(5)
|
10124
|
-
|
10125
|
-
rescue
|
10126
|
-
begin
|
10127
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn_point"]')
|
10128
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10129
|
-
sleep(1)
|
10130
|
-
|
10131
|
-
@driver.find_element(:xpath, '//*[@class="btn btn_point"]').click
|
10132
|
-
puts '-[√] 등록을 28번 코드로 시도하였습니다.......'.magenta
|
10133
|
-
sleep(5)
|
10134
|
-
|
10135
|
-
rescue
|
10136
|
-
begin
|
10137
|
-
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "save")]')
|
10138
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10139
|
-
sleep(1)
|
10140
|
-
|
10141
|
-
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "save")]').click
|
10142
|
-
puts '-[√] 등록을 29번 코드로 시도하였습니다.......'.magenta
|
10143
|
-
sleep(5)
|
10144
|
-
|
10145
|
-
rescue
|
10146
|
-
begin
|
10147
|
-
ss_button = @driver.find_element(:css, 'input[@type="submit" and @value="확인"]')
|
10148
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10149
|
-
sleep(1)
|
10150
|
-
|
10151
|
-
ss_button = @driver.find_element(:css, 'input[@type="submit" and @value="확인"]').click
|
10152
|
-
puts '-[√] 등록을 30번 코드로 시도하였습니다.......'.magenta
|
10153
|
-
sleep(5)
|
10154
|
-
|
10155
|
-
rescue
|
10156
|
-
begin
|
10157
|
-
ss_button = @driver.find_element(:xpath, '//*[@type="button" and @value="작성"]')
|
10158
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10159
|
-
sleep(1)
|
10160
|
-
|
10161
|
-
ss_button = @driver.find_element(:xpath, '//*[@type="button" and @value="작성"]').click
|
10162
|
-
puts '-[√] 등록을 31번 코드로 시도하였습니다.......'.magenta
|
10163
|
-
sleep(5)
|
10164
|
-
|
10165
|
-
rescue
|
10166
|
-
begin
|
10167
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="button button-inverse button-small write_ok"]')
|
10168
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10169
|
-
sleep(1)
|
10170
|
-
|
10171
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="button button-inverse button-small write_ok"]').click
|
10172
|
-
puts '-[√] 등록을 32번 코드로 시도하였습니다.......'.magenta
|
10173
|
-
sleep(5)
|
10174
|
-
|
10175
|
-
rescue
|
10176
|
-
begin
|
10177
|
-
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "btn/send")]')
|
10178
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10179
|
-
sleep(1)
|
10180
|
-
|
10181
|
-
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "btn/send")]').click
|
10182
|
-
puts '-[√] 등록을 33번 코드로 시도하였습니다.......'.magenta
|
10183
|
-
sleep(5)
|
10184
|
-
|
10185
|
-
rescue
|
10186
|
-
begin
|
10187
|
-
ss_button = @driver.find_element(:xpath, '//input[@name="formimage1"]')
|
10188
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10189
|
-
sleep(1)
|
10190
|
-
|
10191
|
-
ss_button = @driver.find_element(:xpath, '//input[@name="formimage1"]').click
|
10192
|
-
puts '-[√] 등록을 34번 코드로 시도하였습니다.......'.magenta
|
10193
|
-
sleep(5)
|
10194
|
-
|
10195
|
-
rescue
|
10196
|
-
begin
|
10197
|
-
ss_button = @driver.find_element(:xpath, '//button[@type="button" and @class="btnSubmit"]')
|
10198
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10199
|
-
sleep(1)
|
10200
|
-
|
10201
|
-
ss_button = @driver.find_element(:xpath, '//button[@type="button" and @class="btnSubmit"]').click
|
10202
|
-
puts '-[√] 등록을 35번 코드로 시도하였습니다.......'.magenta
|
10203
|
-
sleep(5)
|
10204
|
-
|
10205
|
-
rescue
|
10206
|
-
begin
|
10207
|
-
ss_button = @driver.find_element(:xpath, '//input[@type="button" and @value="전송"]')
|
10208
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10209
|
-
sleep(1)
|
10210
|
-
|
10211
|
-
ss_button = @driver.find_element(:xpath, '//input[@type="button" and @value="전송"]').click
|
10212
|
-
puts '-[√] 등록을 36번 코드로 시도하였습니다.......'.magenta
|
10213
|
-
sleep(5)
|
10214
|
-
|
10215
|
-
rescue
|
10216
|
-
begin
|
10217
|
-
ss_button = @driver.find_element(css: 'ul.bt_type li a.bt_type4_w_4')
|
10218
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10219
|
-
sleep(1)
|
10220
|
-
|
10221
|
-
ss_button = @driver.find_element(css: 'ul.bt_type li a.bt_type4_w_4').click
|
10222
|
-
puts '-[√] 등록을 36번 코드로 시도하였습니다.......'.magenta
|
10223
|
-
sleep(5)
|
10224
|
-
|
10225
|
-
rescue
|
10226
|
-
begin
|
10227
|
-
ss_button = @driver.find_element(id: 'btn-write')
|
10228
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10229
|
-
sleep(1)
|
10230
|
-
|
10231
|
-
ss_button = @driver.find_element(id: 'btn-write').click
|
10232
|
-
puts '-[√] 등록을 37번 코드로 시도하였습니다.......'.magenta
|
10233
|
-
sleep(5)
|
10234
|
-
|
10235
|
-
rescue
|
10236
|
-
begin
|
10237
|
-
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "img/btn_confirm.gif")]')
|
10238
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10239
|
-
sleep(1)
|
10240
|
-
|
10241
|
-
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "img/btn_confirm.gif")]').click
|
10242
|
-
puts '-[√] 등록을 38번 코드로 시도하였습니다.......'.magenta
|
10243
|
-
sleep(5)
|
10244
|
-
|
10245
|
-
rescue
|
10246
|
-
begin
|
10247
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btn2_1"]')
|
10248
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10249
|
-
sleep(1)
|
10250
|
-
|
10251
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btn2_1"]').click
|
10252
|
-
puts '-[√] 등록을 39번 코드로 시도하였습니다.......'.magenta
|
10253
|
-
sleep(5)
|
10254
|
-
|
10255
|
-
rescue
|
10256
|
-
begin
|
10257
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="pro-btn large _write"]')
|
10258
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10259
|
-
sleep(1)
|
10260
|
-
|
10261
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="pro-btn large _write"]').click
|
10262
|
-
puts '-[√] 등록을 39번 코드로 시도하였습니다.......'.magenta
|
10263
|
-
sleep(5)
|
10264
|
-
|
10265
|
-
rescue
|
10266
|
-
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
|
10267
|
-
begin
|
10268
|
-
puts '-[√] 등록 버튼 코드 탐색에 실패하였습니다.......'.magenta
|
10269
|
-
puts '-[√] 다른 방법으로 등록을 시도 합니다.......'.magenta
|
10270
|
-
|
10271
|
-
sleep(1)
|
10272
|
-
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys()
|
10273
|
-
sleep(1)
|
10274
|
-
@driver.find_element(:xpath, '//*[@id="wr_subject"]').click
|
10275
|
-
sleep(1)
|
10276
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10277
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10278
|
-
sleep(5)
|
10279
|
-
rescue
|
10280
|
-
begin
|
10281
|
-
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys()
|
10282
|
-
sleep(1)
|
10283
|
-
@driver.find_element(:xpath, '//*[@fw-label="제목"]').click
|
10284
|
-
sleep(1)
|
10285
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10286
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10287
|
-
sleep(5)
|
10288
|
-
rescue
|
10289
|
-
begin
|
10290
|
-
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys()
|
10291
|
-
sleep(1)
|
10292
|
-
@driver.find_element(:xpath, '//*[@name="subject"]').click
|
10293
|
-
sleep(1)
|
10294
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10295
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10296
|
-
sleep(5)
|
10297
|
-
rescue
|
10298
|
-
begin
|
10299
|
-
@driver.find_element(:xpath, '//*[@name="title"]').send_keys()
|
10300
|
-
sleep(1)
|
10301
|
-
@driver.find_element(:xpath, '//*[@name="title"]').click
|
10302
|
-
sleep(1)
|
10303
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10304
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10305
|
-
sleep(5)
|
10306
|
-
rescue
|
10307
|
-
begin
|
10308
|
-
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys()
|
10309
|
-
sleep(1)
|
10310
|
-
@driver.find_element(:xpath, '//*[@id="wr_title"]').click
|
10311
|
-
sleep(1)
|
10312
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10313
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10314
|
-
sleep(5)
|
10315
|
-
rescue
|
10316
|
-
begin
|
10317
|
-
@driver.find_element(:xpath, '//*[@id="title"]').send_keys()
|
10318
|
-
sleep(1)
|
10319
|
-
@driver.find_element(:xpath, '//*[@id="title"]').click
|
10320
|
-
sleep(1)
|
10321
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10322
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10323
|
-
sleep(5)
|
10324
|
-
rescue
|
10325
|
-
begin
|
10326
|
-
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys()
|
10327
|
-
sleep(1)
|
10328
|
-
@driver.find_element(:xpath, '//*[@id="postTitle"]').click
|
10329
|
-
sleep(1)
|
10330
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10331
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10332
|
-
sleep(5)
|
10333
|
-
rescue
|
10334
|
-
begin
|
10335
|
-
@driver.find_element(:xpath, '//*[@title="input"]').send_keys()
|
10336
|
-
sleep(1)
|
10337
|
-
@driver.find_element(:xpath, '//*[@title="input"]').click
|
10338
|
-
sleep(1)
|
10339
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10340
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10341
|
-
sleep(5)
|
10342
|
-
rescue
|
10343
|
-
begin
|
10344
|
-
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys()
|
10345
|
-
sleep(1)
|
10346
|
-
@driver.find_element(:xpath, '//*[@name="wr_subject"]').click
|
10347
|
-
sleep(1)
|
10348
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10349
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10350
|
-
sleep(5)
|
10351
|
-
rescue
|
10352
|
-
begin
|
10353
|
-
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys()
|
10354
|
-
sleep(1)
|
10355
|
-
@driver.find_element(:xpath, '//*[@name="post_title"]').click
|
10356
|
-
sleep(1)
|
10357
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10358
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10359
|
-
sleep(5)
|
10360
|
-
rescue
|
10361
|
-
begin
|
10362
|
-
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys()
|
10363
|
-
sleep(1)
|
10364
|
-
@driver.find_element(:xpath, '//*[@title="제목"]').click
|
10365
|
-
sleep(1)
|
10366
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10367
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10368
|
-
sleep(5)
|
10369
|
-
rescue
|
10370
|
-
begin
|
10371
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys()
|
10372
|
-
sleep(1)
|
10373
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').click
|
10374
|
-
sleep(1)
|
10375
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10376
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10377
|
-
sleep(5)
|
10378
|
-
rescue
|
10379
|
-
begin
|
10380
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys()
|
10381
|
-
sleep(1)
|
10382
|
-
@driver.find_element(:xpath, '//*[@placeholder="제목"]').click
|
10383
|
-
sleep(1)
|
10384
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10385
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10386
|
-
sleep(5)
|
10387
|
-
rescue
|
10388
|
-
begin
|
10389
|
-
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys()
|
10390
|
-
sleep(1)
|
10391
|
-
@driver.find_element(:xpath, '//*[@hname="제목"]').click
|
10392
|
-
sleep(1)
|
10393
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10394
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10395
|
-
sleep(5)
|
10396
|
-
rescue
|
10397
|
-
begin
|
10398
|
-
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys()
|
10399
|
-
sleep(1)
|
10400
|
-
@driver.find_element(:xpath, '//*[@id="post_subject"]').click
|
10401
|
-
sleep(1)
|
10402
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10403
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10404
|
-
sleep(5)
|
10405
|
-
rescue
|
10406
|
-
begin
|
10407
|
-
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys()
|
10408
|
-
sleep(1)
|
10409
|
-
@driver.find_element(:xpath, '//*[@id="search_bar"]').click
|
10410
|
-
sleep(1)
|
10411
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10412
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10413
|
-
sleep(5)
|
10414
|
-
rescue
|
10415
|
-
begin
|
10416
|
-
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').send_keys()
|
10417
|
-
sleep(1)
|
10418
|
-
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').click
|
10419
|
-
sleep(1)
|
10420
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10421
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10422
|
-
sleep(5)
|
10423
|
-
|
10424
|
-
rescue
|
10425
|
-
begin
|
10426
|
-
@driver.find_element(:xpath, '//*[@name="rg_title"]').send_keys()
|
10427
|
-
sleep(1)
|
10428
|
-
@driver.find_element(:xpath, '//*[@name="rg_title"]').click
|
10429
|
-
sleep(1)
|
10430
|
-
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10431
|
-
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10432
|
-
sleep(5)
|
10433
|
-
|
10434
|
-
rescue => e
|
10435
|
-
puts '-[√] 등록 실패.......'.red
|
10436
|
-
puts '-[√] 로딩 및 코드인식 실패등 기타 이유로 다음 게시판 작업으로 이동합니다.......'.red
|
10437
|
-
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
10438
|
-
@driver.window_handles.each do |handle|
|
10439
|
-
@driver.switch_to.window(handle)
|
10440
|
-
begin
|
10441
|
-
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
10442
|
-
@driver.close
|
10443
|
-
rescue Selenium::WebDriver::Error::WebDriverError => e
|
10444
|
-
puts "크롬 브라우저 종료: #{e.message}"
|
10445
|
-
end
|
10446
|
-
end
|
10447
|
-
return 0
|
10448
|
-
@driver.quit
|
10449
|
-
end
|
10450
|
-
end
|
10451
|
-
end
|
10452
|
-
|
10453
|
-
end
|
10454
|
-
end
|
10455
|
-
end
|
10456
|
-
end
|
10457
|
-
end
|
10458
|
-
end
|
10459
|
-
end
|
10460
|
-
end
|
10461
|
-
end
|
10462
|
-
end
|
10463
|
-
end
|
10464
|
-
end
|
10465
|
-
end
|
10466
|
-
end
|
10467
|
-
end
|
10468
|
-
end
|
10469
|
-
########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 2차 시도 ▲▲▲▲▲▲▲──────────────────────────────#######
|
10470
|
-
end
|
10471
|
-
end
|
10472
|
-
end
|
10473
|
-
end
|
10474
|
-
end
|
10475
|
-
end
|
10476
|
-
end
|
10477
|
-
end
|
10478
|
-
end
|
10479
|
-
end
|
10480
|
-
end
|
10481
|
-
end
|
10482
|
-
end
|
10483
|
-
end
|
10484
|
-
end
|
10485
|
-
end
|
10486
|
-
end
|
10487
|
-
end
|
10488
|
-
end
|
10489
|
-
end
|
10490
|
-
end
|
10491
|
-
end
|
10492
|
-
end
|
10493
|
-
end
|
10494
|
-
end
|
10495
|
-
end
|
10496
|
-
end
|
10497
|
-
end
|
10498
|
-
end
|
10499
|
-
end
|
10500
|
-
end
|
10501
|
-
end
|
10502
|
-
end
|
10503
|
-
end
|
10504
|
-
end
|
10505
|
-
end
|
10506
|
-
end
|
10507
|
-
end
|
10508
|
-
end
|
10509
|
-
end
|
10510
|
-
|
10511
|
-
|
10512
|
-
|
10886
|
+
end #반복루프
|
10513
10887
|
|
10514
|
-
|
10515
|
-
|
10516
|
-
wait = Selenium::WebDriver::Wait.new(timeout: 3)
|
10888
|
+
begin
|
10889
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 2)
|
10517
10890
|
alert = wait.until { @driver.switch_to.alert }
|
10518
10891
|
alert_text = alert.text # alert 메시지 저장
|
10519
10892
|
alert.accept
|
10520
10893
|
rescue
|
10521
10894
|
end
|
10522
|
-
sleep(
|
10523
|
-
|
10524
|
-
########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 ▲▲▲▲▲▲▲──────────────────────────────#######
|
10895
|
+
sleep(2)
|
10896
|
+
|
10525
10897
|
|
10526
10898
|
begin
|
10527
|
-
sleep(3)
|
10528
10899
|
posting_url = @driver.current_url
|
10529
|
-
puts '-[√] 등록 로그 파일 생성 완료.......'.yellow
|
10530
10900
|
File.open('./log/posting_log.txt', 'a') do |ff|
|
10531
10901
|
ff.write('[')
|
10532
10902
|
ff.write(DateTime.now.strftime("%Y년%m월%d일%H시%M분"))
|
@@ -10549,27 +10919,141 @@ rescue
|
|
10549
10919
|
rescue
|
10550
10920
|
end
|
10551
10921
|
|
10552
|
-
|
10922
|
+
if option['post_delete'] =='true'
|
10923
|
+
puts "등록한 게시글 삭제를 진행합니다.".red
|
10924
|
+
begin
|
10925
|
+
delete_button = @driver.find_element(:xpath, '//*[text()="삭제" and contains(@class, "btn_b011")]')
|
10926
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
10927
|
+
sleep(2)
|
10928
|
+
@driver.find_element(:xpath, '//*[text()="삭제" and contains(@class, "btn_b011")]').click
|
10929
|
+
sleep(1)
|
10930
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10931
|
+
rescue
|
10932
|
+
begin
|
10933
|
+
delete_buttons1 = @driver.find_elements(:xpath, '//*[@class="fa fa-cog" and @aria-hidden="true"]')
|
10934
|
+
if delete_buttons1.length >= 1
|
10935
|
+
first_button1 = delete_buttons1.first
|
10936
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", first_button1)
|
10937
|
+
sleep(1) # 짧게 줄여도 충분함
|
10938
|
+
first_button1.click # 실제 클릭 동작 추가
|
10939
|
+
sleep(1)
|
10940
|
+
else
|
10941
|
+
end
|
10942
|
+
delete_buttons2 = @driver.find_elements(:xpath, '//*[@class="fa fa-trash-o fa-fw" and @aria-hidden="true"]')
|
10943
|
+
if delete_buttons2.length >= 1
|
10944
|
+
first_button2 = delete_buttons2.first
|
10945
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", first_button2)
|
10946
|
+
sleep(1) # 짧게 줄여도 충분함
|
10947
|
+
first_button2.click # 실제 클릭 동작 추가
|
10948
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10949
|
+
sleep(1)
|
10950
|
+
else
|
10951
|
+
end
|
10952
|
+
rescue
|
10953
|
+
begin
|
10954
|
+
delete_buttons = @driver.find_elements(:xpath, '//*[@class="btn_more_opt is_view_btn btn_b01 btn"]')
|
10955
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
10956
|
+
sleep(2)
|
10957
|
+
@driver.find_elements(:xpath, '//*[@class="btn_more_opt is_view_btn btn_b01 btn"]').click
|
10958
|
+
sleep(2)
|
10959
|
+
@driver.find_elements(:xpath, '//*[@class="fa fa-trash-o"]').click
|
10960
|
+
sleep(1)
|
10961
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10962
|
+
|
10963
|
+
rescue
|
10964
|
+
begin
|
10965
|
+
delete_buttons = @driver.find_elements(:xpath, '//*[@class="bi bi-three-dots-vertical"]')
|
10966
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
10967
|
+
sleep(2)
|
10968
|
+
@driver.find_elements(:xpath, '//*[@class="bi bi-three-dots-vertical"]').click
|
10969
|
+
sleep(2)
|
10970
|
+
@driver.find_element(:xpath, '//a[contains(text(), "삭제")]').click
|
10971
|
+
sleep(1)
|
10972
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10973
|
+
|
10974
|
+
rescue
|
10975
|
+
begin
|
10976
|
+
delete_buttons = @driver.find_element(:xpath, '//a[contains(text(), "글삭제")]')
|
10977
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
10978
|
+
sleep(2)
|
10979
|
+
@driver.find_element(:xpath, '//a[contains(text(), "글삭제")]').click
|
10980
|
+
sleep(1)
|
10981
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10982
|
+
|
10983
|
+
rescue
|
10984
|
+
begin
|
10985
|
+
delete_buttons = @driver.find_element(:xpath, '//a[contains(text(), "삭제")]')
|
10986
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
10987
|
+
sleep(2)
|
10988
|
+
@driver.find_element(:xpath, '//a[contains(text(), "삭제")]').click
|
10989
|
+
sleep(1)
|
10990
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10553
10991
|
|
10992
|
+
rescue
|
10993
|
+
begin
|
10994
|
+
delete_buttons = @driver.find_elements(:xpath, '//*[@role="button" and @title="삭제"]')
|
10995
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
10996
|
+
sleep(2)
|
10997
|
+
@driver.find_elements(:xpath, '//*[@role="button" and @title="삭제"]').click
|
10998
|
+
sleep(1)
|
10999
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10554
11000
|
|
11001
|
+
rescue
|
11002
|
+
begin
|
11003
|
+
delete_buttons = @driver.find_element(:xpath, '//a[contains(@class, "xet-board-btn") and .//span[text()="삭제"]]')
|
11004
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
11005
|
+
sleep(2)
|
11006
|
+
@driver.find_element(:xpath, '//a[contains(@class, "xet-board-btn") and .//span[text()="삭제"]]').click
|
11007
|
+
sleep(1)
|
11008
|
+
puts "등록한 게시글 삭제 완료!!".red
|
10555
11009
|
|
11010
|
+
rescue
|
11011
|
+
begin
|
11012
|
+
delete_buttons1 = @driver.find_elements(:xpath, '//*[@class="ico_16px delete"]')
|
11013
|
+
if delete_buttons1.length >= 1
|
11014
|
+
first_button1 = delete_buttons1.first
|
11015
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", first_button1)
|
11016
|
+
sleep(1) # 짧게 줄여도 충분함
|
11017
|
+
first_button1.click # 실제 클릭 동작 추가
|
11018
|
+
sleep(1)
|
11019
|
+
puts "등록한 게시글 삭제 완료!!".red
|
11020
|
+
else
|
11021
|
+
end
|
11022
|
+
rescue
|
11023
|
+
begin
|
11024
|
+
delete_buttons1 = @driver.find_elements(:xpath, '//*[@id="deletePost"]')
|
11025
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", delete_button)
|
11026
|
+
delete_buttons1 = @driver.find_elements(:xpath, '//*[@id="deletePost"]').click
|
11027
|
+
sleep(1)
|
11028
|
+
puts "등록한 게시글 삭제 완료!!".red
|
11029
|
+
|
11030
|
+
rescue
|
11031
|
+
puts "등록한 게시글 삭제 실패!!: #{e.message}".red
|
11032
|
+
end
|
11033
|
+
end
|
11034
|
+
end
|
11035
|
+
end
|
11036
|
+
end
|
11037
|
+
end
|
11038
|
+
end
|
11039
|
+
end
|
11040
|
+
end
|
11041
|
+
end
|
10556
11042
|
|
10557
|
-
rescue => e
|
10558
|
-
puts '-[√] 글쓰기 페이지 접근 및 코드 탐색 ERROR 발생.......'.red
|
10559
|
-
@driver.window_handles.each do |handle|
|
10560
|
-
@driver.switch_to.window(handle)
|
10561
11043
|
begin
|
10562
|
-
|
10563
|
-
|
10564
|
-
|
10565
|
-
|
10566
|
-
|
11044
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 3) # 3초 기다리기
|
11045
|
+
alert = wait.until { @driver.switch_to.alert } # alert이 나타날 때까지 기다림
|
11046
|
+
alert.accept
|
11047
|
+
sleep(2)
|
11048
|
+
rescue
|
10567
11049
|
end
|
11050
|
+
else
|
10568
11051
|
end
|
10569
|
-
|
10570
|
-
|
10571
|
-
|
10572
|
-
sleep(
|
11052
|
+
|
11053
|
+
|
11054
|
+
|
11055
|
+
sleep(2)
|
11056
|
+
|
10573
11057
|
########크롬드라이버 전체 닫기##########
|
10574
11058
|
begin
|
10575
11059
|
@driver.window_handles.each do |handle|
|
@@ -10596,9 +11080,7 @@ end
|
|
10596
11080
|
|
10597
11081
|
end
|
10598
11082
|
|
10599
|
-
|
10600
|
-
|
10601
|
-
|
11083
|
+
#end #반복루프
|
10602
11084
|
class Wordpress
|
10603
11085
|
include Glimmer
|
10604
11086
|
def get_mac_address
|
@@ -10924,7 +11406,7 @@ class Wordpress
|
|
10924
11406
|
|
10925
11407
|
while true
|
10926
11408
|
for n in 0..@data['table'].length-1
|
10927
|
-
@data['table'][n][
|
11409
|
+
@data['table'][n][11] = 0
|
10928
11410
|
end
|
10929
11411
|
|
10930
11412
|
while true
|
@@ -10984,10 +11466,18 @@ class Wordpress
|
|
10984
11466
|
option['category'] = ''
|
10985
11467
|
end
|
10986
11468
|
|
11469
|
+
|
11470
|
+
|
11471
|
+
if table[8] == true
|
11472
|
+
option['post_delete'] = 'true'
|
11473
|
+
else
|
11474
|
+
option['post_delete'] = 'false'
|
11475
|
+
end
|
11476
|
+
|
10987
11477
|
|
10988
11478
|
option['proxy'] = ''
|
10989
11479
|
if @data['포스트설정']['프록시'].checked?
|
10990
|
-
if table[
|
11480
|
+
if table[9].to_i > table[11].to_i
|
10991
11481
|
option['proxy'] = @data['포스트설정']['프록시리스트'].sample.to_s
|
10992
11482
|
|
10993
11483
|
end
|
@@ -10997,9 +11487,9 @@ class Wordpress
|
|
10997
11487
|
|
10998
11488
|
|
10999
11489
|
|
11000
|
-
puts table[
|
11001
|
-
puts table[
|
11002
|
-
if table[
|
11490
|
+
puts table[9]
|
11491
|
+
puts table[11]
|
11492
|
+
if table[9].to_i > table[11].to_i
|
11003
11493
|
if @data['포스트설정']['테더링'].checked?
|
11004
11494
|
puts 'tedering ip change...'
|
11005
11495
|
stdout, stderr, status = Open3.capture3('./adb devices')
|
@@ -11663,11 +12153,11 @@ class Wordpress
|
|
11663
12153
|
puts 'start...'
|
11664
12154
|
naver.update(user_id, user_pw, title, content, option, post_url, signup_url, login_url, cc_check_url, image_url_cheng, img_link2, category, more_txt1, more_txt2, more_txt3, more_txt4, captcha_key, keyword)
|
11665
12155
|
|
11666
|
-
@data['table'][index][
|
12156
|
+
@data['table'][index][11] = @data['table'][index][11].to_i + 1
|
11667
12157
|
@data['table'][index][-1] = 100
|
11668
12158
|
@data['table'] << []
|
11669
12159
|
@data['table'].pop
|
11670
|
-
sleep(@data['table'][index][
|
12160
|
+
sleep(@data['table'][index][10].to_i)
|
11671
12161
|
end
|
11672
12162
|
rescue => e
|
11673
12163
|
puts e
|
@@ -12020,8 +12510,8 @@ class Wordpress
|
|
12020
12510
|
}
|
12021
12511
|
button('등록'){
|
12022
12512
|
on_clicked {
|
12023
|
-
@data['table'] << [false, @data['signup_url'].text,@data['login_url'].text,@data['cc_check_url'].text,@data['post_url'].text,@data['category'].text,@data['site_id_input'].text,@data['site_pw_input'].text,1,1,0,0]
|
12024
|
-
@data['table'] << [false, @data['signup_url'].text,@data['login_url'].text,@data['cc_check_url'].text,@data['post_url'].text,@data['category'].text,@data['site_id_input'].text,@data['site_pw_input'].text,1,1,0,0]
|
12513
|
+
@data['table'] << [false, @data['signup_url'].text,@data['login_url'].text,@data['cc_check_url'].text,@data['post_url'].text,@data['category'].text,@data['site_id_input'].text,@data['site_pw_input'].text,false,1,1,0,0]
|
12514
|
+
@data['table'] << [false, @data['signup_url'].text,@data['login_url'].text,@data['cc_check_url'].text,@data['post_url'].text,@data['category'].text,@data['site_id_input'].text,@data['site_pw_input'].text,false,1,1,0,0]
|
12025
12515
|
@data['table'].pop
|
12026
12516
|
|
12027
12517
|
|
@@ -12035,8 +12525,8 @@ class Wordpress
|
|
12035
12525
|
file_data.split("\n").each do |i|
|
12036
12526
|
i3 = i.to_s.force_encoding('utf-8').to_s
|
12037
12527
|
i2 = i3.split(',')
|
12038
|
-
@data['table'] << [false, i2[0].to_s, i2[1].to_s,i2[2].to_s,i2[3].to_s,i2[4].to_s,i2[5].to_s,i2[6].to_s,1,1,0,0]
|
12039
|
-
@data['table'] << [false, i2[0].to_s, i2[1].to_s,i2[2].to_s,i2[3].to_s,1,1,0,0]
|
12528
|
+
@data['table'] << [false, i2[0].to_s, i2[1].to_s,i2[2].to_s,i2[3].to_s,i2[4].to_s,i2[5].to_s,i2[6].to_s,['1', 'true'].include?(i2[7].to_s.strip.downcase),1,1,0,0]
|
12529
|
+
@data['table'] << [false, i2[0].to_s, i2[1].to_s,i2[2].to_s,i2[3].to_s,false,1,1,0,0]
|
12040
12530
|
@data['table'].pop
|
12041
12531
|
end
|
12042
12532
|
end
|
@@ -12073,6 +12563,9 @@ class Wordpress
|
|
12073
12563
|
text_column('pw'){
|
12074
12564
|
editable true
|
12075
12565
|
}
|
12566
|
+
checkbox_column('글삭제') {
|
12567
|
+
editable true
|
12568
|
+
}
|
12076
12569
|
text_column('수량'){
|
12077
12570
|
editable true
|
12078
12571
|
}
|
@@ -12082,9 +12575,9 @@ class Wordpress
|
|
12082
12575
|
}
|
12083
12576
|
|
12084
12577
|
text_column('시도 횟수'){
|
12085
|
-
|
12578
|
+
editable true
|
12086
12579
|
}
|
12087
|
-
|
12580
|
+
|
12088
12581
|
progress_bar_column('Progress')
|
12089
12582
|
|
12090
12583
|
cell_rows @data['table']
|
@@ -12151,8 +12644,8 @@ class Wordpress
|
|
12151
12644
|
on_clicked{
|
12152
12645
|
for n in 0..@data['table'].length-1
|
12153
12646
|
|
12154
|
-
@data['table'][n][
|
12155
|
-
@data['table'][n][
|
12647
|
+
@data['table'][n][9] = @data['table_counter_input'].text.to_i
|
12648
|
+
@data['table'][n][10] = @data['table_delay_input'].text.to_i
|
12156
12649
|
|
12157
12650
|
@data['table'] << []
|
12158
12651
|
@data['table'].pop
|