Showing
2 changed files
with
44 additions
and
3 deletions
| @@ -3,7 +3,6 @@ Library Selenium2Screenshots | @@ -3,7 +3,6 @@ Library Selenium2Screenshots | ||
| 3 | Library String | 3 | Library String |
| 4 | Library DateTime | 4 | Library DateTime |
| 5 | 5 | ||
| 6 | - | ||
| 7 | *** Variables *** | 6 | *** Variables *** |
| 8 | ${file_path} local_path_to_file("TestDocument.docx") | 7 | ${file_path} local_path_to_file("TestDocument.docx") |
| 9 | ${locator.tenderId} xpath=//td[./text()='TenderID']/following-sibling::td[1] | 8 | ${locator.tenderId} xpath=//td[./text()='TenderID']/following-sibling::td[1] |
| @@ -14,9 +13,13 @@ ${locator.minimalStep.amount} xpath=//td[./text()='Крок зменшеР| @@ -14,9 +13,13 @@ ${locator.minimalStep.amount} xpath=//td[./text()='Крок зменшеР| ||
| 14 | ${locator.enquiryPeriod.endDate} xpath=//td[./text()='Завершення періоду обговорення']/following-sibling::td[1] | 13 | ${locator.enquiryPeriod.endDate} xpath=//td[./text()='Завершення періоду обговорення']/following-sibling::td[1] |
| 15 | ${locator.tenderPeriod.endDate} xpath=//td[./text()='Завершення періоду прийому пропозицій']/following-sibling::td[1] | 14 | ${locator.tenderPeriod.endDate} xpath=//td[./text()='Завершення періоду прийому пропозицій']/following-sibling::td[1] |
| 16 | ${locator.items[0].deliveryAddress.countryName} xpath=//td[@class='nameField'][./text()='Адреса поставки']/following-sibling::td[1] | 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 | ${locator.items[0].classification.scheme} xpath=//td[@class = 'nameField'][./text()='Клас CPV'] | 17 | ${locator.items[0].classification.scheme} xpath=//td[@class = 'nameField'][./text()='Клас CPV'] |
| 19 | ${locator.items[0].additionalClassifications[0].scheme} xpath=//td[@class = 'nameField'][./text()='Клас ДКПП'] | 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 | *** Keywords *** | 24 | *** Keywords *** |
| 22 | Підготувати клієнт для користувача | 25 | Підготувати клієнт для користувача |
| @@ -315,6 +318,16 @@ Set Multi Ids | @@ -315,6 +318,16 @@ Set Multi Ids | ||
| 315 | Wait Until Page Contains ${ARGUMENTS[1]} 30 | 318 | Wait Until Page Contains ${ARGUMENTS[1]} 30 |
| 316 | Capture Page Screenshot | 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 | [Arguments] @{ARGUMENTS} | 332 | [Arguments] @{ARGUMENTS} |
| 320 | [Documentation] | 333 | [Documentation] |
| @@ -370,4 +383,29 @@ Set Multi Ids | @@ -370,4 +383,29 @@ Set Multi Ids | ||
| 370 | 383 | ||
| 371 | отримати інформацію про items[0].additionalClassifications[0].scheme | 384 | отримати інформацію про items[0].additionalClassifications[0].scheme |
| 372 | ${additionalClassificationsScheme}= отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].scheme | 385 | ${additionalClassificationsScheme}= отримати тест із поля і показати на сторінці items[0].additionalClassifications[0].scheme |
| 373 | - [return] ${additionalClassificationsScheme.split(' ')[1]} | ||
| 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} |
| @@ -58,10 +58,13 @@ def compare_date(data1, data2): | @@ -58,10 +58,13 @@ def compare_date(data1, data2): | ||
| 58 | data2=parse(data2) | 58 | data2=parse(data2) |
| 59 | if data1.tzinfo is None: | 59 | if data1.tzinfo is None: |
| 60 | data1 = TIMEZONE.localize(data1) | 60 | data1 = TIMEZONE.localize(data1) |
| 61 | + print data1 | ||
| 61 | if data2.tzinfo is None: | 62 | if data2.tzinfo is None: |
| 62 | data2 = TIMEZONE.localize(data2) | 63 | data2 = TIMEZONE.localize(data2) |
| 64 | + print data2 | ||
| 63 | delta = (data1-data2).total_seconds() | 65 | delta = (data1-data2).total_seconds() |
| 64 | if abs(delta) > 60: | 66 | if abs(delta) > 60: |
| 67 | + print delta | ||
| 65 | return False | 68 | return False |
| 66 | return True | 69 | return True |
| 67 | 70 |
Please
register
or
login
to post a comment