posting_duo 3.89.799 → 3.90.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_duo.rb +1231 -1042
- metadata +2 -2
data/lib/posting_duo.rb
CHANGED
@@ -1222,27 +1222,63 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1222
1222
|
##가입필드에 체크박스 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
1223
1223
|
puts '-[√] 회원가입 체크박스 3차 탐색.......'.yellow
|
1224
1224
|
begin
|
1225
|
-
@driver.find_element(:xpath, '//*[@type="checkbox"]')
|
1225
|
+
el = @driver.find_element(:xpath, '//*[@type="checkbox" and @name="accept_agreement"]')
|
1226
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1227
|
+
sleep(1)
|
1228
|
+
@driver.find_element(:xpath, '//*[@type="checkbox" and @name="accept_agreement"]').click
|
1229
|
+
sleep(1)
|
1226
1230
|
rescue
|
1227
1231
|
begin
|
1228
|
-
@driver.find_element(:xpath, '//*[@
|
1232
|
+
el = @driver.find_element(:xpath, '//*[@type="checkbox"]')
|
1233
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1234
|
+
sleep(1)
|
1235
|
+
@driver.find_element(:xpath, '//*[@type="checkbox"]').click
|
1236
|
+
sleep(1)
|
1229
1237
|
rescue
|
1230
1238
|
begin
|
1231
|
-
@driver.find_element(:
|
1239
|
+
el = @driver.find_element(:xpath, '//*[@id="accept_agree"]')
|
1240
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1241
|
+
sleep(1)
|
1242
|
+
@driver.find_element(:xpath, '//*[@id="accept_agree"]').click
|
1243
|
+
sleep(1)
|
1232
1244
|
rescue
|
1233
1245
|
begin
|
1234
|
-
@driver.find_element(:
|
1246
|
+
el = @driver.find_element(:partial_link_text, ' 약관에 동의합니다.')
|
1247
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1248
|
+
sleep(1)
|
1249
|
+
@driver.find_element(:partial_link_text, ' 약관에 동의합니다.').click #요소같고 텍스트가 다를때 텍스트로 타겟
|
1250
|
+
sleep(1)
|
1235
1251
|
rescue
|
1236
1252
|
begin
|
1237
|
-
@driver.find_element(:xpath, '//*[@
|
1253
|
+
el = @driver.find_element(:xpath, '//*[@class="ico-checkbox helper-checks helper-checks-checkbox-chk_term"]')
|
1254
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1255
|
+
sleep(1)
|
1256
|
+
@driver.find_element(:xpath, '//*[@class="ico-checkbox helper-checks helper-checks-checkbox-chk_term"]').click
|
1257
|
+
sleep(1)
|
1238
1258
|
rescue
|
1239
1259
|
begin
|
1240
|
-
@driver.find_element(:xpath, '//*[@id="
|
1260
|
+
el = @driver.find_element(:xpath, '//*[@id="accept_agreement_1"]')
|
1261
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1262
|
+
sleep(1)
|
1263
|
+
@driver.find_element(:xpath, '//*[@id="accept_agreement_1"]').click
|
1264
|
+
sleep(1)
|
1241
1265
|
rescue
|
1242
1266
|
begin
|
1243
|
-
@driver.find_element(:xpath, '//*[@
|
1267
|
+
el = @driver.find_element(:xpath, '//*[@id="agree"]')
|
1268
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1269
|
+
sleep(1)
|
1270
|
+
@driver.find_element(:xpath, '//*[@id="agree"]').click
|
1271
|
+
sleep(1)
|
1244
1272
|
rescue
|
1245
|
-
|
1273
|
+
begin
|
1274
|
+
el = @driver.find_element(:xpath, '//*[@name="check_2"]')
|
1275
|
+
@driver.execute_script("arguments[0].scrollIntoView({behavior: 'smooth', block: 'center', inline: 'center'});", el)
|
1276
|
+
sleep(1)
|
1277
|
+
@driver.find_element(:xpath, '//*[@name="check_2"]').click
|
1278
|
+
sleep(1)
|
1279
|
+
rescue
|
1280
|
+
|
1281
|
+
end
|
1246
1282
|
end
|
1247
1283
|
end
|
1248
1284
|
end
|
@@ -1264,7 +1300,11 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1264
1300
|
|
1265
1301
|
##아이디 입력 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
1266
1302
|
puts '-[√] 아이디 입력 시도.......'.yellow
|
1267
|
-
|
1303
|
+
letters = ('a'..'z').to_a.sample(7).join
|
1304
|
+
numbers = ('0'..'9').to_a.sample(7).join
|
1305
|
+
user_id = letters + numbers
|
1306
|
+
|
1307
|
+
|
1268
1308
|
begin
|
1269
1309
|
@driver.find_element(:xpath, '//*[@id="reg_mb_id"]').send_keys(user_id)
|
1270
1310
|
rescue
|
@@ -1346,7 +1386,12 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1346
1386
|
|
1347
1387
|
##비밀번호 입력 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
1348
1388
|
puts '-[√] 비밀번호 1회 입력 시도.......'.yellow
|
1349
|
-
|
1389
|
+
letters = ('a'..'z').to_a.sample(7).join
|
1390
|
+
numbers = ('0'..'9').to_a.sample(7).join
|
1391
|
+
user_pw = letters + numbers
|
1392
|
+
begin
|
1393
|
+
@driver.find_element(:xpath, '//*[@type="password" and @name="password" and @id="password"]').send_keys(user_pw)
|
1394
|
+
rescue
|
1350
1395
|
begin
|
1351
1396
|
@driver.find_element(:xpath, '//*[@id="reg_mb_password"]').send_keys(user_pw)
|
1352
1397
|
rescue
|
@@ -1384,6 +1429,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1384
1429
|
end
|
1385
1430
|
end
|
1386
1431
|
end
|
1432
|
+
end
|
1387
1433
|
sleep(1)
|
1388
1434
|
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
1389
1435
|
##비밀번호2 입력 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
@@ -1452,7 +1498,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1452
1498
|
@driver.find_element(:xpath, '//*[@id="customerName"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1453
1499
|
rescue
|
1454
1500
|
begin
|
1455
|
-
@driver.find_element(:xpath, '//*[@id="
|
1501
|
+
@driver.find_element(:xpath, '//*[@id="user_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1456
1502
|
rescue
|
1457
1503
|
begin
|
1458
1504
|
@driver.find_element(:xpath, '//*[@id="reg_mb_signature "]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
@@ -1461,7 +1507,7 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1461
1507
|
@driver.find_element(:xpath, '//*[@id="reg_mb_5"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1462
1508
|
rescue
|
1463
1509
|
begin
|
1464
|
-
@driver.find_element(:xpath, '//*[@id="
|
1510
|
+
@driver.find_element(:xpath, '//*[@id="find_account_answer"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1465
1511
|
rescue
|
1466
1512
|
begin
|
1467
1513
|
@driver.find_element(:xpath, '//*[@id="mb_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
@@ -1472,7 +1518,11 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1472
1518
|
begin
|
1473
1519
|
@driver.find_element(:xpath, '//*[@name="first_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1474
1520
|
rescue
|
1521
|
+
begin
|
1522
|
+
@driver.find_element(:xpath, '//*[@name="user_name" and @id="user_name"]').send_keys(''+name1_value+''+name2_value+''+name3_value+'')
|
1523
|
+
rescue
|
1475
1524
|
|
1525
|
+
end
|
1476
1526
|
end
|
1477
1527
|
end
|
1478
1528
|
end
|
@@ -1545,7 +1595,12 @@ def update(user_id, user_pw, title, content, option, post_url, signup_url, login
|
|
1545
1595
|
@driver.find_element(:xpath, '//*[@x-on:click="checkNameDup()"]').click
|
1546
1596
|
sleep(2)
|
1547
1597
|
rescue
|
1548
|
-
|
1598
|
+
begin
|
1599
|
+
@driver.find_element(:partial_link_text, '중복 검사').click
|
1600
|
+
sleep(2)
|
1601
|
+
rescue
|
1602
|
+
|
1603
|
+
end
|
1549
1604
|
end
|
1550
1605
|
end
|
1551
1606
|
end
|
@@ -3052,6 +3107,14 @@ login_url = option['login_url'].to_s
|
|
3052
3107
|
rescue
|
3053
3108
|
end
|
3054
3109
|
|
3110
|
+
begin
|
3111
|
+
|
3112
|
+
chat_box = @driver.find_elements(:xpath, '//*[@class="google-auto-placed"]')[3]
|
3113
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
3114
|
+
puts '-[√] 숨김 code 7 제거 완료.......'.green
|
3115
|
+
sleep(1)
|
3116
|
+
rescue
|
3117
|
+
end
|
3055
3118
|
|
3056
3119
|
|
3057
3120
|
##팝업 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
@@ -3742,6 +3805,21 @@ login_url = option['login_url'].to_s
|
|
3742
3805
|
@driver.find_element(:xpath, '//*[@fw-label="아이디"]').send_keys(user_id)
|
3743
3806
|
sleep(3)
|
3744
3807
|
rescue
|
3808
|
+
begin
|
3809
|
+
@driver.find_element(:xpath, '//*[@name="username-41"]').send_keys(user_id)
|
3810
|
+
sleep(3)
|
3811
|
+
rescue
|
3812
|
+
begin
|
3813
|
+
@driver.find_element(:xpath, '//*[@id="user" and @name="user"]').send_keys(user_id)
|
3814
|
+
sleep(3)
|
3815
|
+
rescue
|
3816
|
+
begin
|
3817
|
+
@driver.find_element(:xpath, '//*[@for="login_id"]').send_keys(user_id)
|
3818
|
+
sleep(3)
|
3819
|
+
rescue
|
3820
|
+
end
|
3821
|
+
end
|
3822
|
+
end
|
3745
3823
|
end
|
3746
3824
|
end
|
3747
3825
|
end
|
@@ -3865,8 +3943,13 @@ login_url = option['login_url'].to_s
|
|
3865
3943
|
@driver.find_element(:xpath, '//*[@id="login_mb_password2"]').send_keys(user_pw)
|
3866
3944
|
sleep(1)
|
3867
3945
|
rescue
|
3868
|
-
|
3869
|
-
@driver.
|
3946
|
+
begin
|
3947
|
+
@driver.find_element(:xpath, '//*[@name="user_password-41"]').send_keys(user_pw)
|
3948
|
+
sleep(1)
|
3949
|
+
rescue
|
3950
|
+
|
3951
|
+
@driver.action.key_down(:tab).key_up(:tab).perform #x탭
|
3952
|
+
end
|
3870
3953
|
end
|
3871
3954
|
end
|
3872
3955
|
end
|
@@ -3936,63 +4019,75 @@ login_url = option['login_url'].to_s
|
|
3936
4019
|
sleep(3)
|
3937
4020
|
rescue
|
3938
4021
|
begin
|
3939
|
-
@driver.find_element(xpath: "
|
4022
|
+
@driver.find_element(xpath: '//*[@type="submit" and @class="v-btn-neutral mt-4 mb-2"]').click
|
3940
4023
|
puts '-[√] 로그인 버튼 코드 8 타겟.......'.cyan
|
3941
4024
|
sleep(3)
|
3942
4025
|
rescue
|
3943
4026
|
begin
|
3944
|
-
@driver.find_element(:
|
3945
|
-
puts '-[√] 로그인 버튼 코드
|
4027
|
+
@driver.find_element(xpath: "//button[contains(text(), '로그인')]").click
|
4028
|
+
puts '-[√] 로그인 버튼 코드 9 타겟.......'.cyan
|
3946
4029
|
sleep(3)
|
3947
4030
|
rescue
|
3948
4031
|
begin
|
3949
|
-
@driver.find_element(:xpath, '//*[@
|
3950
|
-
puts '-[√] 로그인 버튼 코드
|
4032
|
+
@driver.find_element(:xpath, '//*[@alt="로그인"]').click
|
4033
|
+
puts '-[√] 로그인 버튼 코드 10 타겟.......'.cyan
|
3951
4034
|
sleep(3)
|
3952
4035
|
rescue
|
3953
4036
|
begin
|
3954
|
-
@driver.find_element(:xpath, '//*[@id="
|
3955
|
-
puts '-[√] 로그인 버튼 코드
|
4037
|
+
@driver.find_element(:xpath, '//*[@id="mb_login"]/form/div[5]/button').click
|
4038
|
+
puts '-[√] 로그인 버튼 코드 11 타겟.......'.cyan
|
3956
4039
|
sleep(3)
|
3957
4040
|
rescue
|
3958
4041
|
begin
|
3959
|
-
@driver.find_element(:xpath, '//*[@
|
3960
|
-
puts '-[√] 로그인 버튼 코드
|
4042
|
+
@driver.find_element(:xpath, '//*[@id="ol_submit"]').click
|
4043
|
+
puts '-[√] 로그인 버튼 코드 12 타겟.......'.cyan
|
3961
4044
|
sleep(3)
|
3962
4045
|
rescue
|
3963
4046
|
begin
|
3964
|
-
@driver.find_element(:xpath, '//*[@
|
3965
|
-
puts '-[√] 로그인 버튼 코드
|
4047
|
+
@driver.find_element(:xpath, '//*[@alt="login"]').click
|
4048
|
+
puts '-[√] 로그인 버튼 코드 13 타겟.......'.cyan
|
3966
4049
|
sleep(3)
|
3967
4050
|
rescue
|
3968
4051
|
begin
|
3969
|
-
@driver.find_element(:xpath, '//*[@
|
3970
|
-
puts '-[√] 로그인 버튼 코드
|
4052
|
+
@driver.find_element(:xpath, '//*[@title="login"]').click
|
4053
|
+
puts '-[√] 로그인 버튼 코드 14 타겟.......'.cyan
|
3971
4054
|
sleep(3)
|
3972
4055
|
rescue
|
3973
4056
|
begin
|
3974
|
-
@driver.find_element(:xpath, '//*[@id="
|
3975
|
-
puts '-[√] 로그인 버튼 코드
|
4057
|
+
@driver.find_element(:xpath, '//*[@id="signIn_1"]').click
|
4058
|
+
puts '-[√] 로그인 버튼 코드 15 타겟.......'.cyan
|
3976
4059
|
sleep(3)
|
3977
4060
|
rescue
|
3978
4061
|
begin
|
3979
|
-
@driver.find_element(:xpath, '//*[@
|
3980
|
-
puts '-[√] 로그인 버튼 코드
|
4062
|
+
@driver.find_element(:xpath, '//*[@id="btn_login"]').click
|
4063
|
+
puts '-[√] 로그인 버튼 코드 16 타겟.......'.cyan
|
3981
4064
|
sleep(3)
|
3982
4065
|
rescue
|
3983
4066
|
begin
|
3984
|
-
@driver.find_element(:xpath, '//*[@
|
3985
|
-
puts '-[√] 로그인 버튼 코드
|
4067
|
+
@driver.find_element(:xpath, '//*[@name="wp-submit"]').click
|
4068
|
+
puts '-[√] 로그인 버튼 코드 17 타겟.......'.cyan
|
3986
4069
|
sleep(3)
|
3987
4070
|
rescue
|
3988
4071
|
begin
|
3989
|
-
@driver.find_element(:xpath, '//*[@
|
3990
|
-
puts '-[√] 로그인 버튼 코드
|
4072
|
+
@driver.find_element(:xpath, '//*[@id="um-submit-btn"]').click
|
4073
|
+
puts '-[√] 로그인 버튼 코드 18 타겟.......'.cyan
|
3991
4074
|
sleep(3)
|
3992
4075
|
rescue
|
3993
|
-
|
3994
|
-
|
3995
|
-
|
4076
|
+
begin
|
4077
|
+
@driver.find_element(:xpath, '//*[@class="left_login_box"]//*[@class="left_login_btn"]').click
|
4078
|
+
puts '-[√] 로그인 버튼 코드 19 타겟.......'.cyan
|
4079
|
+
sleep(3)
|
4080
|
+
rescue
|
4081
|
+
begin
|
4082
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-color"]').click
|
4083
|
+
puts '-[√] 로그인 버튼 코드 20 타겟.......'.cyan
|
4084
|
+
sleep(3)
|
4085
|
+
rescue
|
4086
|
+
|
4087
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
4088
|
+
sleep(3)
|
4089
|
+
end
|
4090
|
+
end
|
3996
4091
|
end
|
3997
4092
|
end
|
3998
4093
|
end
|
@@ -4110,7 +4205,8 @@ begin
|
|
4110
4205
|
##캡챠 해제 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
4111
4206
|
begin
|
4112
4207
|
sleep(5)
|
4113
|
-
|
4208
|
+
|
4209
|
+
|
4114
4210
|
|
4115
4211
|
# 타임아웃을 3초로 설정
|
4116
4212
|
wait = Selenium::WebDriver::Wait.new(:timeout => 3)
|
@@ -4189,30 +4285,54 @@ begin
|
|
4189
4285
|
|
4190
4286
|
|
4191
4287
|
##출석 체크 입력 코드 부분─────────────────────────────────────────────────────────────────────>
|
4192
|
-
cctxt_value = ['ㅊㅊ','출석체크','
|
4288
|
+
cctxt_value = ['ㅊㅊ','출석체크','출석체크해요','출첵~','추추','출석~','출석체크하고가요','출석합니다.','안녕하세요','출첵왔어요','출석체크합니다.','출석체크~','출석했어요','출첵!!','출석체크~,','출석도장쾅~!','출석도장쾅쾅!!','출석하고가요','출첵^^*','출석체크~!^^','^^','^*^','출첵*_*','추추^^*'].sample
|
4193
4289
|
begin
|
4290
|
+
@driver.find_element(:xpath, '//*[@id="wr_content"]').clear
|
4291
|
+
sleep(1)
|
4194
4292
|
@driver.find_element(:xpath, '//*[@id="wr_content"]').send_keys(cctxt_value)
|
4293
|
+
sleep(5)
|
4195
4294
|
rescue
|
4196
4295
|
begin
|
4197
|
-
|
4296
|
+
@driver.find_element(:xpath, '//*[@name="wr_content"]').clear
|
4297
|
+
sleep(1)
|
4298
|
+
@driver.find_element(:xpath, '//*[@name="wr_content"]').send_keys(cctxt_value)
|
4299
|
+
sleep(5)
|
4198
4300
|
rescue
|
4199
4301
|
begin
|
4200
|
-
|
4302
|
+
@driver.find_element(:xpath, '//*[@class="form-control input-sm"]').clear
|
4303
|
+
sleep(1)
|
4304
|
+
@driver.find_element(:xpath, '//*[@class="form-control input-sm"]').send_keys(cctxt_value)
|
4305
|
+
sleep(5)
|
4201
4306
|
rescue
|
4202
4307
|
begin
|
4203
|
-
|
4308
|
+
@driver.find_element(:xpath, '//*[@name="greetings"]').clear
|
4309
|
+
sleep(1)
|
4310
|
+
@driver.find_element(:xpath, '//*[@name="greetings"]').send_keys(cctxt_value)
|
4311
|
+
sleep(5)
|
4204
4312
|
rescue
|
4205
4313
|
begin
|
4206
|
-
|
4314
|
+
@driver.find_element(:xpath, '//*[@id="greetings"]').clear
|
4315
|
+
sleep(1)
|
4316
|
+
@driver.find_element(:xpath, '//*[@id="greetings"]').send_keys(cctxt_value)
|
4317
|
+
sleep(5)
|
4207
4318
|
rescue
|
4208
4319
|
begin
|
4209
|
-
|
4320
|
+
@driver.find_element(:xpath, '//*[@id="subject"]').clear
|
4321
|
+
sleep(1)
|
4322
|
+
@driver.find_element(:xpath, '//*[@id="subject"]').send_keys(cctxt_value)
|
4323
|
+
sleep(5)
|
4210
4324
|
rescue
|
4211
4325
|
begin
|
4212
|
-
|
4326
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').clear
|
4327
|
+
sleep(1)
|
4328
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys(cctxt_value)
|
4329
|
+
sleep(5)
|
4213
4330
|
rescue
|
4214
4331
|
begin
|
4215
|
-
|
4332
|
+
@driver.find_element(:xpath, '//*[@placeholder="인사말"]').clear
|
4333
|
+
sleep(1)
|
4334
|
+
@driver.find_element(:xpath, '//*[@placeholder="인사말"]').send_keys(cctxt_value)
|
4335
|
+
sleep(5)
|
4216
4336
|
rescue
|
4217
4337
|
|
4218
4338
|
end
|
@@ -4275,9 +4395,19 @@ begin
|
|
4275
4395
|
@driver.find_element(:xpath, '//*[@value="출석하기"]').click
|
4276
4396
|
sleep(5)
|
4277
4397
|
rescue
|
4278
|
-
|
4279
|
-
|
4280
|
-
|
4398
|
+
begin
|
4399
|
+
@driver.find_element(:xpath, '//*[@class="attnd-btn"]').click
|
4400
|
+
sleep(5)
|
4401
|
+
rescue
|
4402
|
+
begin
|
4403
|
+
@driver.find_element(:xpath, '//*[@id="my" and @onclick="gold_chk()" and @class="myButton"]').click
|
4404
|
+
sleep(5)
|
4405
|
+
rescue
|
4406
|
+
sleep(1)
|
4407
|
+
@driver.action.key_down(:enter).key_up(:enter).perform
|
4408
|
+
sleep(5)
|
4409
|
+
end
|
4410
|
+
end
|
4281
4411
|
end
|
4282
4412
|
end
|
4283
4413
|
end
|
@@ -4321,9 +4451,11 @@ post_url = option['post_url'].to_s
|
|
4321
4451
|
if post_url == '' or post_url == '게시판 글쓰기 url'
|
4322
4452
|
|
4323
4453
|
else
|
4454
|
+
@driver.get(post_url)
|
4455
|
+
sleep(1)
|
4324
4456
|
@driver.get(post_url)
|
4325
4457
|
puts '-[√] 게시판 페이지 URL 이동.......'.magenta
|
4326
|
-
|
4458
|
+
|
4327
4459
|
|
4328
4460
|
|
4329
4461
|
|
@@ -4761,9 +4893,21 @@ post_url = option['post_url'].to_s
|
|
4761
4893
|
rescue
|
4762
4894
|
end
|
4763
4895
|
|
4896
|
+
begin
|
4897
|
+
chat_box = @driver.find_element(:xpath, '//*[@data-id="eb97bcb" and @data-element_type="section"]')
|
4898
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
4899
|
+
|
4900
|
+
sleep(1)
|
4901
|
+
rescue
|
4902
|
+
end
|
4903
|
+
|
4904
|
+
|
4905
|
+
|
4906
|
+
|
4764
4907
|
end
|
4765
4908
|
|
4766
4909
|
|
4910
|
+
|
4767
4911
|
|
4768
4912
|
##팝업 코드 확인 및 제거 부분─────────────────────────────────────────────────────────────────────>
|
4769
4913
|
|
@@ -6260,15 +6404,7 @@ begin
|
|
6260
6404
|
rescue
|
6261
6405
|
end
|
6262
6406
|
|
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
|
6407
|
+
|
6272
6408
|
|
6273
6409
|
|
6274
6410
|
|
@@ -6529,22 +6665,28 @@ begin
|
|
6529
6665
|
@driver.find_element(:xpath, '//*[@name="board_subject"]').send_keys(title)
|
6530
6666
|
sleep(1)
|
6531
6667
|
puts '-[√] 제목 code 45.......'.yellow
|
6532
|
-
rescue
|
6533
|
-
|
6534
|
-
|
6535
|
-
|
6536
|
-
|
6537
|
-
|
6538
|
-
|
6539
|
-
|
6540
|
-
|
6541
|
-
|
6542
|
-
|
6543
|
-
|
6668
|
+
rescue
|
6669
|
+
begin
|
6670
|
+
@driver.find_element(:xpath, '//*[@id="csTitle"]').send_keys(title)
|
6671
|
+
sleep(1)
|
6672
|
+
puts '-[√] 제목 code 45.......'.yellow
|
6673
|
+
rescue => e
|
6674
|
+
puts '-[√] 제목 입력 항목 코드 탐색 실패!!.......'.red
|
6675
|
+
puts '-[√] 다음 작업 준비 중으로 1~60 초 정도 기다려주세요.......'.red
|
6676
|
+
|
6677
|
+
@driver.window_handles.each do |handle|
|
6678
|
+
@driver.switch_to.window(handle)
|
6679
|
+
begin
|
6680
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
6681
|
+
@driver.close
|
6682
|
+
|
6683
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
6684
|
+
puts "크롬 브라우저 종료: #{e.message}"
|
6685
|
+
end
|
6544
6686
|
end
|
6545
|
-
|
6546
|
-
|
6547
|
-
|
6687
|
+
return 0
|
6688
|
+
@driver.quit
|
6689
|
+
end
|
6548
6690
|
end
|
6549
6691
|
end
|
6550
6692
|
end
|
@@ -6596,7 +6738,6 @@ begin
|
|
6596
6738
|
sleep(1)
|
6597
6739
|
##<─────────────────────────────────────────────────────────────────────제목 입력 코드 부분
|
6598
6740
|
|
6599
|
-
|
6600
6741
|
##HTML 버튼 코드 부분─────────────────────────────────────────────────────────────────────>
|
6601
6742
|
# puts '-[√] HTML 코드 변경 버튼 탐색 시작.......'.yellow
|
6602
6743
|
|
@@ -6954,338 +7095,347 @@ begin
|
|
6954
7095
|
|
6955
7096
|
##<─────────────────────────────────────────────────────────────────────HTML 버튼 코드 부분
|
6956
7097
|
|
6957
|
-
|
6958
|
-
|
6959
|
-
|
7098
|
+
begin
|
7099
|
+
#요소 자체 제거 하기 기능
|
7100
|
+
chat_box = @driver.find_element(:xpath, '//*[@title="reCAPTCHA"]')
|
7101
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
7102
|
+
puts '방해 code 제거 완료.......'.green
|
7103
|
+
sleep(1)
|
7104
|
+
rescue
|
7105
|
+
end
|
6960
7106
|
##내용 입력 필드 코드 부분─────────────────────────────────────────────────────────────────────>
|
6961
7107
|
#puts '-[√] 내용 입력 부분 탐색 시작.......'.yellow
|
6962
7108
|
#sleep(1)
|
6963
7109
|
|
6964
7110
|
begin
|
6965
|
-
|
6966
|
-
|
6967
|
-
|
7111
|
+
@driver.find_element(:xpath, '//*[@name="content"]').click
|
7112
|
+
sleep(1)
|
7113
|
+
puts '내용 항목 코드 타겟 1.......'.red
|
6968
7114
|
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
|
-
|
7115
|
+
begin
|
7116
|
+
@driver.find_element(:xpath, '//*[@class="note-codable"]').click
|
7117
|
+
sleep(1)
|
7118
|
+
puts '내용 항목 코드 타겟 2.......'.red
|
7119
|
+
rescue
|
7120
|
+
begin
|
7121
|
+
#아이프레임에서 코드 선택
|
7122
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="content_IFRAME"]'))
|
7123
|
+
@driver.find_element(:xpath, '//*[@id="content_BODY"]').click
|
7124
|
+
#아이프레임 나오기
|
7125
|
+
@driver.switch_to.default_content()
|
7126
|
+
sleep(1)
|
7127
|
+
puts '내용 항목 코드 타겟 3.......'.red
|
7128
|
+
rescue
|
7129
|
+
begin
|
7130
|
+
@driver.find_element(:xpath, '//*[@class="wr_content"]').click
|
7131
|
+
sleep(1)
|
7132
|
+
puts '내용 항목 코드 타겟 4.......'.red
|
7133
|
+
rescue
|
7134
|
+
begin
|
7135
|
+
@driver.find_element(:xpath, '//*[@id="wr_content"]').click
|
7136
|
+
sleep(1)
|
7137
|
+
puts '내용 항목 코드 타겟 5.......'.red
|
7138
|
+
rescue
|
7139
|
+
begin
|
7140
|
+
@driver.find_element(:xpath, '//*[@name="wr_content"]').click
|
7141
|
+
sleep(1)
|
7142
|
+
puts '내용 항목 코드 타겟 6.......'.red
|
7143
|
+
rescue
|
7144
|
+
begin
|
7145
|
+
#아이프레임에서 코드 선택
|
7146
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
7147
|
+
@driver.find_element(:xpath, '/html').click
|
7148
|
+
#아이프레임 나오기
|
7149
|
+
@driver.switch_to.default_content()
|
7150
|
+
sleep(1)
|
7151
|
+
puts '내용 항목 코드 타겟 7.......'.red
|
7152
|
+
rescue
|
7153
|
+
begin
|
7154
|
+
@driver.find_element(:xpath, '//*[@id="edit_contents_textareaBox"]/td/textarea').click
|
7155
|
+
sleep(1)
|
7156
|
+
puts '내용 항목 코드 타겟 8.......'.red
|
7157
|
+
rescue
|
7158
|
+
begin
|
7159
|
+
@driver.find_element(:xpath, '//*[@name="kboard_content"]').click
|
7160
|
+
sleep(1)
|
7161
|
+
puts '내용 항목 코드 타겟 9.......'.red
|
7162
|
+
rescue
|
7163
|
+
begin
|
7164
|
+
@driver.find_element(:xpath, '//*[@class="kboard-content"]').click
|
7165
|
+
sleep(1)
|
7166
|
+
puts '내용 항목 코드 타겟 9-1.......'.red
|
7167
|
+
rescue
|
7168
|
+
begin
|
7169
|
+
#아이프레임에서 코드 선택
|
7170
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
7171
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집 모드"]').click
|
7172
|
+
#아이프레임 나오기
|
7173
|
+
@driver.switch_to.default_content()
|
7174
|
+
sleep(1)
|
7175
|
+
puts '내용 항목 코드 타겟 10.......'.red
|
7176
|
+
rescue
|
7177
|
+
begin
|
7178
|
+
@driver.find_element(:xpath, '//*[@title="리치 텍스트 편집기, content"]').click
|
7179
|
+
sleep(1)
|
7180
|
+
puts '내용 항목 코드 타겟 11.......'.red
|
7181
|
+
rescue
|
7182
|
+
begin
|
7183
|
+
@driver.find_element(:xpath, '//*[@aria-label="리치 텍스트 편집기, content"]').click
|
7184
|
+
sleep(1)
|
7185
|
+
puts '내용 항목 코드 타겟 12.......'.red
|
7186
|
+
rescue
|
7187
|
+
begin
|
7188
|
+
@driver.find_element(:xpath, '//*[@aria-label="리치 텍스트 편집기, editor1"]').click
|
7189
|
+
sleep(1)
|
7190
|
+
puts '내용 항목 코드 타겟 13.......'.red
|
7191
|
+
rescue
|
7192
|
+
begin
|
7193
|
+
@driver.find_element(:xpath, '//*[@title="리치 텍스트 편집기, editor1"]').click
|
7194
|
+
sleep(1)
|
7195
|
+
puts '내용 항목 코드 타겟 14.......'.red
|
7196
|
+
rescue
|
7197
|
+
begin
|
7198
|
+
@driver.find_element(:xpath, '//*[@id="cke_1_contents"]/textarea]').click
|
7199
|
+
sleep(1)
|
7200
|
+
puts '내용 항목 코드 타겟 15.......'.red
|
7201
|
+
rescue
|
7202
|
+
begin
|
7203
|
+
@driver.find_element(:xpath, '//*[@placeholder="내용을 구체적으로 등록해 주세요."]').click
|
7204
|
+
sleep(1)
|
7205
|
+
puts '내용 항목 코드 타겟 16.......'.red
|
7206
|
+
rescue
|
7207
|
+
begin
|
7208
|
+
@driver.find_element(:xpath, '//*[@class="fr-code"]').click
|
7209
|
+
sleep(1)
|
7210
|
+
puts '내용 항목 코드 타겟 17.......'.red
|
7211
|
+
rescue
|
7212
|
+
begin
|
7213
|
+
@driver.find_element(:xpath, '//*[@title="내용"]').click
|
7214
|
+
sleep(1)
|
7215
|
+
puts '내용 항목 코드 타겟 18.......'.red
|
7216
|
+
rescue
|
7217
|
+
begin
|
7218
|
+
@driver.find_element(:xpath, '//*[@class="cheditor-editarea-text-content"]').click
|
7219
|
+
sleep(1)
|
7220
|
+
puts '내용 항목 코드 타겟 19.......'.red
|
7221
|
+
rescue
|
7222
|
+
begin
|
7223
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="bowrite_content"]/div/iframe"]'))
|
7224
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집 모드"]').click
|
7225
|
+
@driver.switch_to.default_content()
|
7226
|
+
sleep(1)
|
7227
|
+
puts '내용 항목 코드 타겟 20.......'.red
|
7228
|
+
rescue
|
7229
|
+
begin
|
7230
|
+
@driver.find_element(:xpath, '//*[@class="CodeMirror-lines"]').click
|
7231
|
+
sleep(1)
|
7232
|
+
puts '내용 항목 코드 타겟 21.......'.red
|
7233
|
+
rescue
|
7234
|
+
begin
|
7235
|
+
@driver.find_element(:xpath, '//*[@id="tx_canvas_source"]').click
|
7236
|
+
sleep(1)
|
7237
|
+
puts '내용 항목 코드 타겟 22.......'.red
|
7238
|
+
rescue
|
7239
|
+
begin
|
7240
|
+
@driver.find_element(:xpath, '//*[@class="note-editable"]').click
|
7241
|
+
sleep(1)
|
7242
|
+
puts '내용 항목 코드 타겟 23.......'.red
|
7243
|
+
rescue
|
7244
|
+
begin
|
7245
|
+
@driver.find_element(:xpath, '//*[@id="simpleeditor_instance_3"]').click
|
7246
|
+
sleep(1)
|
7247
|
+
puts '내용 항목 코드 타겟 23-1.......'.red
|
7248
|
+
rescue
|
7249
|
+
begin
|
7250
|
+
@driver.find_element(:xpath, '//*[@role="textbox"]').click
|
7251
|
+
sleep(1)
|
7252
|
+
puts '내용 항목 코드 타겟 24.......'.red
|
7253
|
+
rescue
|
7254
|
+
begin
|
7255
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="cke_1_contents"]/iframe'))
|
7256
|
+
@driver.find_element(:xpath, '/html').click
|
7257
|
+
sleep(1)
|
7258
|
+
puts '내용 항목 코드 타겟 25.......'.red
|
7259
|
+
rescue
|
7260
|
+
begin
|
7261
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="b_content_ifr"]'))
|
7262
|
+
@driver.find_element(:xpath, '//*[@id="tinymce"]').click
|
7263
|
+
sleep(1)
|
7264
|
+
puts '내용 항목 코드 타겟 26.......'.red
|
7265
|
+
rescue
|
7266
|
+
begin
|
7267
|
+
@driver.find_element(:xpath, '//*[@id="com_txt_box"]').click
|
7268
|
+
sleep(1)
|
7269
|
+
puts '내용 항목 코드 타겟 27.......'.red
|
7270
|
+
rescue
|
7271
|
+
begin
|
7272
|
+
@driver.find_element(:xpath, '//*[@aria-label="Source code editing area"]').click
|
7273
|
+
sleep(1)
|
7274
|
+
puts '내용 항목 코드 타겟 28.......'.red
|
7275
|
+
rescue
|
7276
|
+
begin
|
7277
|
+
@driver.find_element(:xpath, '//*[@title="리치 텍스트 편집기, postContent"]').click
|
7278
|
+
sleep(1)
|
7279
|
+
puts '내용 항목 코드 타겟 29.......'.red
|
7280
|
+
rescue
|
7281
|
+
begin
|
7282
|
+
@driver.find_element(:xpath, '//*[@id="post_body"]/div[1]/div').click
|
7283
|
+
sleep(1)
|
7284
|
+
puts '내용 항목 코드 타겟 30.......'.red
|
7285
|
+
rescue
|
7286
|
+
begin
|
7287
|
+
@driver.find_element(:xpath, '//*[@class="fr-element fr-view"]').click
|
7288
|
+
sleep(1)
|
7289
|
+
puts '내용 항목 코드 타겟 31.......'.red
|
7290
|
+
rescue
|
7291
|
+
begin
|
7292
|
+
@driver.find_element(:xpath, '//*[@id="CONTENT"]').click
|
7293
|
+
sleep(1)
|
7294
|
+
puts '내용 항목 코드 타겟 32.......'.red
|
7295
|
+
rescue
|
7296
|
+
begin
|
7297
|
+
@driver.find_element(:xpath, '//*[@id="div_text"]').click
|
7298
|
+
sleep(1)
|
7299
|
+
puts '내용 항목 코드 타겟 33.......'.red
|
7300
|
+
rescue
|
7301
|
+
begin
|
7302
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@frameborder="0"]'))
|
7303
|
+
sleep(1)
|
7304
|
+
@driver.find_element(:xpath, '/html/body').click
|
7305
|
+
sleep(1)
|
7306
|
+
puts '내용 항목 코드 타겟 34.......'.red
|
7307
|
+
rescue
|
7308
|
+
begin
|
7309
|
+
@driver.find_element(:xpath, '//*[@class="b_textarea"]').click
|
7310
|
+
puts '내용 항목 코드 타겟 35.......'.red
|
7311
|
+
rescue
|
7312
|
+
begin
|
7313
|
+
@driver.find_element(:xpath, '/html/body/div[1]/div[2]/div/div/section/form/div[4]/div/textarea').click
|
7314
|
+
sleep(1)
|
7315
|
+
puts '내용 항목 코드 타겟 36.......'.red
|
7316
|
+
rescue
|
7317
|
+
begin
|
7318
|
+
@driver.find_element(:xpath, '//textarea[@name="comment"]').click
|
7319
|
+
sleep(1)
|
7320
|
+
puts '내용 항목 코드 타겟 37.......'.red
|
7321
|
+
rescue
|
7322
|
+
begin
|
7323
|
+
@driver.find_element(:xpath, '//*[@class="CodeMirror-lines"]').click
|
7324
|
+
sleep(1)
|
7325
|
+
puts '내용 항목 코드 타겟 38.......'.red
|
7326
|
+
rescue
|
7327
|
+
begin
|
7328
|
+
@driver.find_element(:xpath, '//textarea[@id="kboard_content"]').click
|
7329
|
+
sleep(1)
|
7330
|
+
puts '내용 항목 코드 타겟 39.......'.red
|
7331
|
+
rescue
|
7332
|
+
begin
|
7333
|
+
@driver.find_element(:xpath, '//textarea[@class="editor-textarea "]').click
|
7334
|
+
sleep(1)
|
7335
|
+
puts '내용 항목 코드 타겟 40.......'.red
|
7336
|
+
rescue
|
7337
|
+
begin
|
7338
|
+
@driver.find_element(:xpath, '//textarea[@name="kboard_content"]').click
|
7339
|
+
sleep(1)
|
7340
|
+
puts '내용 항목 코드 타겟 41.......'.red
|
7341
|
+
rescue
|
7342
|
+
begin
|
7343
|
+
@driver.find_element(:xpath, '//*[@class="kboard-attr-row kboard-attr-content required"]').click
|
7344
|
+
sleep(1)
|
7345
|
+
puts '내용 항목 코드 타겟 42.......'.red
|
7346
|
+
rescue
|
7347
|
+
begin
|
7348
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@id="NamoSE_Ifr__editor"]'))
|
7349
|
+
@driver.find_element(:xpath, '//*[@class="hide-vertical-guideline ruler-hidden"]').click
|
7350
|
+
sleep(1)
|
7351
|
+
@driver.switch_to.default_content
|
7352
|
+
puts '내용 항목 코드 타겟 43.......'.red
|
7353
|
+
rescue
|
7354
|
+
begin
|
7355
|
+
@driver.find_element(:xpath, '//*[@placeholder="내용"]').click
|
7356
|
+
sleep(1)
|
7357
|
+
puts '내용 항목 코드 타겟 44.......'.red
|
7358
|
+
rescue
|
7359
|
+
begin
|
7360
|
+
@driver.find_element(:xpath, '//*[@align="center"]').click
|
7361
|
+
sleep(1)
|
7362
|
+
puts '내용 항목 코드 타겟 45.......'.red
|
7363
|
+
rescue
|
7364
|
+
begin
|
7365
|
+
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
7366
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집 모드"]').click
|
7367
|
+
sleep(1)
|
7368
|
+
@driver.switch_to.default_content
|
7369
|
+
puts '내용 항목 코드 타겟 46.......'.red
|
7370
|
+
rescue
|
7371
|
+
begin
|
7372
|
+
@driver.find_element(:xpath, '//*[@name="board_body"]').click
|
7373
|
+
sleep(1)
|
7374
|
+
puts '내용 항목 코드 타겟 47.......'.red
|
7375
|
+
rescue
|
7376
|
+
begin
|
7377
|
+
@driver.find_element(:xpath, '//textarea[@id="wr_content"]').click
|
7378
|
+
sleep(1)
|
7379
|
+
puts '내용 항목 코드 타겟 48.......'.red
|
7380
|
+
rescue
|
7381
|
+
begin
|
7382
|
+
textarea = @driver.find_element(:id, 'kboard_content')
|
7383
|
+
@driver.execute_script("arguments[0].scrollIntoView(true);", textarea)
|
7384
|
+
@driver.find_element(:id, 'kboard_content').click
|
7385
|
+
puts '내용 항목 코드 타겟 49.......'.red
|
7386
|
+
rescue
|
7387
|
+
end
|
7388
|
+
end
|
7389
|
+
end
|
7390
|
+
end
|
7391
|
+
end
|
7392
|
+
end
|
7393
|
+
end
|
7394
|
+
end
|
7395
|
+
end
|
7396
|
+
end
|
7397
|
+
end
|
7398
|
+
end
|
7399
|
+
end
|
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
|
+
|
7438
|
+
|
7289
7439
|
end
|
7290
7440
|
sleep(1)
|
7291
7441
|
|
@@ -7320,9 +7470,10 @@ Clipboard.copy(content)
|
|
7320
7470
|
#내용 입력<<─────────────────────────────────────────────────────────────────────
|
7321
7471
|
|
7322
7472
|
|
7323
|
-
|
7324
|
-
|
7325
|
-
|
7473
|
+
begin
|
7474
|
+
@driver.execute_script("document.body.insertAdjacentHTML('beforeend', arguments[0]);", original_html)
|
7475
|
+
rescue
|
7476
|
+
end
|
7326
7477
|
|
7327
7478
|
if option['내용사진자동삽입'] == 'true'
|
7328
7479
|
begin
|
@@ -8275,16 +8426,31 @@ if option['내용사진자동삽입'] == 'true'
|
|
8275
8426
|
else
|
8276
8427
|
end
|
8277
8428
|
sleep(1)
|
8278
|
-
|
8279
|
-
|
8280
|
-
|
8281
8429
|
end
|
8282
8430
|
|
8283
|
-
|
8284
|
-
|
8431
|
+
#없어도 되는 캡챠 삭제
|
8285
8432
|
begin
|
8286
|
-
|
8287
|
-
@driver.
|
8433
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="mb_main_tr_kcaptcha_img"]')
|
8434
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
8435
|
+
sleep(1)
|
8436
|
+
rescue
|
8437
|
+
begin
|
8438
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="mb_ggong_tr_kcaptcha_img"]')
|
8439
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
8440
|
+
sleep(1)
|
8441
|
+
rescue
|
8442
|
+
begin
|
8443
|
+
chat_box = @driver.find_element(:xpath, '//*[@id="mb_freemoney_tr_kcaptcha_img"]')
|
8444
|
+
@driver.execute_script("arguments[0].remove();", chat_box)
|
8445
|
+
sleep(1)
|
8446
|
+
rescue
|
8447
|
+
end
|
8448
|
+
end
|
8449
|
+
end
|
8450
|
+
|
8451
|
+
|
8452
|
+
begin
|
8453
|
+
@driver.find_element(:xpath, '//*[@class="captcha-solver captcha-solver_inner"]')
|
8288
8454
|
check_captcha = 1
|
8289
8455
|
|
8290
8456
|
rescue
|
@@ -9814,7 +9980,6 @@ sleep(1)
|
|
9814
9980
|
|
9815
9981
|
|
9816
9982
|
|
9817
|
-
|
9818
9983
|
##등록 버튼 코드 부분─────────────────────────────────────────────────────────────────────>
|
9819
9984
|
|
9820
9985
|
begin
|
@@ -9848,6 +10013,7 @@ rescue
|
|
9848
10013
|
end
|
9849
10014
|
|
9850
10015
|
|
10016
|
+
|
9851
10017
|
##<─────────────────────────────────────────────────────────────────────캡챠 해제 입력 코드 부분
|
9852
10018
|
|
9853
10019
|
#@driver.execute_script("document.body.style.zoom = '0.70'")
|
@@ -9856,658 +10022,681 @@ sleep(1)
|
|
9856
10022
|
puts '-[√] 내용 등록 버튼 탐색 시작.......'.yellow
|
9857
10023
|
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 ▼▼▼▼▼▼▼──────────────────────────────#######
|
9858
10024
|
begin
|
9859
|
-
|
9860
|
-
|
9861
|
-
|
9862
|
-
|
9863
|
-
|
9864
|
-
|
9865
|
-
|
10025
|
+
ss_button = @driver.find_element(:xpath, '//*[@value="등록"]')
|
10026
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10027
|
+
sleep(1)
|
10028
|
+
|
10029
|
+
@driver.find_element(:xpath, '//*[@value="등록"]').click
|
10030
|
+
puts '-[√] 등록을 1번 코드로 시도하였습니다.......'.magenta
|
10031
|
+
sleep(5)
|
9866
10032
|
rescue
|
9867
|
-
|
9868
|
-
|
9869
|
-
|
9870
|
-
|
10033
|
+
begin
|
10034
|
+
ss_button = @driver.find_element(:xpath, '//*[@alt="등록"]')
|
10035
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10036
|
+
sleep(1)
|
9871
10037
|
|
9872
|
-
|
9873
|
-
|
9874
|
-
|
9875
|
-
|
9876
|
-
|
9877
|
-
|
9878
|
-
|
9879
|
-
|
10038
|
+
@driver.find_element(:xpath, '//*[@alt="등록"]').click
|
10039
|
+
puts '-[√] 등록을 2번 코드로 시도하였습니다.......'.magenta
|
10040
|
+
sleep(5)
|
10041
|
+
rescue
|
10042
|
+
begin
|
10043
|
+
ss_button = @driver.find_element(:xpath, '//*[@value="작성완료"]')
|
10044
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10045
|
+
sleep(1)
|
9880
10046
|
|
9881
|
-
|
9882
|
-
|
9883
|
-
|
9884
|
-
|
9885
|
-
|
9886
|
-
|
9887
|
-
|
9888
|
-
|
9889
|
-
|
9890
|
-
|
9891
|
-
|
9892
|
-
|
9893
|
-
|
9894
|
-
|
9895
|
-
|
9896
|
-
|
10047
|
+
@driver.find_element(:xpath, '//*[@value="작성완료"]').click
|
10048
|
+
puts '-[√] 등록을 3번 코드로 시도하였습니다.......'.magenta
|
10049
|
+
sleep(5)
|
10050
|
+
rescue
|
10051
|
+
begin
|
10052
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="btn_submit"]')
|
10053
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10054
|
+
sleep(1)
|
10055
|
+
@driver.find_element(:xpath, '//*[@id="btn_submit"]').click
|
10056
|
+
puts '-[√] 등록을 4번 코드로 시도하였습니다.......'.magenta
|
10057
|
+
sleep(5)
|
10058
|
+
rescue
|
10059
|
+
begin
|
10060
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]')
|
10061
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10062
|
+
sleep(1)
|
9897
10063
|
|
9898
|
-
|
9899
|
-
|
9900
|
-
|
9901
|
-
|
9902
|
-
|
9903
|
-
|
9904
|
-
|
9905
|
-
|
10064
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]').click
|
10065
|
+
puts '-[√] 등록을 5번 코드로 시도하였습니다.......'.magenta
|
10066
|
+
sleep(5)
|
10067
|
+
rescue
|
10068
|
+
begin
|
10069
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]')
|
10070
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10071
|
+
sleep(1)
|
9906
10072
|
|
9907
|
-
|
9908
|
-
|
9909
|
-
|
9910
|
-
|
9911
|
-
|
9912
|
-
|
9913
|
-
|
9914
|
-
|
10073
|
+
@driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]').click
|
10074
|
+
puts '-[√] 등록을 6번 코드로 시도하였습니다.......'.magenta
|
10075
|
+
sleep(5)
|
10076
|
+
rescue
|
10077
|
+
begin
|
10078
|
+
ss_button = @driver.find_element(:xpath, '//*[@title="확인"]')
|
10079
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10080
|
+
sleep(1)
|
9915
10081
|
|
9916
|
-
|
9917
|
-
|
9918
|
-
|
9919
|
-
|
9920
|
-
|
9921
|
-
|
9922
|
-
|
9923
|
-
|
10082
|
+
@driver.find_element(:xpath, '//*[@title="확인"]').click
|
10083
|
+
puts '-[√] 등록을 7번 코드로 시도하였습니다.......'.magenta
|
10084
|
+
sleep(5)
|
10085
|
+
rescue
|
10086
|
+
begin
|
10087
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="btnSubmit"]')
|
10088
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10089
|
+
sleep(1)
|
9924
10090
|
|
9925
|
-
|
9926
|
-
|
9927
|
-
|
9928
|
-
|
9929
|
-
|
9930
|
-
|
9931
|
-
|
9932
|
-
|
10091
|
+
@driver.find_element(:xpath, '//*[@id="btnSubmit"]').click
|
10092
|
+
puts '-[√] 등록을 8번 코드로 시도하였습니다.......'.magenta
|
10093
|
+
sleep(5)
|
10094
|
+
rescue
|
10095
|
+
begin
|
10096
|
+
ss_button = @driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]')
|
10097
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10098
|
+
sleep(1)
|
9933
10099
|
|
9934
|
-
|
9935
|
-
|
9936
|
-
|
9937
|
-
|
9938
|
-
|
9939
|
-
|
9940
|
-
|
9941
|
-
|
9942
|
-
|
9943
|
-
|
9944
|
-
|
9945
|
-
|
9946
|
-
|
9947
|
-
|
9948
|
-
|
9949
|
-
|
9950
|
-
|
10100
|
+
@driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]').click
|
10101
|
+
puts '-[√] 등록을 9번 코드로 시도하였습니다.......'.magenta
|
10102
|
+
sleep(5)
|
10103
|
+
rescue
|
10104
|
+
begin
|
10105
|
+
ss_button = @driver.find_element(:xpath, '//input[@type="submit" and @value="확인"]')
|
10106
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10107
|
+
sleep(1)
|
10108
|
+
|
10109
|
+
@driver.find_element(:xpath, '//input[@type="submit" and @value="확인"]').click
|
10110
|
+
puts '-[√] 등록을 10번 코드로 시도하였습니다.......'.magenta
|
10111
|
+
sleep(5)
|
10112
|
+
rescue
|
10113
|
+
begin
|
10114
|
+
ss_button = @driver.find_element(:partial_link_text, '작성완료')
|
10115
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10116
|
+
sleep(1)
|
9951
10117
|
|
9952
|
-
|
9953
|
-
|
9954
|
-
|
9955
|
-
|
9956
|
-
|
9957
|
-
|
9958
|
-
|
9959
|
-
|
10118
|
+
@driver.find_element(:partial_link_text, '작성완료').click#요소같고 텍스트가 다를때 텍스트로 타겟
|
10119
|
+
puts '-[√] 등록을 11번 코드로 시도하였습니다.......'.magenta
|
10120
|
+
sleep(5)
|
10121
|
+
rescue
|
10122
|
+
begin
|
10123
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]')
|
10124
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10125
|
+
sleep(1)
|
9960
10126
|
|
9961
|
-
|
9962
|
-
|
9963
|
-
|
9964
|
-
|
9965
|
-
|
9966
|
-
|
9967
|
-
|
9968
|
-
|
10127
|
+
@driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]').click
|
10128
|
+
puts '-[√] 등록을 12번 코드로 시도하였습니다.......'.magenta
|
10129
|
+
sleep(5)
|
10130
|
+
rescue
|
10131
|
+
begin
|
10132
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="main_btn_box"]/button')
|
10133
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10134
|
+
sleep(1)
|
9969
10135
|
|
9970
|
-
|
9971
|
-
|
9972
|
-
|
9973
|
-
|
9974
|
-
|
9975
|
-
|
9976
|
-
|
9977
|
-
|
10136
|
+
@driver.find_element(:xpath, '//*[@id="main_btn_box"]/button').click
|
10137
|
+
puts '-[√] 등록을 13번 코드로 시도하였습니다.......'.magenta
|
10138
|
+
sleep(5)
|
10139
|
+
rescue
|
10140
|
+
begin
|
10141
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="bttnComplete1"]')
|
10142
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10143
|
+
sleep(1)
|
9978
10144
|
|
9979
|
-
|
9980
|
-
|
9981
|
-
|
9982
|
-
|
9983
|
-
|
9984
|
-
|
9985
|
-
|
9986
|
-
|
10145
|
+
@driver.find_element(:xpath, '//*[@id="bttnComplete1"]').click
|
10146
|
+
puts '-[√] 등록을 14번 코드로 시도하였습니다.......'.magenta
|
10147
|
+
sleep(5)
|
10148
|
+
rescue
|
10149
|
+
begin
|
10150
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button')
|
10151
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10152
|
+
sleep(1)
|
9987
10153
|
|
9988
|
-
|
9989
|
-
|
9990
|
-
|
9991
|
-
|
9992
|
-
|
9993
|
-
|
9994
|
-
|
9995
|
-
|
9996
|
-
|
9997
|
-
@driver.find_element(:xpath, '//*[@id="com_btn"]').click
|
9998
|
-
puts '-[√] 등록을 16번 코드로 시도하였습니다.......'.magenta
|
9999
|
-
sleep(5)
|
10000
|
-
rescue
|
10001
|
-
begin
|
10002
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="submit"]')
|
10003
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10004
|
-
sleep(1)
|
10154
|
+
@driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button').click
|
10155
|
+
puts '-[√] 등록을 15번 코드로 시도하였습니다.......'.magenta
|
10156
|
+
sleep(5)
|
10157
|
+
rescue
|
10158
|
+
begin
|
10159
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="com_btn"]')
|
10160
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10161
|
+
sleep(1)
|
10005
10162
|
|
10006
|
-
|
10007
|
-
|
10008
|
-
|
10009
|
-
|
10010
|
-
|
10011
|
-
|
10012
|
-
|
10013
|
-
|
10163
|
+
@driver.find_element(:xpath, '//*[@id="com_btn"]').click
|
10164
|
+
puts '-[√] 등록을 16번 코드로 시도하였습니다.......'.magenta
|
10165
|
+
sleep(5)
|
10166
|
+
rescue
|
10167
|
+
begin
|
10168
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="submit"]')
|
10169
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10170
|
+
sleep(1)
|
10014
10171
|
|
10015
|
-
|
10016
|
-
|
10017
|
-
|
10018
|
-
|
10019
|
-
|
10020
|
-
|
10021
|
-
|
10022
|
-
|
10172
|
+
@driver.find_element(:xpath, '//*[@class="submit"]').click
|
10173
|
+
puts '-[√] 등록을 17번 코드로 시도하였습니다.......'.magenta
|
10174
|
+
sleep(5)
|
10175
|
+
rescue
|
10176
|
+
begin
|
10177
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="savePostInBoard"]')
|
10178
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10179
|
+
sleep(1)
|
10023
10180
|
|
10024
|
-
|
10025
|
-
|
10026
|
-
|
10027
|
-
|
10028
|
-
|
10181
|
+
@driver.find_element(:xpath, '//*[@id="savePostInBoard"]').click
|
10182
|
+
puts '-[√] 등록을 18번 코드로 시도하였습니다.......'.magenta
|
10183
|
+
sleep(5)
|
10184
|
+
rescue
|
10185
|
+
begin
|
10186
|
+
ss_button = @driver.find_element(:css, 'button.btn.mx-auto')
|
10187
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10188
|
+
sleep(1)
|
10029
10189
|
|
10030
|
-
|
10031
|
-
|
10032
|
-
|
10033
|
-
|
10034
|
-
|
10190
|
+
@driver.find_element(:css, 'button.btn.mx-auto').click
|
10191
|
+
sleep(1)
|
10192
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10193
|
+
puts '-[√] 등록을 19번 코드로 시도하였습니다.......'.magenta
|
10194
|
+
sleep(5)
|
10035
10195
|
|
10036
|
-
|
10037
|
-
|
10038
|
-
|
10196
|
+
rescue
|
10197
|
+
begin
|
10198
|
+
ss_button = @driver.find_element(:xpath, '//*[@form="write"]')
|
10199
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10200
|
+
sleep(1)
|
10039
10201
|
|
10040
|
-
|
10041
|
-
|
10042
|
-
|
10043
|
-
|
10044
|
-
|
10202
|
+
@driver.find_element(:xpath, '//*[@form="write"]').click
|
10203
|
+
sleep(1)
|
10204
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10205
|
+
puts '-[√] 등록을 19-1번 코드로 시도하였습니다.......'.magenta
|
10206
|
+
sleep(5)
|
10045
10207
|
|
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)
|
10059
|
-
|
10060
|
-
rescue
|
10061
|
-
begin
|
10062
|
-
ss_button = @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]')
|
10063
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10064
|
-
sleep(1)
|
10208
|
+
rescue
|
10209
|
+
begin
|
10210
|
+
ss_button = @driver.find_element(:partial_link_text, '저장하기')
|
10211
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10212
|
+
sleep(1)
|
10065
10213
|
|
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
|
10214
|
+
@driver.find_element(:partial_link_text, '저장하기').click #요소같고 텍스트가 다를때 텍스트로 타겟
|
10215
|
+
puts '-[√] 등록을 20번 코드로 시도하였습니다.......'.magenta
|
10216
|
+
sleep(5)
|
10076
10217
|
|
10077
|
-
|
10078
|
-
|
10218
|
+
rescue
|
10219
|
+
begin
|
10220
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]')
|
10221
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10222
|
+
sleep(1)
|
10079
10223
|
|
10080
|
-
|
10081
|
-
|
10082
|
-
|
10224
|
+
@driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]').click
|
10225
|
+
puts '-[√] 등록을 21시도하였습니다.......'.magenta
|
10226
|
+
sleep(5)
|
10227
|
+
|
10228
|
+
rescue
|
10229
|
+
begin
|
10230
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btnWrite"]')
|
10231
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10232
|
+
sleep(1)
|
10233
|
+
|
10234
|
+
@driver.find_element(:xpath, '//*[@class="btnWrite"]').click
|
10235
|
+
puts '-[√] 등록을 22시도하였습니다.......'.magenta
|
10236
|
+
sleep(5)
|
10237
|
+
|
10238
|
+
rescue
|
10239
|
+
begin
|
10240
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]')
|
10241
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10242
|
+
sleep(1)
|
10243
|
+
|
10244
|
+
@driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').click
|
10245
|
+
puts '-[√] 등록을 23번 코드로 시도하였습니다.......'.magenta
|
10246
|
+
sleep(5)
|
10247
|
+
|
10248
|
+
rescue
|
10249
|
+
begin
|
10250
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit"]')
|
10251
|
+
if ss_button.attribute("class") == "upload_btn1"
|
10252
|
+
raise
|
10253
|
+
end
|
10254
|
+
|
10255
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10256
|
+
sleep(1)
|
10257
|
+
|
10258
|
+
ss_button.click
|
10259
|
+
puts '-[√] 등록을 24번 코드로 시도하였습니다.......'.magenta
|
10260
|
+
sleep(5)
|
10261
|
+
|
10262
|
+
|
10263
|
+
rescue
|
10264
|
+
begin
|
10265
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button-agree"]')
|
10266
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10267
|
+
sleep(1)
|
10268
|
+
|
10269
|
+
@driver.find_element(:xpath, '//*[@class="button-agree"]').click
|
10270
|
+
puts '-[√] 등록을 25번 코드로 시도하였습니다.......'.magenta
|
10271
|
+
sleep(5)
|
10272
|
+
|
10273
|
+
rescue
|
10274
|
+
begin
|
10275
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]')
|
10276
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10277
|
+
sleep(1)
|
10278
|
+
|
10279
|
+
@driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]').click
|
10280
|
+
puts '-[√] 등록을 26번 코드로 시도하였습니다.......'.magenta
|
10281
|
+
sleep(5)
|
10282
|
+
|
10283
|
+
rescue
|
10284
|
+
begin
|
10285
|
+
ss_button = @driver.find_element(:xpath, "//button[contains(text(), '글쓰기')]")
|
10286
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10287
|
+
sleep(1)
|
10288
|
+
|
10289
|
+
@driver.find_element(:xpath, "//button[contains(text(), '글쓰기')]").click
|
10290
|
+
puts '-[√] 등록을 27번 코드로 시도하였습니다.......'.magenta
|
10291
|
+
sleep(5)
|
10292
|
+
|
10293
|
+
rescue
|
10294
|
+
begin
|
10295
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="Button button-rounded black button-normal"]')
|
10296
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10297
|
+
sleep(1)
|
10298
|
+
|
10299
|
+
@driver.find_element(:xpath, '//*[@class="Button button-rounded black button-normal"]').click
|
10300
|
+
puts '-[√] 등록을 28번 코드로 시도하였습니다.......'.magenta
|
10301
|
+
sleep(5)
|
10302
|
+
|
10303
|
+
rescue
|
10304
|
+
begin
|
10305
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn_point"]')
|
10306
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10307
|
+
sleep(1)
|
10308
|
+
|
10309
|
+
@driver.find_element(:xpath, '//*[@class="btn btn_point"]').click
|
10310
|
+
puts '-[√] 등록을 28번 코드로 시도하였습니다.......'.magenta
|
10311
|
+
sleep(5)
|
10312
|
+
|
10313
|
+
rescue
|
10314
|
+
begin
|
10315
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "save")]')
|
10316
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10317
|
+
sleep(1)
|
10318
|
+
|
10319
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "save")]').click
|
10320
|
+
puts '-[√] 등록을 29번 코드로 시도하였습니다.......'.magenta
|
10321
|
+
sleep(5)
|
10322
|
+
|
10323
|
+
rescue
|
10324
|
+
begin
|
10325
|
+
ss_button = @driver.find_element(:css, 'input[@type="submit" and @value="확인"]')
|
10326
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10327
|
+
sleep(1)
|
10328
|
+
|
10329
|
+
ss_button = @driver.find_element(:css, 'input[@type="submit" and @value="확인"]').click
|
10330
|
+
puts '-[√] 등록을 30번 코드로 시도하였습니다.......'.magenta
|
10331
|
+
sleep(5)
|
10332
|
+
|
10333
|
+
rescue
|
10334
|
+
begin
|
10335
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="button" and @value="작성"]')
|
10336
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10337
|
+
sleep(1)
|
10338
|
+
|
10339
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="button" and @value="작성"]').click
|
10340
|
+
puts '-[√] 등록을 31번 코드로 시도하였습니다.......'.magenta
|
10341
|
+
sleep(5)
|
10342
|
+
|
10343
|
+
rescue
|
10344
|
+
begin
|
10345
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button button-inverse button-small write_ok"]')
|
10346
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10347
|
+
sleep(1)
|
10348
|
+
|
10349
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button button-inverse button-small write_ok"]').click
|
10350
|
+
puts '-[√] 등록을 32번 코드로 시도하였습니다.......'.magenta
|
10351
|
+
sleep(5)
|
10352
|
+
|
10353
|
+
rescue
|
10354
|
+
begin
|
10355
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "btn/send")]')
|
10356
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10357
|
+
sleep(1)
|
10358
|
+
|
10359
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "btn/send")]').click
|
10360
|
+
puts '-[√] 등록을 33번 코드로 시도하였습니다.......'.magenta
|
10361
|
+
sleep(5)
|
10362
|
+
|
10363
|
+
rescue
|
10364
|
+
begin
|
10365
|
+
ss_button = @driver.find_element(:xpath, '//input[@name="formimage1"]')
|
10366
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10367
|
+
sleep(1)
|
10368
|
+
|
10369
|
+
ss_button = @driver.find_element(:xpath, '//input[@name="formimage1"]').click
|
10370
|
+
puts '-[√] 등록을 34번 코드로 시도하였습니다.......'.magenta
|
10371
|
+
sleep(5)
|
10372
|
+
|
10373
|
+
rescue
|
10374
|
+
begin
|
10375
|
+
ss_button = @driver.find_element(:xpath, '//button[@type="button" and @class="btnSubmit"]')
|
10376
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10377
|
+
sleep(1)
|
10378
|
+
|
10379
|
+
ss_button = @driver.find_element(:xpath, '//button[@type="button" and @class="btnSubmit"]').click
|
10380
|
+
puts '-[√] 등록을 35번 코드로 시도하였습니다.......'.magenta
|
10381
|
+
sleep(5)
|
10382
|
+
|
10383
|
+
rescue
|
10384
|
+
begin
|
10385
|
+
ss_button = @driver.find_element(:xpath, '//input[@type="button" and @value="전송"]')
|
10386
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10387
|
+
sleep(1)
|
10388
|
+
|
10389
|
+
ss_button = @driver.find_element(:xpath, '//input[@type="button" and @value="전송"]').click
|
10390
|
+
puts '-[√] 등록을 36번 코드로 시도하였습니다.......'.magenta
|
10391
|
+
sleep(5)
|
10392
|
+
|
10393
|
+
rescue
|
10394
|
+
begin
|
10395
|
+
ss_button = @driver.find_element(css: 'ul.bt_type li a.bt_type4_w_4')
|
10396
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10397
|
+
sleep(1)
|
10398
|
+
|
10399
|
+
ss_button = @driver.find_element(css: 'ul.bt_type li a.bt_type4_w_4').click
|
10400
|
+
puts '-[√] 등록을 36번 코드로 시도하였습니다.......'.magenta
|
10401
|
+
sleep(5)
|
10402
|
+
|
10403
|
+
rescue
|
10404
|
+
begin
|
10405
|
+
ss_button = @driver.find_element(id: 'btn-write')
|
10406
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10407
|
+
sleep(1)
|
10408
|
+
|
10409
|
+
ss_button = @driver.find_element(id: 'btn-write').click
|
10410
|
+
puts '-[√] 등록을 37번 코드로 시도하였습니다.......'.magenta
|
10411
|
+
sleep(5)
|
10412
|
+
|
10413
|
+
rescue
|
10414
|
+
begin
|
10415
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "img/btn_confirm.gif")]')
|
10416
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10417
|
+
sleep(1)
|
10418
|
+
|
10419
|
+
ss_button = @driver.find_element(:xpath, '//img[contains(@src, "img/btn_confirm.gif")]').click
|
10420
|
+
puts '-[√] 등록을 38번 코드로 시도하였습니다.......'.magenta
|
10421
|
+
sleep(5)
|
10422
|
+
|
10423
|
+
rescue
|
10424
|
+
begin
|
10425
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn2_1"]')
|
10426
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10427
|
+
sleep(1)
|
10428
|
+
|
10429
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn2_1"]').click
|
10430
|
+
puts '-[√] 등록을 39번 코드로 시도하였습니다.......'.magenta
|
10431
|
+
sleep(5)
|
10432
|
+
|
10433
|
+
rescue
|
10434
|
+
begin
|
10435
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="pro-btn large _write"]')
|
10436
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10437
|
+
sleep(1)
|
10438
|
+
|
10439
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="pro-btn large _write"]').click
|
10440
|
+
puts '-[√] 등록을 39번 코드로 시도하였습니다.......'.magenta
|
10441
|
+
sleep(5)
|
10442
|
+
|
10443
|
+
rescue
|
10444
|
+
begin
|
10445
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit" and @name="save" and @value="저장"]')
|
10446
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
10447
|
+
sleep(1)
|
10448
|
+
|
10449
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit" and @name="save" and @value="저장"]').click
|
10450
|
+
puts '-[√] 등록을 40번 코드로 시도하였습니다.......'.magenta
|
10451
|
+
sleep(5)
|
10452
|
+
|
10453
|
+
rescue
|
10454
|
+
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
|
10455
|
+
begin
|
10456
|
+
puts '-[√] 등록 버튼 코드 탐색에 실패하였습니다.......'.magenta
|
10457
|
+
puts '-[√] 다른 방법으로 등록을 시도 합니다.......'.magenta
|
10458
|
+
|
10459
|
+
sleep(1)
|
10460
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').send_keys()
|
10461
|
+
sleep(1)
|
10462
|
+
@driver.find_element(:xpath, '//*[@id="wr_subject"]').click
|
10463
|
+
sleep(1)
|
10464
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10465
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10466
|
+
sleep(5)
|
10467
|
+
rescue
|
10468
|
+
begin
|
10469
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').send_keys()
|
10470
|
+
sleep(1)
|
10471
|
+
@driver.find_element(:xpath, '//*[@fw-label="제목"]').click
|
10472
|
+
sleep(1)
|
10473
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10474
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10475
|
+
sleep(5)
|
10476
|
+
rescue
|
10477
|
+
begin
|
10478
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').send_keys()
|
10479
|
+
sleep(1)
|
10480
|
+
@driver.find_element(:xpath, '//*[@name="subject"]').click
|
10481
|
+
sleep(1)
|
10482
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10483
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10484
|
+
sleep(5)
|
10485
|
+
rescue
|
10486
|
+
begin
|
10487
|
+
@driver.find_element(:xpath, '//*[@name="title"]').send_keys()
|
10488
|
+
sleep(1)
|
10489
|
+
@driver.find_element(:xpath, '//*[@name="title"]').click
|
10490
|
+
sleep(1)
|
10491
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10492
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10493
|
+
sleep(5)
|
10494
|
+
rescue
|
10495
|
+
begin
|
10496
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').send_keys()
|
10497
|
+
sleep(1)
|
10498
|
+
@driver.find_element(:xpath, '//*[@id="wr_title"]').click
|
10499
|
+
sleep(1)
|
10500
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10501
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10502
|
+
sleep(5)
|
10503
|
+
rescue
|
10504
|
+
begin
|
10505
|
+
@driver.find_element(:xpath, '//*[@id="title"]').send_keys()
|
10506
|
+
sleep(1)
|
10507
|
+
@driver.find_element(:xpath, '//*[@id="title"]').click
|
10508
|
+
sleep(1)
|
10509
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10510
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10511
|
+
sleep(5)
|
10512
|
+
rescue
|
10513
|
+
begin
|
10514
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').send_keys()
|
10515
|
+
sleep(1)
|
10516
|
+
@driver.find_element(:xpath, '//*[@id="postTitle"]').click
|
10517
|
+
sleep(1)
|
10518
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10519
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10520
|
+
sleep(5)
|
10521
|
+
rescue
|
10522
|
+
begin
|
10523
|
+
@driver.find_element(:xpath, '//*[@title="input"]').send_keys()
|
10524
|
+
sleep(1)
|
10525
|
+
@driver.find_element(:xpath, '//*[@title="input"]').click
|
10526
|
+
sleep(1)
|
10527
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10528
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10529
|
+
sleep(5)
|
10530
|
+
rescue
|
10531
|
+
begin
|
10532
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').send_keys()
|
10533
|
+
sleep(1)
|
10534
|
+
@driver.find_element(:xpath, '//*[@name="wr_subject"]').click
|
10535
|
+
sleep(1)
|
10536
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10537
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10538
|
+
sleep(5)
|
10539
|
+
rescue
|
10540
|
+
begin
|
10541
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').send_keys()
|
10542
|
+
sleep(1)
|
10543
|
+
@driver.find_element(:xpath, '//*[@name="post_title"]').click
|
10544
|
+
sleep(1)
|
10545
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10546
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10547
|
+
sleep(5)
|
10548
|
+
rescue
|
10549
|
+
begin
|
10550
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').send_keys()
|
10551
|
+
sleep(1)
|
10552
|
+
@driver.find_element(:xpath, '//*[@title="제목"]').click
|
10553
|
+
sleep(1)
|
10554
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10555
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10556
|
+
sleep(5)
|
10557
|
+
rescue
|
10558
|
+
begin
|
10559
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').send_keys()
|
10560
|
+
sleep(1)
|
10561
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목을 입력하세요"]').click
|
10562
|
+
sleep(1)
|
10563
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10564
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10565
|
+
sleep(5)
|
10566
|
+
rescue
|
10567
|
+
begin
|
10568
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').send_keys()
|
10569
|
+
sleep(1)
|
10570
|
+
@driver.find_element(:xpath, '//*[@placeholder="제목"]').click
|
10571
|
+
sleep(1)
|
10572
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10573
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10574
|
+
sleep(5)
|
10575
|
+
rescue
|
10576
|
+
begin
|
10577
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').send_keys()
|
10578
|
+
sleep(1)
|
10579
|
+
@driver.find_element(:xpath, '//*[@hname="제목"]').click
|
10580
|
+
sleep(1)
|
10581
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10582
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10583
|
+
sleep(5)
|
10584
|
+
rescue
|
10585
|
+
begin
|
10586
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').send_keys()
|
10587
|
+
sleep(1)
|
10588
|
+
@driver.find_element(:xpath, '//*[@id="post_subject"]').click
|
10589
|
+
sleep(1)
|
10590
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10591
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10592
|
+
sleep(5)
|
10593
|
+
rescue
|
10594
|
+
begin
|
10595
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').send_keys()
|
10596
|
+
sleep(1)
|
10597
|
+
@driver.find_element(:xpath, '//*[@id="search_bar"]').click
|
10598
|
+
sleep(1)
|
10599
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10600
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10601
|
+
sleep(5)
|
10602
|
+
rescue
|
10603
|
+
begin
|
10604
|
+
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').send_keys()
|
10605
|
+
sleep(1)
|
10606
|
+
@driver.find_element(:xpath, '//*[@name="SUBJECT"]').click
|
10607
|
+
sleep(1)
|
10608
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10609
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10610
|
+
sleep(5)
|
10611
|
+
|
10612
|
+
rescue
|
10613
|
+
begin
|
10614
|
+
@driver.find_element(:xpath, '//*[@name="rg_title"]').send_keys()
|
10615
|
+
sleep(1)
|
10616
|
+
@driver.find_element(:xpath, '//*[@name="rg_title"]').click
|
10617
|
+
sleep(1)
|
10618
|
+
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
10619
|
+
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
10620
|
+
sleep(5)
|
10621
|
+
|
10622
|
+
rescue => e
|
10623
|
+
puts '-[√] 등록 실패.......'.red
|
10624
|
+
puts '-[√] 로딩 및 코드인식 실패등 기타 이유로 다음 게시판 작업으로 이동합니다.......'.red
|
10625
|
+
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
10626
|
+
@driver.window_handles.each do |handle|
|
10627
|
+
@driver.switch_to.window(handle)
|
10628
|
+
begin
|
10629
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
10630
|
+
@driver.close
|
10631
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
10632
|
+
puts "크롬 브라우저 종료: #{e.message}"
|
10633
|
+
end
|
10634
|
+
end
|
10635
|
+
return 0
|
10636
|
+
@driver.quit
|
10637
|
+
end
|
10638
|
+
end
|
10639
|
+
end
|
10640
|
+
end
|
10641
|
+
end
|
10642
|
+
end
|
10643
|
+
end
|
10644
|
+
end
|
10645
|
+
end
|
10646
|
+
end
|
10647
|
+
end
|
10648
|
+
end
|
10649
|
+
end
|
10650
|
+
end
|
10651
|
+
end
|
10652
|
+
end
|
10653
|
+
end
|
10654
|
+
end
|
10655
|
+
end
|
10656
|
+
end
|
10657
|
+
end
|
10658
|
+
########─────────────────────────────▲▲▲▲▲▲▲ 등록버튼 2차 시도 ▲▲▲▲▲▲▲──────────────────────────────#######
|
10659
|
+
end
|
10660
|
+
end
|
10661
|
+
end
|
10662
|
+
end
|
10663
|
+
end
|
10664
|
+
end
|
10665
|
+
end
|
10666
|
+
end
|
10667
|
+
end
|
10668
|
+
end
|
10669
|
+
end
|
10670
|
+
end
|
10671
|
+
end
|
10672
|
+
end
|
10673
|
+
end
|
10674
|
+
end
|
10675
|
+
end
|
10676
|
+
end
|
10677
|
+
end
|
10678
|
+
end
|
10679
|
+
end
|
10680
|
+
end
|
10681
|
+
end
|
10682
|
+
end
|
10683
|
+
end
|
10684
|
+
end
|
10685
|
+
end
|
10686
|
+
end
|
10687
|
+
end
|
10688
|
+
end
|
10689
|
+
end
|
10690
|
+
end
|
10691
|
+
end
|
10692
|
+
end
|
10693
|
+
end
|
10694
|
+
end
|
10695
|
+
end
|
10696
|
+
end
|
10697
|
+
end
|
10698
|
+
end
|
10083
10699
|
|
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
10700
|
|
10512
10701
|
|
10513
10702
|
|