티스토리 뷰
def TreatPage(self, webDriver, paramIn, pageNo=None):
# Treating page ...
tagProperty = paramIn.get('TagProperty')
tagType = paramIn.get('TagType')
tagValue = paramIn.get('TagValue')
tagProperty = paramIn.get('TagProperty')
valueID = paramIn.get('ValueID')
attrib = paramIn.get('Attribute')
subTags = paramIn.get('SubTag_s')
startPageNo = paramIn.get('StartPage')
if not startPageNo: startPageNo = 1
if not pageNo:
pageNo = startPageNo
elem0 = self.GetElement(webDriver, tagType, tagValue)
if str(type(subTags))=="<class 'list'>":
for subTag in subTags:
tagType1 = subTag['TagType']
tagValue1 = subTag['TagValue']
elems1 = self.GetElements(elem0, tagType1, tagValue1)
for elem1 in elems1:
try:
num1 = int(elem1.text)
except Exception as e:
continue
if num1==pageNo:
elem1.click()
webDriver.implicitly_wait(5) # delay
return webDriver
elif str(type(subTags))=="<class 'dict'>":
tagType1 = subTag['TagType']
tagValue1 = subTag['TagValue']
elems1 = self.GetElements(elem0, tagType1, tagValue1)
for elem1 in elems1:
try:
num1 = int(elem1.text)
except Exception as e:
continue
if num1==pageNo:
elem1.click()
webDriver.implicitly_wait(5) # delay
return webDriver
else:
print("[?] Wrong Type of SubTags")
return None
return None반응형
'SWDesk' 카테고리의 다른 글
| [Python] Send Email through Outlook (2) | 2022.06.03 |
|---|---|
| [Python] Testing ... DataFrame (0) | 2022.05.31 |
| [Python] PickNewItems - TreatSubTag() (0) | 2022.05.28 |
| [Python] PickNewItems - GetItemValue() (0) | 2022.05.26 |
| [Python] Data Addition after Initialization (0) | 2022.05.23 |
반응형
250x250
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 치매방지
- 빌리칠드
- Innovations
- 티스토리챌린지
- 전압
- Decorator
- 오블완
- Innovations&Hurdles
- 허들
- 둎
- image
- 심심풀이
- arduino
- Hurdles
- 혁신
- 치매
- BiliChild
- 심심풀이치매방지기
- BSC
- 전류
- Video
- DYOV
- 혁신과허들
- Innovation&Hurdles
- 빌리언트
- bilient
- ServantClock
- 아두이노
- 절연형
- 배프
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함

