Showing
2 changed files
with
44 additions
and
3 deletions
| ... | ... | @@ -3,7 +3,6 @@ Library Selenium2Screenshots |
| 3 | 3 | Library String |
| 4 | 4 | Library DateTime |
| 5 | 5 | |
| 6 | - | |
| 7 | 6 | *** Variables *** |
| 8 | 7 | ${file_path} local_path_to_file("TestDocument.docx") |
| 9 | 8 | ${locator.tenderId} xpath=//td[./text()='TenderID']/following-sibling::td[1] |
| ... | ... | @@ -14,9 +13,13 @@ ${locator.minimalStep.amount} xpath=//td[./text()='Крок зменшеР|
| 14 | 13 | ${locator.enquiryPeriod.endDate} xpath=//td[./text()='Завершення періоду обговорення']/following-sibling::td[1] |
| 15 | 14 | ${locator.tenderPeriod.endDate} xpath=//td[./text()='Завершення періоду прийому пропозицій']/following-sibling::td[1] |
| 16 | 15 | ${locator.items[0].deliveryAddress.countryName} xpath=//td[@class='nameField'][./text()='Адреса поставки']/following-sibling::td[1] |
| 17 | -${locator.items[0].deliveryDate} xpath=//td[./text()='Кінцева дата поставки']/following-sibling::td[1] | |
| 16 | +${locator.items[0].deliveryDate} xpath=//td[./text()='Кінцева дата поставки']/following-sibling::td[1] | |
| 18 | 17 | ${locator.items[0].classification.scheme} xpath=//td[@class = 'nameField'][./text()='Клас CPV'] |
| 19 | 18 | ${locator.items[0].additionalClassifications[0].scheme} xpath=//td[@class = 'nameField'][./text()='Клас ДКПП'] |
| 19 | +${locator.questions[0].title} xpath=//div[@class = 'question relative']//div[@class = 'title'] | |
| 20 | +${locator.questions[0].description} xpath = //div[@class='text'] | |
| 21 | +${locator.questions[0].date} xpath = //div[@class='date'] | |
| 22 | +${locator.questions[0].answer} xpath=//div[@class = 'answer relative']//div[@class = 'text'] | |
| 20 | 23 | |
| 21 | 24 | *** Keywords *** |
| 22 | 25 | Підготувати клієнт для користувача |
| ... | ... | @@ -315,6 +318,16 @@ Set Multi Ids |
| 315 | 318 | Wait Until Page Contains ${ARGUMENTS[1]} 30 |
| 316 | 319 | Capture Page Screenshot |
| 317 | 320 | |
| 321 | +обновити сторінку з тендером | |
| 322 | + [Arguments] @{ARGUMENTS} | |
| 323 | + [Documentation] | |
| 324 | + ... ${ARGUMENTS[0]} = username | |
| 325 | + ... ${ARGUMENTS[1]} = description | |
| 326 | + | |
| 327 | + Selenium2Library.Switch Browser ${ARGUMENTS[0]} | |
| 328 | + netcast.Пошук тендера по ідентифікатору ${ARGUMENTS[0]} ${ARGUMENTS[1]} | |
| 329 | + Reload Page | |
| 330 | + | |
| 318 | 331 | отримати інформацію із тендера |
| 319 | 332 | [Arguments] @{ARGUMENTS} |
| 320 | 333 | [Documentation] |
| ... | ... | @@ -370,4 +383,29 @@ Set Multi Ids |
| 370 | 383 | |
| 371 | 384 | отримати інформацію про items[0].additionalClassifications[0].scheme |
| 372 | 385 | ${additionalClassificationsScheme}= отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].scheme |
| 373 | - [return] ${additionalClassificationsScheme.split(' ')[1]} | |
| \ No newline at end of file | ||
| 386 | + [return] ${additionalClassificationsScheme.split(' ')[1]} | |
| 387 | + | |
| 388 | +отримати інформацію про questions[0].title | |
| 389 | + sleep 1 | |
| 390 | + Click Element xpath=//a[@class='reverse tenderLink'] | |
| 391 | + sleep 1 | |
| 392 | + Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] | |
| 393 | + ${questionsTitle}= отримати тест із поля і показати на сторінці questions[0].title | |
| 394 | + ${questionsTitle}= Convert To Lowercase ${questionsTitle} | |
| 395 | + [return] ${questionsTitle.capitalize().split('.')[0] + '.'} | |
| 396 | + | |
| 397 | +отримати інформацію про questions[0].description | |
| 398 | + ${questionsDescription}= отримати тест із поля і показати на сторінці questions[0].description | |
| 399 | + [return] ${questionsDescription} | |
| 400 | + | |
| 401 | +отримати інформацію про questions[0].date | |
| 402 | + ${questionsDate}= отримати тест із поля і показати на сторінці questions[0].date | |
| 403 | + [return] ${questionsDate} | |
| 404 | + | |
| 405 | +отримати інформацію про questions[0].answer | |
| 406 | + sleep 1 | |
| 407 | + Click Element xpath=//a[@class='reverse tenderLink'] | |
| 408 | + sleep 1 | |
| 409 | + Click Element xpath=//a[@class='reverse openCPart'][span[text()='Обговорення']] | |
| 410 | + ${questionsAnswer}= отримати тест із поля і показати на сторінці questions[0].answer | |
| 411 | + [return] ${questionsAnswer} | |
| \ No newline at end of file | ... | ... |
| ... | ... | @@ -58,10 +58,13 @@ def compare_date(data1, data2): |
| 58 | 58 | data2=parse(data2) |
| 59 | 59 | if data1.tzinfo is None: |
| 60 | 60 | data1 = TIMEZONE.localize(data1) |
| 61 | + print data1 | |
| 61 | 62 | if data2.tzinfo is None: |
| 62 | 63 | data2 = TIMEZONE.localize(data2) |
| 64 | + print data2 | |
| 63 | 65 | delta = (data1-data2).total_seconds() |
| 64 | 66 | if abs(delta) > 60: |
| 67 | + print delta | |
| 65 | 68 | return False |
| 66 | 69 | return True |
| 67 | 70 | ... | ... |
Please
register
or
login
to post a comment