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.common.by import By | |
from selenium.webdriver.support import expected_conditions as EC | |
driver = webdriver.Chrome() | |
driver.get('http://www.w3schools.com/js/tryit.asp?filename=tryjs_prompt') | |
driver.switch_to_frame('iframeResult') |
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 robot.libraries.BuiltIn import BuiltIn | |
def check_text(text): | |
s2l = BuiltIn().get_library_instance('Selenium2Library') | |
driver = s2l._current_browser() | |
for element in driver.find_elements_by_xpath('//*'): | |
if text in element.text: | |
return | |
raise ValueError('Text {} not from page'.format(text)) |
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
*** Settings *** | |
Library Selenium2Library | |
Library example.py | |
*** Test Cases *** | |
Example | |
Open Browser https://www.google.fi/ browser=gc | |
Check Text Google | |
[TEARDOWN] Close Browser |
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
import shutil | |
import logging | |
import json | |
import os | |
import xml.etree.ElementTree as ET | |
from robot.errors import DataError | |
from finder import finder | |
from data_parser.data_parser import DataParser | |
from queue import ParsingQueue | |
from parser_utils.file_formatter import rf_table_name, lib_table_name |
This file has been truncated, but you can view the full file.
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
=== Verbose logging started: 27/09/2016 10:12:35 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\Windows\system32\msiexec.exe === | |
MSI (c) (20:D8) [10:12:35:631]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg | |
MSI (c) (20:D8) [10:12:35:631]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg | |
MSI (c) (20:3C) [10:12:35:641]: Resetting cached policy values | |
MSI (c) (20:3C) [10:12:35:641]: Machine policy value 'Debug' is 0 | |
MSI (c) (20:3C) [10:12:35:641]: ******* RunEngine: | |
******* Product: node-v4.5.0-x64.msi | |
******* Action: |
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 robot.libraries.BuiltIn import BuiltIn | |
def open_my_browser(url): | |
# Code here to open browser your my way | |
driver = webdriver.Chrome() | |
# Code here to open browser my way ends | |
driver.get(url) | |
s2l = BuiltIn().get_library_instance('Selenium2Library') |
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
import inspect | |
from robot.api.deco import keyword | |
class FindElement(object): | |
def __init__(self, ctx): | |
self.ctx = ctx | |
@keyword |
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
import time | |
from glance_dom import GlanceDom | |
from selenium import webdriver | |
driver = webdriver.Chrome() | |
driver.get('https://github.com/robotframework/SeleniumLibrary') | |
glance = GlanceDom(driver) |
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
C:\workspace>appium | |
[Appium] Welcome to Appium v1.7.1 | |
[Appium] Appium REST http interface listener started on 0.0.0.0:4723 | |
[HTTP] --> POST /wd/hub/session {"capabilities":{"alwaysMatch":{"platformName":"android"}, | |
"firstMatch":[{}]},"desiredCapabilities":{"platformVersion":"7.0","appPackage":"com.androi | |
d.settings","platformName":"android","appActivity":".Settings","deviceName":"Galaxy J5 (20 | |
17)"}} | |
[debug] [MJSONWP] Calling AppiumDriver.createSession() with args: [{"platformVersion":"7.0 | |
","appPackage":"com.android.settings","platformName":"android","appActivity":".Settings"," | |
deviceName":"Galaxy J5 (2017)"},null,{"alwaysMatch":{"platformName":"android"},"firstMatch |
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
2017-11-01 15:51:01:644 - [Appium] New AndroidUiautomator2Driver session created successfully, session a1e4c991-e24b-4c71-910e-1c88a151e61f added to master session list | |
2017-11-01 15:51:01:644 - [debug] [BaseDriver] Event 'newSessionStarted' logged at 1509544261644 (15:51:01 GMT+0200 (EET)) | |
2017-11-01 15:51:01:645 - [debug] [MJSONWP] Responding to client with driver.createSession() result: {"platformVersion":"6.0.1","appPackage":"com.android.settings","platformName":"android","appActivity":".Settings","deviceName":"Samsung_J5","newCommandTimeout":300,"noReset":true,"fullReset":false,"udid":"04f2cee7","automationName":"uiautomator2"} | |
2017-11-01 15:51:01:647 - [HTTP] <-- POST /wd/hub/session 200 44640 ms - 319 | |
2017-11-01 15:51:03:399 - [HTTP] --> POST /wd/hub/session/a1e4c991-e24b-4c71-910e-1c88a151e61f/elements {"using":"xpath","sessionId":"a1e4c991-e24b-4c71-910e-1c88a151e61f","value":"//*[@text='Apps']"} | |
2017-11-01 15:51:03:402 - [debug] [MJSONWP] Calling AppiumDriver.findElements() with args: ["xpath","//*[ |
OlderNewer