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.junit.jupiter.api.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.support.ui.ExpectedConditions; | |
import org.openqa.selenium.support.ui.WebDriverWait; | |
import static org.junit.jupiter.api.Assertions.assertEquals; | |
import java.time.Duration; | |
public class MinimizeWebDriver |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
function usage(){ | |
echo -e "\nThis script will record what is happening on an Android device" | |
echo -e " " | |
echo -e "Usage: './`basename $0` foo' or './`basename $0` foo.mp4'" | |
echo -e "Both of the above will produce a recording with the filename 'foo.mp4'" |
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
#!/usr/bin/env bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
function usage(){ | |
echo -e "\nThis script will screenshot what is happening on an Android device" | |
echo -e " " | |
echo -e "Usage: './`basename $0` foo' or './`basename $0` foo.mp4'" | |
echo -e "Both of the above will produce a recording with the filename 'foo.mp4'" |
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.junit.Assert; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.chrome.ChromeOptions; | |
import org.openqa.selenium.safari.SafariDriver; | |
import org.openqa.selenium.support.ui.ExpectedConditions; | |
import org.openqa.selenium.support.ui.WebDriverWait; |
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
tail -n 0 -f log.txt | grep --line-buffered 'ERROR' | while read line; do afplay beep-01a.wav; done | |
#log.txt this is the log file you want to tail. Full path if not in that directory | |
#'ERROR' is the stirng you are looking to match | |
#beep-01a.wav is the sound to play when string matched. Full path if not in that directory | |
#Maik later responded saying his logfile was on a remote server, he discovered the following worked to tail a remote file | |
ssh <user@remoteserver> tail -n 0 -f log.txt | grep --line-buffered 'ERROR' | while read line; do afplay beep-01a.wav; done |
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 class UserBuilder | |
{ | |
private User; | |
public UserBuilder() | |
{ | |
User = new User(); | |
user.setFirstName("Richard"); | |
user.setSurname("Bradshaw"); | |
user.setAge(29); |
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 UserChecks | |
{ | |
public void DataCreation() | |
{ | |
User user = UserBuilder().buildGenericUser(); | |
user.setSurname("Richards"); | |
user.setAge(35); | |
UserCreator.create(user); | |
} | |
} |
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 UserChecks | |
{ | |
public void DataCreation() | |
{ | |
User user = UserBuilder().buildGenericUser(); | |
user.setSurname("Richards"); | |
user.setAge(35); | |
} | |
} |
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 class UserBuilder | |
{ | |
public User buildGenericUser() | |
{ | |
User user = new User(); | |
user.setFirstName("Richard"); | |
user.setSurname("Bradshaw"); | |
user.setAge(29); | |
user.setEmailAddress("richard@richard.com"); | |
return user; |
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 class UserBuilder | |
{ | |
public User buildGenericUser() | |
{ | |
User user = new User(); | |
user.setFirstName("Richard"); | |
user.setSurname("Bradshaw"); | |
user.setAge(29); | |
user.setEmailAddress("richard@richard.com"); | |
return user; |
NewerOlder