This file contains 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 org.w3c.dom.* ; | |
import org.xml.sax.SAXException; | |
import javax.xml.parsers.* ; | |
import java.io.* ; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
public class Metrics { | |
static String logo = "https://cdn.pixabay.com/photo/2016/08/02/10/42/wifi-1563009_960_720.jpg"; |
This file contains 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 java.io.IOException; | |
public class test { | |
public static void main(String[] args) throws IOException { | |
String image_path = "image_path"; | |
String image_path_value; | |
String xml_path = "xml_path"; | |
String xml_path_image; |
This file contains 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 *** | |
Input Text Into Field Using JS | |
[Arguments] ${locator} ${value} | |
${element}= Set Variable document.evaluate("${locator}", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue | |
Execute JavaScript ${element}.value='${value}' |
This file contains 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
class RobotListener: | |
ROBOT_LISTENER_API_VERSION = 3 | |
def __init__(self): | |
print('Before ALL') | |
def start_suite(self, suite, attrs): | |
print('Before Suite') | |
print(len(suite.tests)) |
This file contains 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 numpy as np | |
import cv2 | |
# for windows, mac users | |
from PIL import ImageGrab | |
# for linux users | |
# import pyscreenshot as ImageGrab | |
# four character code object for video writer | |
fourcc = cv2.VideoWriter_fourcc(*'XVID') | |
# video writer object |
This file contains 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 SeleniumLibrary | |
*** Test Case *** | |
Verify CSS Style Of Header | |
Open Browser https://adiralashivaprasad.blogspot.in/ chrome | |
Sleep 10s | |
${css_style}= Get CSS Attribute Value locator=//h1[contains(.,'Shiva Prasad Adirala')] attribute=font | |
Should Contain ${css_style} 36px |
This file contains 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
# http://doc.pytest.org/en/latest/_modules/_pytest/runner.html | |
# https://github.com/AaronWxy/TestCommon/blob/259d605d555dde3736b3f7f445242a7bf8067bbc/src/resource/conftest.py | |
import pytest | |
from _pytest.runner import pytest_sessionstart | |
from _pytest.runner import pytest_runtest_setup | |
from _pytest.runner import runtestprotocol | |
from _pytest.runner import pytest_runtest_teardown | |
from _pytest.runner import pytest_runtest_teardown |
This file contains 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
# save file as conftest.py | |
import pytest | |
from _pytest.runner import pytest_sessionstart | |
from _pytest.runner import pytest_runtest_setup | |
from _pytest.runner import runtestprotocol | |
from _pytest.runner import pytest_runtest_teardown | |
from _pytest.runner import pytest_runtest_teardown | |
def pytest_sessionstart(session): |
This file contains 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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script> | |
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet" /> | |
<script src="https://code.jquery.com/jquery-3.3.1.js" type="text/javascript"></script> |
This file contains 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
<!DOCTYPE doctype html> | |
<html lang="en"> | |
<head> | |
<link href="https://img.icons8.com/flat_round/64/000000/bar-chart.png" rel="shortcut icon" type="image/x-icon" /> | |
<title>Pytest Metrics</title> | |
<meta charset="utf-8" /> | |
<meta content="width=device-width, initial-scale=1" name="viewport" /> | |
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" rel="stylesheet" /> | |
<link href="https://cdn.datatables.net/buttons/1.5.2/css/buttons.dataTables.min.css" rel="stylesheet" /> |