- /path/to/exim -v 'user@domain'
- type a multi-line message here ending with blank line
- hit ^D to end message and send
- you should be returned to shell
Showing posts with label test. Show all posts
Showing posts with label test. Show all posts
Tuesday, 15 October 2013
Test exim from CLI without "mail" command
If you don't have "mail" on the CLI for whatever, weird (Redhat-based) reasons, circumvent like so:
Monday, 15 July 2013
Selenium test on CLI in 5 minutes using Java
This took me two weeks to nail down looking at it here and there.
- mkdir stests
- cd stests
- wget http://selenium.googlecode.com/files/selenium-java-2.33.0.zip
- unzip selenium-java-2.33.0.zip
- mkdir jars
- find selenium-2.33.0 -type f -name '*jar' -exec mv -v {} jars \;
- rm -rfv selenium-*
- mkdir src
- vi src/Test.java
- use below code
- mkdir out
- javac -d out -cp 'jars/*' src/MyTest.java
- ignore "Notes" output
- cd out
- rm -rfv org
- java -cp '../jars/*:.' MyTest
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.WebDriverWait;
public class MyTest {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("Cheese!");
element.submit();
System.out.println("Page title is: " + driver.getTitle());
(new WebDriverWait(driver, 10)).until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
return d.getTitle().toLowerCase().startsWith("cheese!");
}
});
System.out.println("Page title is: " + driver.getTitle());
driver.quit();
}
}
Saturday, 11 May 2013
Subscribe to:
Posts (Atom)
Interview questions: 2020-12
Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer Networking Layer 1 vs Layer 4 haproxy u...
-
CRITICAL: AWS now offers internal VPC DNS! Below is no longer necessary AFAIK. Woo hoo! http://aws.amazon.com/about-aws/whats-new/2014/...
-
build sudo apt-get install git gcc sudo apt-get install automake autoconf git clone git://github.com/rriley/tsunami-udp.git cd tsunam...
-
From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4 Assumptions: jEdit was installed into /Applications directory. Close any...