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
# Add to your zsh profile | |
function devicepid() { | |
if [ -z "$1" ]; then | |
echo "Usage: devicepid <device-name> <search>" | |
echo "Example: devicepid 'iPhone 15 Pro Max' SpringBoard" | |
return 1 | |
fi | |
if [ -z "$2" ]; then |
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
/* On a real device it is not possible to simply call driver.get("url"), doing so will open SIRI and query with "url" resulting in a search. | |
Instead we can take advantage of Safari's launch parameters and pass deep link URL as argument. | |
Below is an example: */ | |
String deepLinkURL = "deeplink://"; | |
driver.executeScript("mobile: terminateApp", ImmutableMap.of("bundleId", "com.apple.mobilesafari")); | |
List args = new ArrayList(); |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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 qualify.appium; | |
import org.openqa.grid.internal.utils.DefaultCapabilityMatcher; | |
import java.util.Map; | |
/** | |
* This class is for nodes to determine Capability Matching using deviceName. | |
* For Capability Matcher change: | |
* - java -jar QualifyMatcher.jar -role hub -capabilityMatcher qualify.appium.QualifyMatcher |