This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ```*** Settings *** | |
| Library Selenium2Library | |
| Library DateTime | |
| Library month_dates.py | |
| Library String | |
| *** Variables *** | |
| ${November} 30 | |
| ${y} 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from robot.api import ExecutionResult, ResultVisitor | |
| def _parse_results_xml(path): | |
| class ExecutionChecker(ResultVisitor): | |
| def __init__(self): | |
| self.results = { | |
| 'pass': 0, | |
| 'fail': 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import collections | |
| from lxml import etree | |
| def collect_suite_stats(suite_output): | |
| """ | |
| Extract suite execution statistics from output file | |
| :param suite_output: file with suite output | |
| :return: suite statistics | |
| """ | |
| def _suite_stats_collect(suite_root): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :FOR ${INDEX} IN RANGE 999999 | |
| \ Wait Until Keyword Succeeds 1 min 1 sec Drag And Drop By Offset xpath=//td[text()='${NAME}'] 0 -${OFFSET} | |
| \ ${NEW_PAGE_2_LOCATION} Wait Until Keyword Succeeds 1 min 1 sec Get Vertical Position xpath=//td[text()='${NAME}'] | |
| \ ${NEW_PAGE_2_Y} Convert To Integer ${NEW_PAGE_2_LOCATION} | |
| \ Exit For Loop If ${NEW_PAGE_2_Y} < ${PAGE_2_Y} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def capture_large_screenshot(): | |
| currentWindow = s2l.get_window_size() | |
| page_height = s2l._current_browser().execute_script("return typeof(jQuery) !== 'undefined' ? jQuery(document).height() : 1080;") | |
| page_width = currentWindow[0] | |
| original_height = currentWindow[1] | |
| s2l.set_window_size(page_width, page_height) | |
| s2l.capture_page_screenshot() | |
| s2l.set_window_size(page_width, original_height) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import string | |
| def ara_anagrams(): | |
| str1 = input("Please input your first string : ") | |
| str2 = input("Please input your second string : ") | |
| exclude = sorted(set(string.punctuation)) | |
| str1 = ''.join(ch for ch in str1 if ch not in exclude) | |
| str2 = ''.join(ch for ch in str2 if ch not in exclude) | |
| if ''.join(sorted(set(str1.replace(" ", "").lower().strip()))) == ''.join( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *** Keywords *** | |
| GET AUTH_TOKEN | |
| [Arguments] ${CREDENTIALS} | |
| Create Session AUTH ${ROOT_URL} verify=${True} | |
| ${resp}= POST Request AUTH /token | |
| ... headers=${HEADERS} | |
| ... data=${CREDENTIALS} | |
| ... timeout=${timeout} | |
| Should Be Equal As Strings ${resp.status_code} 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| import os | |
| class Programs: | |
| def __init__(self): # class constructur (called at creation time) | |
| self.code = "" # the default name is the empty string | |
| def catalogcode(code): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. | |
| A: Rerun robot failed cases and Merge both them | |
| #-----First execute the robot tests which are under tests folder | |
| pybot -d results --output original.xml tests/mytest.robot | |
| #-------Rerun the failed tests | |
| pybot -d results --rerunfailed results/original.xml --output rerun.xml tests/mytest.robot | |
| #----Mergeboth the results | |
| rebot -d results --merge results/original.xml results/rerun.xml |