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
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
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 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
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
select * from ( | |
select order_id from orders where funny_order = 1 | |
order by dbms_random.value | |
) where rownum = 1; |
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; |
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
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"); |
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
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"); |
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
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(); |