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
{ | |
"type": "object", | |
"properties": { | |
"log": { | |
"description": "HTTP Archive structure.", | |
"type": "object", | |
"properties": { | |
"version": { | |
"description": "HAR format version", | |
"type": "string", |
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
var pref_service = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService).getBranch("extensions.selenium-ide."); | |
function Log(category) { | |
var log = this; | |
var self = this; | |
this.category = category; | |
function LogLevel(level, name) { | |
this.level = level; | |
this.name = name; |
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
<?php | |
require_once('Media.php'); | |
class PHPWebDriver_WebDriver_Support_HTML5_Video extends PHPWebDriver_WebDriver_Support_HTML5_Media { | |
protected function gettable_properties() { | |
$properties = array("width", "height", "videoWidth", "videoHeight", "poster"); | |
return array_merge(parent::$gettable_media_properties, $properties); | |
} | |
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
<?php | |
require_once(dirname(__FILE__) . '/../PHPWebDriver/WebDriver.php'); | |
require_once(dirname(__FILE__) . '/../PHPWebDriver/WebDriverProxy.php'); | |
// yes, i know this is just local for me right now... | |
require_once '/Users/adam/work/PHPBrowserMobProxy/PHPBrowserMobProxy/Client.php'; | |
class ProxyTest extends PHPUnit_Framework_TestCase { | |
protected static $driver; | |
protected static $client; | |
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 os.path | |
import pytest | |
import sys | |
f = os.path.join(os.path.dirname(__file__), "allievi.sssup.it.120601_0_89e253d69250548c5d814019fdd4f1ca.har.json") | |
def setup_module(module): | |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) | |
class TestHar(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
import pytest | |
from selenium.webdriver import Firefox | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.wait import WebDriverWait | |
from selenium.webdriver.support.select import Select | |
from selenium.common.exceptions import UnexpectedTagNameException | |
class ComboBox(object): | |
def __init__(self, webelement): | |
if webelement.tag_name.lower() != "div": |
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 Select(Element, WebDriverSelect): | |
""" | |
This works for getting the current value of a select element, and for setting it | |
-- but fails for /also/ getting the 'options' that are available. Thinking that I | |
need to use my_select.selection with @property and @selection.setter and | |
my_select.options with @property | |
Now, what I would love is to still use __set__ and __get__ to interact with the | |
the select, but also be able to get the options... | |
""" |
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
<?php | |
// Copyright 2012-present Element 34 | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software |
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
<?php | |
namespace WebDriver; | |
require_once('dashboard.php'); | |
require_once(dirname(__FILE__) . '/../../../PHPWebDriver/WebDriverWait.php'); | |
require_once(dirname(__FILE__) . '/../../../PHPWebDriver/WebDriverBy.php'); | |
class SauceLoginPage { | |
private $locators = array( | |
"username" => array(\PHPWebDriver_WebDriverBy::ID, 'username'), |
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
Security Testing | |
---------------- | |
- its not paranoia if they really are after you | |
- https://www.owasp.org (top 10 is 2 years old, but still relevant) | |
- (a1) sql injection | |
- parameterized sql | |
- code review | |
- (a2) xss | |
- all input safe | |
- <script>alert('hello');</script> |