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