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
select order_id from orders where funny_order = 1 and rownum <= 1000; |
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
public boolean verifyButtonDisplayed() { | |
return driver.findElement(By.name("fancy-button")).isDisplayed(); | |
} |
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
public boolean verifyButtonDisplayed() { | |
WebElement button = driver.findElement(By.name("fancy-button")); | |
assertTrue(button.isDisplayed(), "Button is not displayed"); | |
return button.isDisplayed(); | |
} |
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
public boolean isButtonDisplayed() { | |
return driver.findElement(By.name("fancy-button")).isDisplayed(); | |
} | |
public void verifyButtonDisplayed() { | |
assertTrue(isButtonDisplayed(), "Button is not displayed"); | |
} |
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
from selenium.webdriver import Firefox | |
from selenium.webdriver.common.by import By | |
driver = Firefox() | |
driver.get('http://ya.ru') | |
element = driver.find_element(By.XPATH, 'id("mail")/a') | |
print element.get_attribute('href') | |
driver.close() |
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 Link(WebElement): | |
def get_href(self): | |
return self.get_attribute('href') |
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
from selenium.webdriver import Firefox | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.remote.webelement import WebElement | |
class Link(WebElement): | |
def get_href(self): | |
return self.get_attribute('href') | |
driver = Firefox() | |
driver.get('http://ya.ru') |
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
from random import randint | |
from math import copysign | |
def generate(exception, n): | |
x = randint(1, n - 1) | |
if x >= exception: | |
return x + 1 | |
return x | |
def generate_math(exception, n): |
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
{ | |
"data":[ | |
{ | |
"id":"churn", | |
"values":[ | |
{ | |
"id":"2012-04-01", | |
"values":[ | |
{ | |
"id":"churn", |
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 webium import settings | |
from webium import driver as webium_driver_hack | |
from webium import BasePage | |
from selenium.webdriver.common.by import By | |
from webium import Find, Finds | |
from selenium.webdriver.remote.webelement import WebElement | |
from selenium import webdriver | |
import time |