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
# coding=utf-8 | |
import unittest | |
import junitxml | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
import sys | |
## | |
# Framework Part | |
## |
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.openqa.selenium.By; | |
import org.openqa.selenium.Capabilities; | |
import org.openqa.selenium.chrome.ChromeOptions; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class App { |
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
# coding=utf-8 | |
import unittest | |
import junitxml | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.support.abstract_event_listener import AbstractEventListener | |
from selenium.webdriver.support.event_firing_webdriver import EventFiringWebDriver | |
import sys | |
class TestListener(AbstractEventListener): |
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
# coding=utf-8 | |
from selenium import webdriver | |
from selenium.webdriver import ActionChains | |
driver = webdriver.Firefox() | |
driver.get('http://go.mail.ru/') | |
source = driver.find_element_by_id("source") | |
target = driver.find_element_by_id("target") | |
action_chains = ActionChains(driver) | |
action_chains.drag_and_drop(source, target); |
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
# coding=utf-8 | |
import unittest | |
import junitxml | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.support.abstract_event_listener import AbstractEventListener | |
from selenium.webdriver.support.event_firing_webdriver import EventFiringWebDriver | |
import sys | |
class TestListener(AbstractEventListener): |
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
def butter(func): | |
print '===butter==' | |
func() | |
@butter | |
def bread(): | |
print '===bread===' | |
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
def butter(func): | |
print '===butter==' | |
func() | |
def bread(): | |
print '===bread===' | |
butter(bread) |
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
# coding=utf-8 | |
import unittest | |
import junitxml | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
import sys | |
def lazy_drivers(capabilities, rwd='http://127.0.0.1:4444/wd/hub'): | |
for capability in capabilities: |
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
# coding=utf-8 | |
import unittest | |
from selenium.common.exceptions import NoSuchElementException | |
def require_load(func): | |
def load_page(page, *params, **kwargs): | |
if not page.is_loaded(): | |
page.load() | |
assert (page.is_loaded()), "Страница не загружена" | |
return func(page, *params, **kwargs) |
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
# coding=utf-8 | |
import unittest | |
from selenium import webdriver | |
class SimpleTest(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Firefox() | |
self.driver.maximize_window() | |
def test_result_page_load_for_mail(self): |
NewerOlder