Last active
February 25, 2019 10:13
-
-
Save manuelkiessling/81a61c42df3edfa3bd2af60bdbed81fd to your computer and use it in GitHub Desktop.
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 { Selector } from 'testcafe'; | |
fixture `Getting Started` | |
.page `http://devexpress.github.io/testcafe/example`; | |
test('My first test', async t => { | |
await t | |
.typeText('#developer-name', 'John Smith') | |
.click('#submit-button'); | |
}); |
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
{ | |
"name": "simple-test-testcafe", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.spec.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"test:selenium:chrome": "testcafe selenium:chrome ./index.spec.js", | |
"test:selenium:firefox": "testcafe selenium:firefox ./index.spec.js" | |
}, | |
"author": "", | |
"license": "ISC", | |
"dependencies": { | |
"testcafe": "^1.0.1", | |
"testcafe-browser-provider-selenium": "^0.3.0" | |
} | |
} |
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 unittest | |
import os | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
class PythonOrgSearch(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.Remote( | |
command_executor=os.environ['SELENIUM_SERVER'], | |
desired_capabilities={'browserName': 'firefox', 'javascriptEnabled': True} | |
) | |
def test_search_in_python_org(self): | |
driver = self.driver | |
driver.get("https://www.galeria-kaufhof.de") | |
assert "GALERIA Kaufhof" in driver.title | |
def tearDown(self): | |
self.driver.close() | |
if __name__ == "__main__": | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment