duo_blog_comment 0.0.26 → 0.0.27
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/duo_blog_comment.rb +16 -23
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc867f7a2c5c2f2ad6cf60e7020e4fd965559b956bf088cc9b7a01dacfc85168
|
4
|
+
data.tar.gz: b6a01915f95a5934e6dcf3876f808940256c063c1accca7bf4ba2a344597b6a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16ec2f93e646e9b6728e784d9132a530a5422498b479d2ccee6a51512cdf006b75a129cef40ac74781b551292fe9dacfca14d4e3f511ef27832523bc62ce4dd9
|
7
|
+
data.tar.gz: 4730886583f0f6f3b1957b54a6b1bcf3751ede4524c667a1f860467b422f3f0b001415a0c286c66a0d905e9c9408df9abd417a3f3a1b589f47c52cf5508bcb02
|
data/lib/duo_blog_comment.rb
CHANGED
@@ -468,7 +468,7 @@ class Naver
|
|
468
468
|
element = @driver.find_element(:xpath, '//*[@class="aline"]')
|
469
469
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
470
470
|
sleep(2)
|
471
|
-
element
|
471
|
+
element.send_keys(:return)
|
472
472
|
sleep(1)
|
473
473
|
puts '-진행4.......'.red
|
474
474
|
rescue
|
@@ -476,34 +476,27 @@ class Naver
|
|
476
476
|
element = @driver.find_element(:xpath, '//*[@id="listCountToggle"]')
|
477
477
|
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
478
478
|
sleep(2)
|
479
|
-
element
|
479
|
+
element.send_keys(:return)
|
480
480
|
sleep(1)
|
481
481
|
puts '-진행5.......'.red
|
482
482
|
rescue
|
483
|
-
|
484
|
-
element = @driver.find_element(:xpath, '//*[@id="listCountView"]')
|
485
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
486
|
-
sleep(2)
|
487
|
-
element = @driver.find_element(:xpath, '//*[@id="listCountView"]').click
|
488
|
-
sleep(1)
|
489
|
-
puts '-진행6.......'.red
|
490
|
-
rescue
|
491
|
-
begin
|
492
|
-
element = @driver.find_element(:xpath, '//i[@class="icon"]')
|
493
|
-
@driver.execute_script("arguments[0].scrollIntoView({block: 'center', inline: 'center'})", element)#크롤 이동
|
494
|
-
sleep(2)
|
495
|
-
element = @driver.find_element(:xpath, '//i[@class="icon"]').click
|
496
|
-
sleep(1)
|
497
|
-
puts '-진행7.......'.red
|
498
|
-
rescue
|
499
|
-
|
500
|
-
end
|
501
|
-
end
|
483
|
+
|
502
484
|
end
|
503
485
|
end
|
504
486
|
|
505
|
-
|
506
|
-
|
487
|
+
puts '-진행8.......'.red
|
488
|
+
# WebDriverWait과 expected_conditions 가져오기
|
489
|
+
wait = Selenium::WebDriver::Wait.new(timeout: 10) # 10초 대기
|
490
|
+
|
491
|
+
# 요소가 화면에 보일 때까지 대기 후 바로 클릭
|
492
|
+
wait.until {
|
493
|
+
el = @driver.find_element(:xpath, '//div[@id="changeListCount"]//a[@data-value="30"]')
|
494
|
+
el.displayed? # 요소가 화면에 보이는지 확인
|
495
|
+
}
|
496
|
+
|
497
|
+
# 요소 클릭
|
498
|
+
@driver.find_element(:xpath, '//div[@id="changeListCount"]//a[@data-value="30"]').click
|
499
|
+
|
507
500
|
puts '-진행9.......'.red
|
508
501
|
@driver.switch_to.default_content
|
509
502
|
|