This file contains hidden or 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
| { | |
| "platformName": "iOS", | |
| "platformVersion": "12.1", | |
| "automationName": "XCUITest", | |
| "deviceName": "iPhone X", | |
| "bundleId": "com.apple.mobilesafari", | |
| "udid": "03e31c51fa1e678ba5c2433929d7d84c69a3d433", | |
| "xcodeOrgId": "TLZG6YM7ZM", | |
| "xcodeSigningId": "iPhone Developer" | |
| } |
This file contains hidden or 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 appium import webdriver | |
| from appium.webdriver.common.touch_action import TouchAction | |
| import time | |
| import os.path | |
| locales = ['en', ' ja', 'de'] | |
| slash = '/' | |
| for locale in locales: | |
| directory = '/Users/christiannec/Documents/Demo/' + locale |
This file contains hidden or 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 skimage.measure import structural_similarity as ssim | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| import cv2 | |
| def mse(imageA, imageB): | |
| # the 'Mean Squared Error' between the two images is the | |
| # sum of the squared difference between the two images; | |
| # NOTE: the two images must have the same dimension |
This file contains hidden or 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 import webdriver | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| from selenium.webdriver.common.by import By | |
| from PageObjects import Locators | |
| import time | |
| def test_loadSettings(): | |
| def waitforpresence(element): |
This file contains hidden or 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
| #Using ActionChains | |
| from selenium import webdriver | |
| from selenium.webdriver.common.action_chains import ActionChains | |
| target = driver.find_element_by_xpath("//*[@id='body-content']/div[1]/div/div[1]/div[2]/div[5]/div/div[2]") | |
| actions = ActionChains(driver) | |
| actions.move_to_element(target) | |
| actions.perform() |
This file contains hidden or 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 import webdriver | |
| from selenium.webdriver.common.keys import Keys | |
| driver.find_element_by_xpath("//*[@id='tsf']/div[2]/div/div[1]/div/div[1]/input").send_keys('How are you!', Keys.ENTER) |
This file contains hidden or 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 import webdriver | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.support.ui import WebDriverWait | |
| from selenium.webdriver.support import expected_conditions as EC | |
| driver.get("https://www.lazada.com.ph/") | |
| wait = WebDriverWait(driver, 10) | |
| element = wait.until(EC.element_to_be_clickable((By.XPATH, "//li[@id='Level_1_Category_No1']"))) | |
| for menu in range(len(driver.find_elements_by_xpath("//li[@class='lzd-site-menu-root-item']"))): |
This file contains hidden or 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
| memberList = driver.find_elements_by_xpath("//li[contains(@class,'memberListItem')]")[element].text | |
| f = open("Member_list.txt", "a") | |
| f.write(memberList + '\n') | |
| f.close() |
This file contains hidden or 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 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 | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf8') | |
| options = webdriver.ChromeOptions() | |
| options.add_argument('--no-sandbox') |
This file contains hidden or 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 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 | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf8') | |
| options = webdriver.ChromeOptions() | |
| options.add_argument('--no-sandbox') |