Skip to content

Instantly share code, notes, and snippets.

View bbchriscesar's full-sized avatar
🏠
Working from home

Christianne Cesar bbchriscesar

🏠
Working from home
View GitHub Profile
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains as chains
import os.path
import time
options = webdriver.ChromeOptions()
options.add_argument("--kiosk") # For Mac
from appium.webdriver.common.touch_action import TouchAction
actions = TouchAction(driver)
element = driver.find_elementxxxxxxxxxxx
actions.long_press(element)
actions.perform()
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class Main {
public static void main(String[] args) throws Exception {
// write your code here
String [] locales = {"en-US", "en-GB", "pt-PT", "pt-BR"};
qbfile = open("C:\Users\Christianne II\Desktop\Python_Output\locales.txt", "r")
for locale in qbfile.readlines():
print(locale.strip() + " is the current language")
qbfile.close()
package com.acnlpotester;
import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.remote.DesiredCapabilities;
import io.appium.java_client.MobileElement;
import io.appium.java_client.remote.MobileCapabilityType;
import org.openqa.selenium.remote.RemoteWebElement;
Step 1 – Prerequsite is
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev \ libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
Step 2 – Download Python 3.7
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.apache.commons.io.FileUtils;
import java.io.File;
import org.openqa.selenium.*;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class ScreenCapture extends BaseClass {
public static WebDriver driver;
from selenium import webdriver
from PIL import Image
import time
options = webdriver.ChromeOptions()
options.add_argument('user-data-dir=/usr/local/google/home/christiannec/.config/google-chrome/Profile_04')
options.add_argument("--start-maximized")
driver = webdriver.Chrome(executable_path="/usr/local/google/home/christiannec/ChromeBrowserDriver/chromedriver_04", options=options)
driver.get('https://www.google.com.ph/maps/@14.5135378,121.0654025,13z?hl=en')
from selenium import webdriver
import os.path
import time
options = webdriver.ChromeOptions()
options.add_argument('user-data-dir=/usr/local/google/home/christiannec/.config/google-chrome/Profile_04')
options.add_argument("--start-maximized")
driver = webdriver.Chrome(executable_path="/usr/local/google/home/christiannec/ChromeBrowserDriver/chromedriver_04", options=options)
def openNewTab(URL):