Skip to content

Instantly share code, notes, and snippets.

@manuelkiessling
Last active February 25, 2019 10:13
Show Gist options
  • Save manuelkiessling/81a61c42df3edfa3bd2af60bdbed81fd to your computer and use it in GitHub Desktop.
Save manuelkiessling/81a61c42df3edfa3bd2af60bdbed81fd to your computer and use it in GitHub Desktop.
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');
});
{
"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"
}
}
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