posting_duo 0.0.29 → 0.0.31
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 +333 -240
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7c5df42fb3e878235ff74eb1f4e8d0c0c24d3836db7c5eaab19e6450e7b344f
|
4
|
+
data.tar.gz: a1dcfe5c0e5d7407e3c480339367d6c6797f4b4d58e0bda5a08c5876bf83af1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f33e76076e39df16bf1300e593e98d8b829cd6f48136e868000d86f2502697cdd9739363de28091d50fbe79d99bbfff277fa0657ca0eb95b12ceabb52204c2f
|
7
|
+
data.tar.gz: 5e46e0514553d863ec455c425b2999a22cc575b3e4c0cdcc5183c12a6a87a7782eb499968140cd08e738bf2b6f9126c4cb1db14d07d52fb381f381fb70c59763
|
data/lib/posting_duo.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'glimmer-dsl-libui'
|
2
2
|
require 'selenium-webdriver'
|
3
|
-
require 'webdrivers'
|
3
|
+
# require 'webdrivers'
|
4
4
|
require 'iconv'
|
5
5
|
require 'nokogiri'
|
6
6
|
require 'open-uri'
|
@@ -25,151 +25,122 @@ require 'watir'
|
|
25
25
|
|
26
26
|
|
27
27
|
|
28
|
-
#driver.find_element(:class, 'highlight-java')
|
29
|
-
# or
|
30
|
-
#driver.find_element(:class_name, 'highlight-java')
|
31
|
-
|
32
28
|
class Naver
|
33
|
-
|
29
|
+
|
34
30
|
def chrome_start(proxy)
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
# 예외 발생 시 수동으로 chromedriver 경로 설정
|
129
|
-
Selenium::WebDriver::Chrome::Service.driver_path = chromedriver_path
|
130
|
-
options.add_extension('./crx/free.crx')
|
131
|
-
options.add_extension('./crx/app.crx')
|
132
|
-
options.add_argument('--disable-gpu')
|
133
|
-
options.add_argument('--start-maximized')
|
134
|
-
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36')
|
135
|
-
options.add_argument('--disable-blink-features=AutomationControlled')
|
136
|
-
|
137
|
-
options.add_argument('--disable-web-security')
|
138
|
-
options.add_argument('--allow-running-insecure-content')
|
139
|
-
options.add_argument('--no-sandbox')
|
140
|
-
|
141
|
-
options.exclude_switches = ['enable-automation']
|
142
|
-
options.add_preference("profile.password_manager_enabled", false)
|
143
|
-
options.add_preference("credentials_enable_service", false)
|
144
|
-
options.add_preference("profile.default_content_setting_values.notifications", 2)
|
145
|
-
options.add_argument("--disable-save-password-bubble")
|
146
|
-
|
147
|
-
capabilities = [options]
|
148
|
-
@driver = Selenium::WebDriver.for(:chrome, capabilities: capabilities)
|
31
|
+
if proxy == ''
|
32
|
+
begin
|
33
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
34
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
35
|
+
options.add_extension('./crx/free.crx')
|
36
|
+
options.add_extension('./crx/app.crx')
|
37
|
+
options.page_load_strategy = :normal
|
38
|
+
options.timeouts = { page_load: 20_000 }
|
39
|
+
options.add_argument('--disable-gpu')
|
40
|
+
options.add_argument('--start-maximized')
|
41
|
+
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
|
42
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # 자동화된 환경에서 실행되는 것을 감지하는 기능 비활성화
|
43
|
+
options.add_argument('--disable-web-security') # 웹 보안 비활성화
|
44
|
+
options.add_argument('--allow-running-insecure-content') # HTTPS 사이트에서 HTTP 컨텐츠 실행 허용
|
45
|
+
options.add_argument('--no-sandbox') # 샌드박스 모드 비활성화
|
46
|
+
options.exclude_switches = ['enable-automation'] # 자동화 테스트 제거
|
47
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
48
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
49
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
50
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
51
|
+
|
52
|
+
# JavaScript로 navigator.webdriver 숨기기
|
53
|
+
options.add_argument('--disable-blink-features=AutomationControlled')
|
54
|
+
|
55
|
+
# Selenium의 webdriver 인식을 숨기는 JavaScript 코드 삽입
|
56
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
57
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
58
|
+
|
59
|
+
rescue
|
60
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
61
|
+
end
|
62
|
+
else
|
63
|
+
begin
|
64
|
+
puts '프록시 연결합니다.......'.magenta
|
65
|
+
puts '프록시 연결시 프록시 서버에 의해 인터넷속도가 낮아질수있어.......'.magenta
|
66
|
+
puts '원활한 작업이 되지않을수있습니다.......'.magenta
|
67
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
68
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
69
|
+
options.add_argument '--proxy-server='+proxy.to_s.force_encoding('utf-8').to_s
|
70
|
+
options.add_extension('./crx/free.crx')
|
71
|
+
options.add_extension('./crx/app.crx')
|
72
|
+
options.page_load_strategy = :normal
|
73
|
+
options.timeouts = { page_load: 20_000 }
|
74
|
+
options.add_argument('--disable-gpu')
|
75
|
+
options.add_argument('--start-maximized')
|
76
|
+
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
|
77
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # 자동화된 환경에서 실행되는 것을 감지하는 기능 비활성화
|
78
|
+
options.add_argument('--disable-web-security') # 웹 보안 비활성화
|
79
|
+
options.add_argument('--allow-running-insecure-content') # HTTPS 사이트에서 HTTP 컨텐츠 실행 허용
|
80
|
+
options.add_argument('--no-sandbox') # 샌드박스 모드 비활성화
|
81
|
+
options.exclude_switches = ['enable-automation'] # 자동화 테스트 제거
|
82
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
83
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
84
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
85
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
86
|
+
|
87
|
+
# JavaScript로 navigator.webdriver 숨기기
|
88
|
+
options.add_argument('--disable-blink-features=AutomationControlled')
|
89
|
+
|
90
|
+
# Selenium의 webdriver 인식을 숨기는 JavaScript 코드 삽입
|
91
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
92
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
93
|
+
|
94
|
+
rescue => e
|
95
|
+
puts e
|
96
|
+
puts 'proxy error...'
|
97
|
+
begin
|
98
|
+
Selenium::WebDriver::Chrome::Service.driver_path = './chromedriver.exe'
|
99
|
+
options.add_extension('./crx/free.crx')
|
100
|
+
options.add_extension('./crx/app.crx')
|
101
|
+
options.page_load_strategy = :normal
|
102
|
+
options.timeouts = { page_load: 20_000 }
|
103
|
+
options.add_argument('--disable-gpu')
|
104
|
+
options.add_argument('--start-maximized')
|
105
|
+
options.add_argument('user-agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.6723.59 Safari/537.36') # user-agent 위조
|
106
|
+
options.add_argument('--disable-blink-features=AutomationControlled') # 자동화된 환경에서 실행되는 것을 감지하는 기능 비활성화
|
107
|
+
options.add_argument('--disable-web-security') # 웹 보안 비활성화
|
108
|
+
options.add_argument('--allow-running-insecure-content') # HTTPS 사이트에서 HTTP 컨텐츠 실행 허용
|
109
|
+
options.add_argument('--no-sandbox') # 샌드박스 모드 비활성화
|
110
|
+
options.exclude_switches = ['enable-automation'] # 자동화 테스트 제거
|
111
|
+
options.add_preference("profile.password_manager_enabled", false) # 비밀번호 관리자 비활성화
|
112
|
+
options.add_preference("credentials_enable_service", false) # 비밀번호 저장 기능 비활성화
|
113
|
+
options.add_preference("profile.default_content_setting_values.notifications", 2) # 알림 차단
|
114
|
+
options.add_argument("--disable-save-password-bubble") # 비밀번호 저장 팝업 차단
|
115
|
+
|
116
|
+
# JavaScript로 navigator.webdriver 숨기기
|
117
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
118
|
+
@driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: function(){ return false; }});") # 셀레니움 감지 방지
|
119
|
+
|
120
|
+
rescue
|
121
|
+
@driver = Selenium::WebDriver.for(:chrome, options: options)
|
122
|
+
end
|
123
|
+
end
|
149
124
|
end
|
150
|
-
end
|
151
125
|
end
|
152
126
|
|
153
|
-
|
154
127
|
|
155
|
-
|
128
|
+
|
156
129
|
def login(proxy)
|
157
130
|
chrome_start(proxy)
|
158
131
|
|
159
|
-
|
160
132
|
@driver.get('chrome-extension://ifibfemgeogfhoebkmokieepdoobkbpo/options/options.html')
|
161
133
|
sleep(1)
|
162
|
-
|
163
|
-
@driver.switch_to.window(@driver.window_handles
|
164
|
-
sleep(1)
|
134
|
+
if @driver.window_handles.size > 1
|
135
|
+
@driver.switch_to.window(@driver.window_handles.last)
|
165
136
|
@driver.close
|
166
|
-
|
167
|
-
|
168
|
-
|
137
|
+
@driver.switch_to.window(@driver.window_handles.first)
|
138
|
+
else
|
139
|
+
end
|
169
140
|
sleep(1)
|
170
141
|
end
|
171
142
|
|
172
|
-
|
143
|
+
|
173
144
|
|
174
145
|
def 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)
|
175
146
|
puts 'start...'.yellow
|
@@ -3842,7 +3813,7 @@ post_url = option['post_url'].to_s
|
|
3842
3813
|
begin
|
3843
3814
|
puts '-[√] 글쓰기 버튼 클릭이 필수인지 탐색합니다.......'.green
|
3844
3815
|
el_post_btn = @driver.find_element(:xpath, '//*[@class="btn btn-primary btn-sm float_r"]')
|
3845
|
-
@driver.
|
3816
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", el_post_btn)
|
3846
3817
|
sleep(1)
|
3847
3818
|
@driver.find_element(:xpath, '//*[@class="btn btn-primary btn-sm float_r"]').click
|
3848
3819
|
sleep(3.7)
|
@@ -3850,7 +3821,7 @@ post_url = option['post_url'].to_s
|
|
3850
3821
|
rescue
|
3851
3822
|
begin
|
3852
3823
|
el_post_btn = @driver.find_element(:xpath, '//*[@class="btn-block-right"]')
|
3853
|
-
@driver.
|
3824
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", el_post_btn)
|
3854
3825
|
sleep(1)
|
3855
3826
|
@driver.find_element(:xpath, '//*[@class="btn-block-right"]').click
|
3856
3827
|
puts '-[√] 글쓰기 버튼 code 2.......'.green
|
@@ -3858,7 +3829,7 @@ post_url = option['post_url'].to_s
|
|
3858
3829
|
rescue
|
3859
3830
|
begin
|
3860
3831
|
el_post_btn = @driver.find_element(:xpath, '//*[@class="write_btn"]')
|
3861
|
-
@driver.
|
3832
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", el_post_btn)
|
3862
3833
|
sleep(1)
|
3863
3834
|
@driver.find_element(:xpath, '//*[@class="write_btn"]').click
|
3864
3835
|
puts '-[√] 글쓰기 버튼 code 3.......'.green
|
@@ -5513,16 +5484,23 @@ begin
|
|
5513
5484
|
sleep(1)
|
5514
5485
|
puts '-[√] 제목 code 37.......'.yellow
|
5515
5486
|
|
5487
|
+
|
5516
5488
|
rescue => e
|
5517
|
-
|
5518
5489
|
puts '-[√] 제목 입력 항목 코드 탐색 실패!!.......'.red
|
5519
5490
|
puts '-[√] 다음 작업 준비 중으로 1~60 초 정도 기다려주세요.......'.red
|
5520
|
-
|
5521
|
-
@driver.
|
5522
|
-
|
5491
|
+
|
5492
|
+
@driver.window_handles.each do |handle|
|
5493
|
+
@driver.switch_to.window(handle)
|
5494
|
+
begin
|
5495
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
5496
|
+
@driver.close
|
5523
5497
|
|
5524
|
-
|
5525
|
-
|
5498
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
5499
|
+
puts "Failed to close tab: #{e.message}"
|
5500
|
+
end
|
5501
|
+
end
|
5502
|
+
return 0
|
5503
|
+
end
|
5526
5504
|
|
5527
5505
|
end
|
5528
5506
|
|
@@ -5575,125 +5553,179 @@ begin
|
|
5575
5553
|
#아이프레임에서 코드 선택
|
5576
5554
|
@driver.switch_to.frame(@driver.find_element(:xpath, '//*[@scrolling="no"]'))
|
5577
5555
|
|
5556
|
+
html_bb = @driver.find_element(:xpath, '//*[@class="se2_to_html"]')
|
5557
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5558
|
+
#아이프레임 나오기
|
5559
|
+
sleep(1)
|
5578
5560
|
@driver.find_element(:xpath, '//*[@class="se2_to_html"]').click
|
5579
|
-
#아이프레임 나오기
|
5580
5561
|
@driver.switch_to.default_content()
|
5581
5562
|
puts '-[√] HTML 코드 1 code.......'.yellow
|
5563
|
+
sleep(1)
|
5582
5564
|
rescue
|
5583
5565
|
begin
|
5584
5566
|
|
5585
|
-
@driver.find_element(:xpath, '//*[@title="HTML 편집"]')
|
5567
|
+
html_bb = @driver.find_element(:xpath, '//*[@title="HTML 편집"]')
|
5568
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5586
5569
|
puts '-[√] HTML 코드 2 code.......'.yellow
|
5587
|
-
|
5570
|
+
sleep(1)
|
5571
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집"]').click
|
5588
5572
|
rescue
|
5589
5573
|
begin
|
5590
5574
|
|
5591
|
-
@driver.find_element(:xpath, '//*[@id="html"]')
|
5575
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="html"]')
|
5576
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5592
5577
|
puts '-[√] HTML 코드 3 code.......'.yellow
|
5578
|
+
sleep(1)
|
5579
|
+
@driver.find_element(:xpath, '//*[@id="html"]').click
|
5593
5580
|
rescue
|
5594
5581
|
begin
|
5595
5582
|
|
5596
|
-
@driver.find_element(:xpath, '//*[@title="코드보기"]')
|
5583
|
+
html_bb = @driver.find_element(:xpath, '//*[@title="코드보기"]')
|
5584
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5597
5585
|
puts '-[√] HTML 코드 4 code.......'.yellow
|
5586
|
+
sleep(1)
|
5587
|
+
@driver.find_element(:xpath, '//*[@title="코드보기"]').click
|
5598
5588
|
rescue
|
5599
5589
|
begin
|
5600
5590
|
|
5601
|
-
@driver.find_element(:xpath, '//*[@id="chk_html"]')
|
5591
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="chk_html"]')
|
5592
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5602
5593
|
puts '-[√] HTML 코드 5 code.......'.yellow
|
5594
|
+
sleep(1)
|
5595
|
+
@driver.find_element(:xpath, '//*[@id="chk_html"]').click
|
5603
5596
|
rescue
|
5604
5597
|
begin
|
5605
5598
|
|
5606
|
-
@driver.find_element(:xpath, '//*[@id="kboard_content-html"]')
|
5599
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="kboard_content-html"]')
|
5600
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5607
5601
|
puts '-[√] HTML 코드 6 code.......'.yellow
|
5602
|
+
sleep(1)
|
5603
|
+
@driver.find_element(:xpath, '//*[@id="kboard_content-html"]').click
|
5608
5604
|
rescue
|
5609
5605
|
begin
|
5610
5606
|
|
5611
|
-
@driver.find_element(:xpath, '//*[@alt="코드"]')
|
5607
|
+
html_bb = @driver.find_element(:xpath, '//*[@alt="코드"]')
|
5608
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5612
5609
|
puts '-[√] HTML 코드 7 code.......'.yellow
|
5610
|
+
sleep(1)
|
5611
|
+
@driver.find_element(:xpath, '//*[@alt="코드"]').click
|
5613
5612
|
rescue
|
5614
5613
|
begin
|
5615
5614
|
|
5616
|
-
@driver.find_element(:xpath, '//*[@title="HTML 편집기"]')
|
5615
|
+
html_bb = @driver.find_element(:xpath, '//*[@title="HTML 편집기"]')
|
5616
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5617
5617
|
puts '-[√] HTML 코드 8 code.......'.yellow
|
5618
|
+
sleep(1)
|
5619
|
+
@driver.find_element(:xpath, '//*[@title="HTML 편집기"]').click
|
5618
5620
|
rescue
|
5619
5621
|
begin
|
5620
5622
|
|
5621
|
-
@driver.find_element(:xpath, '//*[@name="tag"]')
|
5623
|
+
html_bb = @driver.find_element(:xpath, '//*[@name="tag"]')
|
5624
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5622
5625
|
puts '-[√] HTML 코드 9 code.......'.yellow
|
5626
|
+
sleep(1)
|
5627
|
+
@driver.find_element(:xpath, '//*[@name="tag"]').click
|
5623
5628
|
rescue
|
5624
5629
|
begin
|
5625
|
-
|
5630
|
+
html_bb = @driver.find_element(:xpath, '//*[@name="html"]')
|
5631
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5626
5632
|
puts '-[√] HTML 코드 10 code.......'.yellow
|
5627
5633
|
sleep(1.5)
|
5634
|
+
@driver.find_element(:xpath, '//*[@name="html"]').click
|
5628
5635
|
|
5629
5636
|
rescue
|
5630
5637
|
begin
|
5631
5638
|
|
5632
|
-
@driver.find_element(:xpath, '//*[@id="html"]')
|
5639
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="html"]')
|
5640
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5633
5641
|
puts '-[√] HTML 코드 12 code.......'.yellow
|
5634
5642
|
sleep(1)
|
5643
|
+
@driver.find_element(:xpath, '//*[@id="html"]').click
|
5635
5644
|
rescue
|
5636
5645
|
begin
|
5637
5646
|
|
5638
|
-
@driver.find_element(:xpath, '//*[@data-wp-editor-id="kboard_content"]')
|
5647
|
+
html_bb = @driver.find_element(:xpath, '//*[@data-wp-editor-id="kboard_content"]')
|
5648
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5639
5649
|
puts '-[√] HTML 코드 13 code.......'.yellow
|
5640
5650
|
sleep(1)
|
5651
|
+
@driver.find_element(:xpath, '//*[@data-wp-editor-id="kboard_content"]').click
|
5641
5652
|
rescue
|
5642
5653
|
begin
|
5643
5654
|
|
5644
|
-
@driver.find_element(:xpath, '//*[@title="소스"]')
|
5655
|
+
html_bb = @driver.find_element(:xpath, '//*[@title="소스"]')
|
5656
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5645
5657
|
puts '-[√] HTML 코드 14 code.......'.yellow
|
5646
5658
|
sleep(1)
|
5659
|
+
@driver.find_element(:xpath, '//*[@title="소스"]').click
|
5647
5660
|
rescue
|
5648
5661
|
begin
|
5649
5662
|
|
5650
|
-
@driver.find_element(:xpath, '//*[@class="note-btn btn-codeview note-codeview-keep active"]')
|
5663
|
+
html_bb = @driver.find_element(:xpath, '//*[@class="note-btn btn-codeview note-codeview-keep active"]')
|
5664
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5651
5665
|
puts '-[√] HTML 코드 15 code.......'.yellow
|
5652
5666
|
sleep(1)
|
5667
|
+
@driver.find_element(:xpath, '//*[@class="note-btn btn-codeview note-codeview-keep active"]').click
|
5653
5668
|
rescue
|
5654
5669
|
begin
|
5655
5670
|
|
5656
|
-
@driver.find_element(:xpath, '//*[@for="html"]')
|
5671
|
+
html_bb = @driver.find_element(:xpath, '//*[@for="html"]')
|
5672
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5657
5673
|
puts '-[√] HTML 코드 16 code.......'.yellow
|
5658
5674
|
sleep(1)
|
5675
|
+
@driver.find_element(:xpath, '//*[@for="html"]').click
|
5659
5676
|
rescue
|
5660
5677
|
begin
|
5661
5678
|
|
5662
|
-
@driver.find_element(:xpath, '//*[@onclick="html_auto_br(this);"]')
|
5679
|
+
html_bb = @driver.find_element(:xpath, '//*[@onclick="html_auto_br(this);"]')
|
5680
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5663
5681
|
puts '-[√] HTML 코드 17 code.......'.yellow
|
5664
5682
|
sleep(1)
|
5683
|
+
@driver.find_element(:xpath, '//*[@onclick="html_auto_br(this);"]').click
|
5665
5684
|
rescue
|
5666
5685
|
begin
|
5667
5686
|
|
5668
|
-
@driver.find_element(:xpath, '//*[@data-title="코드보기"]')
|
5687
|
+
html_bb = @driver.find_element(:xpath, '//*[@data-title="코드보기"]')
|
5688
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5669
5689
|
puts '-[√] HTML 코드 18 code.......'.yellow
|
5670
5690
|
sleep(1)
|
5691
|
+
@driver.find_element(:xpath, '//*[@data-title="코드보기"]').click
|
5671
5692
|
rescue
|
5672
5693
|
begin
|
5673
5694
|
|
5674
|
-
@driver.find_element(:xpath, '//*[@title="에디터 타입"]')
|
5695
|
+
html_bb = @driver.find_element(:xpath, '//*[@title="에디터 타입"]')
|
5696
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5675
5697
|
puts '-[√] HTML 코드 19 code.......'.yellow
|
5676
5698
|
sleep(1)
|
5699
|
+
@driver.find_element(:xpath, '//*[@title="에디터 타입"]').click
|
5677
5700
|
rescue
|
5678
5701
|
begin
|
5679
5702
|
|
5680
|
-
@driver.find_element(:xpath, '//*[@aria-label="코드 보기"]')
|
5703
|
+
html_bb = @driver.find_element(:xpath, '//*[@aria-label="코드 보기"]')
|
5704
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5681
5705
|
puts '-[√] HTML 코드 20 code.......'.yellow
|
5682
5706
|
sleep(1)
|
5707
|
+
@driver.find_element(:xpath, '//*[@aria-label="코드 보기"]').click
|
5683
5708
|
rescue
|
5684
5709
|
begin
|
5685
5710
|
|
5686
|
-
@driver.find_element(:xpath, '//*[@id="fwrite"]/ul/li[2]/div/div/div').click
|
5711
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="fwrite"]/ul/li[2]/div/div/div').click
|
5712
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5687
5713
|
puts '-[√] HTML 코드 21 code.......'.yellow
|
5688
5714
|
sleep(1)
|
5715
|
+
@driver.find_element(:xpath, '//*[@id="fwrite"]/ul/li[2]/div/div/div')
|
5689
5716
|
rescue
|
5690
5717
|
begin
|
5691
5718
|
|
5692
|
-
@driver.find_element(:xpath, '//*[@data-cke-tooltip-text="소스"]')
|
5719
|
+
html_bb = @driver.find_element(:xpath, '//*[@data-cke-tooltip-text="소스"]')
|
5720
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5693
5721
|
puts '-[√] HTML 코드 22 code.......'.yellow
|
5694
5722
|
sleep(1)
|
5723
|
+
@driver.find_element(:xpath, '//*[@data-cke-tooltip-text="소스"]').click
|
5695
5724
|
rescue
|
5696
5725
|
begin
|
5726
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="moreMisc-1"]')
|
5727
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5728
|
+
sleep(1)
|
5697
5729
|
@driver.find_element(:xpath, '//*[@id="moreMisc-1"]').click
|
5698
5730
|
sleep(1)
|
5699
5731
|
@driver.find_element(:xpath, '//*[@id="html-1"]').click
|
@@ -5701,33 +5733,43 @@ begin
|
|
5701
5733
|
rescue
|
5702
5734
|
begin
|
5703
5735
|
|
5704
|
-
@driver.find_element(:xpath, '//*[@id="html-1"]')
|
5736
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="html-1"]')
|
5737
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5705
5738
|
puts '-[√] HTML 코드 24 code.......'.yellow
|
5706
5739
|
sleep(1)
|
5740
|
+
@driver.find_element(:xpath, '//*[@id="html-1"]').click
|
5707
5741
|
rescue
|
5708
5742
|
begin
|
5709
5743
|
|
5710
|
-
@driver.find_element(:xpath, '//*[@class="fas fa-code"]')
|
5744
|
+
html_bb = @driver.find_element(:xpath, '//*[@class="fas fa-code"]')
|
5745
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5711
5746
|
puts '-[√] HTML 코드 25 code.......'.yellow
|
5712
5747
|
sleep(1)
|
5748
|
+
@driver.find_element(:xpath, '//*[@class="fas fa-code"]').click
|
5713
5749
|
rescue
|
5714
5750
|
begin
|
5715
5751
|
|
5716
|
-
@driver.find_element(:xpath, '//*[@title="HTML모드"]')
|
5752
|
+
html_bb = @driver.find_element(:xpath, '//*[@title="HTML모드"]')
|
5753
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5717
5754
|
puts '-[√] HTML 코드 26 code.......'.yellow
|
5718
5755
|
sleep(1)
|
5756
|
+
@driver.find_element(:xpath, '//*[@title="HTML모드"]').click
|
5719
5757
|
rescue
|
5720
5758
|
begin
|
5721
5759
|
|
5722
|
-
@driver.find_element(:xpath, '//*[@id="wr_content-html"]')
|
5760
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="wr_content-html"]')
|
5761
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5723
5762
|
puts '-[√] HTML 코드 27 code.......'.yellow
|
5724
5763
|
sleep(1)
|
5764
|
+
@driver.find_element(:xpath, '//*[@id="wr_content-html"]').click
|
5725
5765
|
rescue
|
5726
5766
|
begin
|
5727
5767
|
|
5728
|
-
@driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label')
|
5768
|
+
html_bb = @driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label')
|
5769
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", html_bb)
|
5729
5770
|
puts '-[√] HTML 코드 28 code.......'.yellow
|
5730
5771
|
sleep(1)
|
5772
|
+
@driver.find_element(:xpath, '//*[@id="fwrite"]/div[2]/ul/li/label').click
|
5731
5773
|
rescue
|
5732
5774
|
|
5733
5775
|
end
|
@@ -8033,151 +8075,170 @@ sleep(1)
|
|
8033
8075
|
puts '-[√] 내용 등록 버튼 탐색 시작.......'.yellow
|
8034
8076
|
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 ▼▼▼▼▼▼▼──────────────────────────────#######
|
8035
8077
|
begin
|
8036
|
-
@driver.find_element(:xpath, '//*[@value="등록"]')
|
8037
|
-
|
8078
|
+
ss_button = @driver.find_element(:xpath, '//*[@value="등록"]')
|
8079
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8080
|
+
sleep(1)
|
8038
8081
|
|
8039
8082
|
@driver.find_element(:xpath, '//*[@value="등록"]').click
|
8040
8083
|
puts '-[√] 등록을 1번 코드로 시도하였습니다.......'.magenta
|
8041
8084
|
sleep(5)
|
8042
8085
|
rescue
|
8043
8086
|
begin
|
8044
|
-
@driver.find_element(:xpath, '//*[@alt="등록"]')
|
8045
|
-
|
8087
|
+
ss_button = @driver.find_element(:xpath, '//*[@alt="등록"]')
|
8088
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8089
|
+
sleep(1)
|
8046
8090
|
|
8047
8091
|
@driver.find_element(:xpath, '//*[@alt="등록"]').click
|
8048
8092
|
puts '-[√] 등록을 2번 코드로 시도하였습니다.......'.magenta
|
8049
8093
|
sleep(5)
|
8050
8094
|
rescue
|
8051
8095
|
begin
|
8052
|
-
@driver.find_element(:xpath, '//*[@value="작성완료"]')
|
8053
|
-
|
8096
|
+
ss_button = @driver.find_element(:xpath, '//*[@value="작성완료"]')
|
8097
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8098
|
+
sleep(1)
|
8054
8099
|
|
8055
8100
|
@driver.find_element(:xpath, '//*[@value="작성완료"]').click
|
8056
8101
|
puts '-[√] 등록을 3번 코드로 시도하였습니다.......'.magenta
|
8057
8102
|
sleep(5)
|
8058
8103
|
rescue
|
8059
8104
|
begin
|
8060
|
-
@driver.find_element(:xpath, '//*[@id="btn_submit"]')
|
8061
|
-
|
8105
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="btn_submit"]')
|
8106
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8107
|
+
sleep(1)
|
8062
8108
|
@driver.find_element(:xpath, '//*[@id="btn_submit"]').click
|
8063
8109
|
puts '-[√] 등록을 4번 코드로 시도하였습니다.......'.magenta
|
8064
8110
|
sleep(5)
|
8065
8111
|
rescue
|
8066
8112
|
begin
|
8067
|
-
@driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]')
|
8068
|
-
|
8113
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]')
|
8114
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8115
|
+
sleep(1)
|
8069
8116
|
|
8070
8117
|
@driver.find_element(:xpath, '//*[@class="btn btn-success btn-sm"]').click
|
8071
8118
|
puts '-[√] 등록을 5번 코드로 시도하였습니다.......'.magenta
|
8072
8119
|
sleep(5)
|
8073
8120
|
rescue
|
8074
8121
|
begin
|
8075
|
-
@driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]')
|
8076
|
-
|
8122
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]')
|
8123
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8124
|
+
sleep(1)
|
8077
8125
|
|
8078
8126
|
@driver.find_element(:xpath, '//*[@class="btn btn-default btn-send-write"]').click
|
8079
8127
|
puts '-[√] 등록을 6번 코드로 시도하였습니다.......'.magenta
|
8080
8128
|
sleep(5)
|
8081
8129
|
rescue
|
8082
8130
|
begin
|
8083
|
-
@driver.find_element(:xpath, '//*[@title="확인"]')
|
8084
|
-
|
8131
|
+
ss_button = @driver.find_element(:xpath, '//*[@title="확인"]')
|
8132
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8133
|
+
sleep(1)
|
8085
8134
|
|
8086
8135
|
@driver.find_element(:xpath, '//*[@title="확인"]').click
|
8087
8136
|
puts '-[√] 등록을 7번 코드로 시도하였습니다.......'.magenta
|
8088
8137
|
sleep(5)
|
8089
8138
|
rescue
|
8090
8139
|
begin
|
8091
|
-
|
8092
|
-
|
8140
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="btnSubmit"]')
|
8141
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8142
|
+
sleep(1)
|
8093
8143
|
|
8094
8144
|
@driver.find_element(:xpath, '//*[@id="btnSubmit"]').click
|
8095
8145
|
puts '-[√] 등록을 8번 코드로 시도하였습니다.......'.magenta
|
8096
8146
|
sleep(5)
|
8097
8147
|
rescue
|
8098
8148
|
begin
|
8099
|
-
@driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]')
|
8100
|
-
|
8149
|
+
ss_button = @driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]')
|
8150
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8151
|
+
sleep(1)
|
8101
8152
|
|
8102
8153
|
@driver.find_element(:xpath, '//*[@src="images/board8_input.gif"]').click
|
8103
8154
|
puts '-[√] 등록을 9번 코드로 시도하였습니다.......'.magenta
|
8104
8155
|
sleep(5)
|
8105
8156
|
rescue
|
8106
8157
|
begin
|
8107
|
-
@driver.find_element(:xpath, '//*[@align="absmiddle"]')
|
8108
|
-
|
8158
|
+
ss_button = @driver.find_element(:xpath, '//*[@align="absmiddle"]')
|
8159
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8160
|
+
sleep(1)
|
8109
8161
|
|
8110
8162
|
@driver.find_element(:xpath, '//*[@align="absmiddle"]').click
|
8111
8163
|
puts '-[√] 등록을 10번 코드로 시도하였습니다.......'.magenta
|
8112
8164
|
sleep(5)
|
8113
8165
|
rescue
|
8114
8166
|
begin
|
8115
|
-
@driver.find_element(:partial_link_text, '작성완료')
|
8116
|
-
|
8167
|
+
ss_button = @driver.find_element(:partial_link_text, '작성완료')
|
8168
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8169
|
+
sleep(1)
|
8117
8170
|
|
8118
8171
|
@driver.find_element(:partial_link_text, '작성완료').click#요소같고 텍스트가 다를때 텍스트로 타겟
|
8119
8172
|
puts '-[√] 등록을 11번 코드로 시도하였습니다.......'.magenta
|
8120
8173
|
sleep(5)
|
8121
8174
|
rescue
|
8122
8175
|
begin
|
8123
|
-
|
8124
|
-
|
8176
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]')
|
8177
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8178
|
+
sleep(1)
|
8125
8179
|
|
8126
8180
|
@driver.find_element(:xpath, '//*[@class="_save_post save_post btn"]').click
|
8127
8181
|
puts '-[√] 등록을 12번 코드로 시도하였습니다.......'.magenta
|
8128
8182
|
sleep(5)
|
8129
8183
|
rescue
|
8130
8184
|
begin
|
8131
|
-
@driver.find_element(:xpath, '//*[@id="main_btn_box"]/button')
|
8132
|
-
|
8185
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="main_btn_box"]/button')
|
8186
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8187
|
+
sleep(1)
|
8133
8188
|
|
8134
8189
|
@driver.find_element(:xpath, '//*[@id="main_btn_box"]/button').click
|
8135
8190
|
puts '-[√] 등록을 13번 코드로 시도하였습니다.......'.magenta
|
8136
8191
|
sleep(5)
|
8137
8192
|
rescue
|
8138
8193
|
begin
|
8139
|
-
@driver.find_element(:xpath, '//*[@id="bttnComplete1"]')
|
8140
|
-
|
8194
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="bttnComplete1"]')
|
8195
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8196
|
+
sleep(1)
|
8141
8197
|
|
8142
8198
|
@driver.find_element(:xpath, '//*[@id="bttnComplete1"]').click
|
8143
8199
|
puts '-[√] 등록을 14번 코드로 시도하였습니다.......'.magenta
|
8144
8200
|
sleep(5)
|
8145
8201
|
rescue
|
8146
8202
|
begin
|
8147
|
-
@driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button')
|
8148
|
-
|
8203
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button')
|
8204
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8205
|
+
sleep(1)
|
8149
8206
|
|
8150
8207
|
@driver.find_element(:xpath, '//*[@id="bd-write-btns"]/button').click
|
8151
8208
|
puts '-[√] 등록을 15번 코드로 시도하였습니다.......'.magenta
|
8152
8209
|
sleep(5)
|
8153
8210
|
rescue
|
8154
8211
|
begin
|
8155
|
-
@driver.find_element(:xpath, '//*[@id="com_btn"]')
|
8156
|
-
|
8212
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="com_btn"]')
|
8213
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8214
|
+
sleep(1)
|
8157
8215
|
|
8158
8216
|
@driver.find_element(:xpath, '//*[@id="com_btn"]').click
|
8159
8217
|
puts '-[√] 등록을 16번 코드로 시도하였습니다.......'.magenta
|
8160
8218
|
sleep(5)
|
8161
8219
|
rescue
|
8162
8220
|
begin
|
8163
|
-
@driver.find_element(:xpath, '//*[@class="submit"]')
|
8164
|
-
|
8221
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="submit"]')
|
8222
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8223
|
+
sleep(1)
|
8165
8224
|
|
8166
8225
|
@driver.find_element(:xpath, '//*[@class="submit"]').click
|
8167
8226
|
puts '-[√] 등록을 17번 코드로 시도하였습니다.......'.magenta
|
8168
8227
|
sleep(5)
|
8169
8228
|
rescue
|
8170
8229
|
begin
|
8171
|
-
@driver.find_element(:xpath, '//*[@id="savePostInBoard"]')
|
8172
|
-
|
8230
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="savePostInBoard"]')
|
8231
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8232
|
+
sleep(1)
|
8173
8233
|
|
8174
8234
|
@driver.find_element(:xpath, '//*[@id="savePostInBoard"]').click
|
8175
8235
|
puts '-[√] 등록을 18번 코드로 시도하였습니다.......'.magenta
|
8176
8236
|
sleep(5)
|
8177
8237
|
rescue
|
8178
8238
|
begin
|
8179
|
-
@driver.find_element(:xpath, '//*[@form="write"]')
|
8180
|
-
|
8239
|
+
ss_button = @driver.find_element(:xpath, '//*[@form="write"]')
|
8240
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8241
|
+
sleep(1)
|
8181
8242
|
|
8182
8243
|
@driver.find_element(:xpath, '//*[@form="write"]').click
|
8183
8244
|
puts '-[√] 등록을 19번 코드로 시도하였습니다.......'.magenta
|
@@ -8185,8 +8246,9 @@ rescue
|
|
8185
8246
|
|
8186
8247
|
rescue
|
8187
8248
|
begin
|
8188
|
-
@driver.find_element(:partial_link_text, '저장하기')
|
8189
|
-
|
8249
|
+
ss_button = @driver.find_element(:partial_link_text, '저장하기')
|
8250
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8251
|
+
sleep(1)
|
8190
8252
|
|
8191
8253
|
@driver.find_element(:partial_link_text, '저장하기').click #요소같고 텍스트가 다를때 텍스트로 타겟
|
8192
8254
|
puts '-[√] 등록을 20번 코드로 시도하였습니다.......'.magenta
|
@@ -8194,8 +8256,9 @@ rescue
|
|
8194
8256
|
|
8195
8257
|
rescue
|
8196
8258
|
begin
|
8197
|
-
@driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]')
|
8198
|
-
|
8259
|
+
ss_button = @driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]')
|
8260
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8261
|
+
sleep(1)
|
8199
8262
|
|
8200
8263
|
@driver.find_element(:xpath, '//*[@id="boardWriteForm"]/div/div[3]/a[2]').click
|
8201
8264
|
puts '-[√] 등록을 21시도하였습니다.......'.magenta
|
@@ -8203,9 +8266,9 @@ rescue
|
|
8203
8266
|
|
8204
8267
|
rescue
|
8205
8268
|
begin
|
8206
|
-
|
8207
|
-
@driver.
|
8208
|
-
sleep(
|
8269
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btnWrite"]')
|
8270
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8271
|
+
sleep(1)
|
8209
8272
|
|
8210
8273
|
@driver.find_element(:xpath, '//*[@class="btnWrite"]').click
|
8211
8274
|
puts '-[√] 등록을 22시도하였습니다.......'.magenta
|
@@ -8213,43 +8276,47 @@ rescue
|
|
8213
8276
|
|
8214
8277
|
rescue
|
8215
8278
|
begin
|
8216
|
-
@driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]')
|
8217
|
-
|
8279
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]')
|
8280
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8281
|
+
sleep(1)
|
8218
8282
|
|
8219
8283
|
@driver.find_element(:xpath, '//*[@class="btn_blue btn_svc write"]').click
|
8220
|
-
puts '-[√] 등록을
|
8284
|
+
puts '-[√] 등록을 23번 코드로 시도하였습니다.......'.magenta
|
8221
8285
|
sleep(5)
|
8222
8286
|
|
8223
8287
|
rescue
|
8224
8288
|
begin
|
8225
|
-
@driver.find_element(:xpath, '//*[@type="submit"]')
|
8226
|
-
|
8289
|
+
ss_button = @driver.find_element(:xpath, '//*[@type="submit"]')
|
8290
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8291
|
+
sleep(1)
|
8227
8292
|
|
8228
8293
|
@driver.find_element(:xpath, '//*[@type="submit"]').click
|
8229
|
-
puts '-[√] 등록을
|
8294
|
+
puts '-[√] 등록을 24번 코드로 시도하였습니다.......'.magenta
|
8230
8295
|
sleep(5)
|
8231
8296
|
|
8232
8297
|
rescue
|
8233
8298
|
begin
|
8234
|
-
@driver.find_element(:xpath, '//*[@class="button-agree"]')
|
8235
|
-
|
8299
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="button-agree"]')
|
8300
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8301
|
+
sleep(1)
|
8236
8302
|
|
8237
8303
|
@driver.find_element(:xpath, '//*[@class="button-agree"]').click
|
8238
|
-
puts '-[√] 등록을
|
8304
|
+
puts '-[√] 등록을 25번 코드로 시도하였습니다.......'.magenta
|
8239
8305
|
sleep(5)
|
8240
8306
|
|
8241
8307
|
rescue
|
8242
8308
|
begin
|
8243
|
-
@driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]')
|
8244
|
-
|
8309
|
+
ss_button = @driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]')
|
8310
|
+
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", ss_button)
|
8311
|
+
sleep(1)
|
8245
8312
|
|
8246
8313
|
@driver.find_element(:xpath, '//*[@class="btnSubmitFix sizeM"]').click
|
8247
|
-
puts '-[√] 등록을
|
8314
|
+
puts '-[√] 등록을 26번 코드로 시도하였습니다.......'.magenta
|
8248
8315
|
sleep(5)
|
8249
8316
|
|
8250
8317
|
rescue
|
8251
|
-
|
8252
|
-
|
8318
|
+
|
8319
|
+
|
8253
8320
|
########─────────────────────────────▼▼▼▼▼▼▼ 등록버튼 2차 시도 ▼▼▼▼▼▼▼──────────────────────────────#######
|
8254
8321
|
begin
|
8255
8322
|
puts '-[√] 등록 버튼 코드 탐색에 실패하였습니다.......'.magenta
|
@@ -8407,13 +8474,22 @@ rescue
|
|
8407
8474
|
@driver.action.key_down(:enter).key_up(:enter).perform #엔터
|
8408
8475
|
puts '-[√] 등록을 시도하였습니다.......'.magenta
|
8409
8476
|
sleep(5)
|
8410
|
-
|
8477
|
+
|
8478
|
+
rescue => e
|
8411
8479
|
puts '-[√] 등록 실패.......'.red
|
8412
8480
|
puts '-[√] 로딩 및 코드인식 실패등 기타 이유로 다음 게시판 작업으로 이동합니다.......'.red
|
8413
8481
|
puts '-[√] 다음 작업 준비로 약 1초~60초 내외 시간이 소요됩니다.......'.red
|
8414
|
-
|
8415
|
-
|
8416
|
-
|
8482
|
+
@driver.window_handles.each do |handle|
|
8483
|
+
@driver.switch_to.window(handle)
|
8484
|
+
begin
|
8485
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
8486
|
+
@driver.close
|
8487
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
8488
|
+
puts "Failed to close tab: #{e.message}"
|
8489
|
+
end
|
8490
|
+
end
|
8491
|
+
return 0
|
8492
|
+
end
|
8417
8493
|
|
8418
8494
|
end
|
8419
8495
|
|
@@ -8518,22 +8594,38 @@ rescue
|
|
8518
8594
|
|
8519
8595
|
|
8520
8596
|
|
8521
|
-
|
8522
|
-
|
8523
|
-
rescue
|
8524
|
-
end
|
8597
|
+
|
8598
|
+
|
8525
8599
|
|
8526
8600
|
rescue => e
|
8527
8601
|
puts '-[√] 글쓰기 페이지 접근 및 코드 탐색 ERROR 발생.......'.red
|
8528
|
-
@driver.
|
8529
|
-
|
8602
|
+
@driver.window_handles.each do |handle|
|
8603
|
+
@driver.switch_to.window(handle)
|
8604
|
+
begin
|
8605
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
8606
|
+
@driver.close
|
8607
|
+
|
8608
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
8609
|
+
puts "Failed to close tab: #{e.message}"
|
8610
|
+
end
|
8611
|
+
end
|
8612
|
+
return 0
|
8613
|
+
end
|
8530
8614
|
sleep(1)
|
8531
8615
|
########크롬드라이버 전체 닫기##########
|
8532
8616
|
begin
|
8533
|
-
|
8534
|
-
|
8535
|
-
|
8536
|
-
|
8617
|
+
@driver.window_handles.each do |handle|
|
8618
|
+
@driver.switch_to.window(handle)
|
8619
|
+
begin
|
8620
|
+
# 로딩 중이거나, 페이지가 완전히 로딩되지 않더라도 탭을 닫기
|
8621
|
+
@driver.close
|
8622
|
+
|
8623
|
+
rescue Selenium::WebDriver::Error::WebDriverError => e
|
8624
|
+
puts "Failed to close tab: #{e.message}"
|
8625
|
+
end
|
8626
|
+
end
|
8627
|
+
|
8628
|
+
rescue
|
8537
8629
|
end
|
8538
8630
|
########크롬드라이버 전체 닫기##########
|
8539
8631
|
|
@@ -8547,6 +8639,7 @@ end
|
|
8547
8639
|
end
|
8548
8640
|
|
8549
8641
|
|
8642
|
+
|
8550
8643
|
class Wordpress
|
8551
8644
|
include Glimmer
|
8552
8645
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: posting_duo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: File to Clipboard gem
|
14
14
|
email: mymin26@naver.com
|