Skip to content

Instantly share code, notes, and snippets.

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()
public boolean isButtonDisplayed() {
return driver.findElement(By.name("fancy-button")).isDisplayed();
}
public void verifyButtonDisplayed() {
assertTrue(isButtonDisplayed(), "Button is not displayed");
}
public boolean verifyButtonDisplayed() {
WebElement button = driver.findElement(By.name("fancy-button"));
assertTrue(button.isDisplayed(), "Button is not displayed");
return button.isDisplayed();
}
public boolean verifyButtonDisplayed() {
return driver.findElement(By.name("fancy-button")).isDisplayed();
}
select order_id from orders where funny_order = 1 and rownum <= 1000;
select * from (
select order_id from orders where funny_order = 1
order by dbms_random.value
) where rownum = 1;
@Khrol
Khrol / query.sql
Last active December 24, 2015 22:19
select order_id from orders where funny_order = 1;
assertTrue(someBooleanValue, "Some boolean value is not true as expected");
assertFalse(someBooleanValue, "Some boolean value is not false as expected");
assertNotNull(someObject, "Some object is null as not expected");
assertEquals(actualStringValue, "Expected String Value", "Some string is not as expected");
assertTrue(someBooleanValue, "Some boolean value is not true as expected");
assertTrue(!someBooleanValue, "Some boolean value is not false as expected");
assertTrue(someObject != null, "Some object is null as not expected");
assertTrue(actualStringValue.equals("Expected String Value"), "Some string is not as expected");
package com.khroliz;
import net.yandex.speller.services.spellservice.*;
import java.util.List;
public class WebServiceUsage {
public static void main(String[] args) {
SpellService service = new SpellService();
SpellServiceSoap port = service.getSpellServiceSoap();