#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
*** Settings *** | |
Library AppiumLibrary 15 run_on_failure=Log Source | |
Library Process | |
Suite Setup Spawn Appium Server | |
Suite Teardown Close Appium Server | |
Test Teardown Close Application | |
*** Variables *** | |
## Go here to download the apk for the app used in this test -> https://drive.google.com/file/d/19FxLjux8ZtumweXzBA_CYrL0Va-BL4gY/view?usp=sharing |
<html> | |
<head> | |
<link href="http://getbootstrap.com/2.3.2/assets/css/bootstrap.css" rel="stylesheet" /> | |
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> | |
<script src="script.js"></script> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="tic-tac-toe"> | |
<div class="span3 new_span"> |
from selenium import webdriver | |
import time | |
# JavaScript: HTML5 Drag and drop script | |
# param1 (WebElement): Source element to drag | |
# param2 (WebElement): Optional - target element for the drop | |
# param3 (int): Optional - Drop offset x relative to the target if any or source element | |
# param4 (int): Optional - Drop offset y relative to the target if any or source element | |
# param4 (int): Optional - Delay in milliseconds (default = 1ms) for dragging and dropping | |
# param5 (string): Optional - Key pressed (alt or ctrl or shilf) |
#Getting Started
##Webpage:
<html>
<head>
<title>Testing with Ruby and Selenium WebDriver</title>
</head>
<body bgcolor="antiquewhite">
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
class Page(object): | |
""" | |
Base class that all page models can inherit from | |
""" | |
def __init__(self, selenium_driver, base_url='https://test.axial.net', parent=None): | |
self.base_url = base_url |
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |
#Giant dictonary to hold key name and VK value | |
VK_CODE = {'backspace':0x08, | |
'tab':0x09, | |
'clear':0x0C, | |
'enter':0x0D, | |
'shift':0x10, | |
'ctrl':0x11, | |
'alt':0x12, | |
'pause':0x13, | |
'caps_lock':0x14, |