티스토리 뷰
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 (0) | 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
- image
- 둎
- 혁신
- 절연형
- 전압전류모니터링
- Video
- ServantClock
- DYOV
- arduino
- 허들
- 치매방지
- 심심풀이
- Decorator
- 심심풀이치매방지기
- 오블완
- Innovations
- 전압
- bilient
- 티스토리챌린지
- 아두이노
- 치매
- badp
- BSC
- 빌리언트
- Innovations&Hurdles
- 혁신과허들
- Hurdles
- Innovation&Hurdles
- 전류
- 배프
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함