Releases: seleniumbase/SeleniumBase
Releases · seleniumbase/SeleniumBase
Fix MSEdgeDriver automatic installation
Fix MSEdgeDriver automatic installation
- The MSEdgeDriver being using must be on the local SeleniumBase Path rather than on the System Path. This prevents permission issues. If it's not there when a test uses the Edge Browser, it will automatically get downloaded into the SeleniumBase drivers folder.
Here's an example of running a SeleniumBase test using the new Edge browser:
cd examples/
pytest basic_test.py -v --browser=edge
=============================================== test session starts ================================================
platform darwin -- Python 3.7.0, pytest-5.3.5, py-1.8.0, pluggy-0.13.1 -- /Users/michael/.virtualenvs/sbase7/bin/python
metadata: {'Python': '3.7.0', 'Platform': 'Darwin-18.7.0-x86_64-i386-64bit', 'Packages': {'pytest': '5.3.5', 'py': '1.8.0', 'pluggy': '0.13.1'}, 'Plugins': {'timeout': '1.3.4', 'html': '2.0.1', 'rerunfailures': '9.0', 'xdist': '1.31.0', 'ordering': '0.6', 'forked': '1.1.3', 'metadata': '1.8.0', 'cov': '2.8.1', 'seleniumbase': '1.37.2'}}
rootdir: /Users/michael/github/SeleniumBase, inifile: pytest.ini
plugins: timeout-1.3.4, html-2.0.1, rerunfailures-9.0, xdist-1.31.0, ordering-0.6, forked-1.1.3, metadata-1.8.0, cov-2.8.1, seleniumbase-1.37.2
collected 1 item
basic_test.py::MyTestClass::test_basic
Warning: msedgedriver not found. Installing now:
Downloading edgedriver_mac64.zip from:
https://msedgedriver.azureedge.net/79.0.309.65/edgedriver_mac64.zip ...
Download Complete!
Extracting ['msedgedriver'] from edgedriver_mac64.zip ...
Unzip Complete!
The file [msedgedriver] was saved to:
/Users/michael/github/SeleniumBase/seleniumbase/drivers/msedgedriver
Making [msedgedriver 79.0.309.65] executable ...
[msedgedriver] is now ready for use!
PASSED
================================================ 1 passed in 11.58s
Brython integration and more
Brython integration and more
- Add the Brython integration (Example with Python replacing JS)
- Add methods for pressing arrow keys
- Update the language translations
- Update the offline demo page with the associated test
- Improve JS method reliability
- Add and update User Agent tests
- Update the example proxy list
- Update Python dependencies
Add methods and examples for offline testing
Add methods and examples for offline testing:
- Add methods for injecting html into a web page
self.load_html_string(html_string, new_page=True)
self.load_html_file(html_file, new_page=True)
self.open_html_file(html_file)
- Use complete cloudflare links for accessing libraries
- Add assert_raises() to avoid the camel-casing of assertRaises()
- Update the beautifulsoup and certifi dependences
- Improve highlighting in Demo Mode
- Increase the bring_to_front() z-index setting
- Make sure jQuery is fully activated before using it
- Add an offline example with a single-page web app
Update error output, logging, and dependencies
Update error output, logging, and dependencies
- Update error output
- Refactor logging
- Update Python dependencies
Translate SeleniumBase to Portuguese
Translate SeleniumBase to Portuguese
- Here's the example test:
# Portuguese Language Test - Python 3 Only!
from seleniumbase.translate.portuguese import CasoDeTeste
class MinhaClasseDeTeste(CasoDeTeste):
def test_exemplo_1(self):
self.abrir_url("https://pt.wikipedia.org/wiki/")
self.verificar_texto("Wikipédia")
self.verificar_elemento('[title="Visitar a página principal"]')
self.atualizar_texto("#searchInput", "Rio de Janeiro")
self.clique("#searchButton")
self.verificar_texto("Rio de Janeiro", "#firstHeading")
self.verificar_elemento('img[alt*="edifícios"]')
self.atualizar_texto("#searchInput", "São Paulo")
self.clique("#searchButton")
self.verificar_texto("São Paulo", "#firstHeading")
self.verificar_elemento('img[src*="Monumento"]')
self.voltar()
self.verificar_verdade("Janeiro" in self.obter_url_atual())
self.avançar() # noqa
self.verificar_verdade("Paulo" in self.obter_url_atual())
Add methods for checkboxes and radio buttons
Add methods for checkboxes and radio buttons
self.is_selected(selector, by=By.CSS_SELECTOR, timeout=None)
# Duplicates: self.is_checked(selector, by=By.CSS_SELECTOR, timeout=None)
self.select_if_unselected(selector, by=By.CSS_SELECTOR)
# Duplicates: self.check_if_unchecked(selector, by=By.CSS_SELECTOR)
self.unselect_if_selected(selector, by=By.CSS_SELECTOR)
# Duplicates: self.uncheck_if_checked(selector, by=By.CSS_SELECTOR)
SeleniumBase in Spanish
Add a Spanish translation of SeleniumBase
- Here's the example test:
from seleniumbase.translate.spanish import CasoDePrueba
class MiClaseDePrueba(CasoDePrueba):
def test_ejemplo_1(self):
self.abrir_url("https://es.wikipedia.org/wiki/")
self.verificar_texto("Wikipedia")
self.verificar_elemento('[title="Visitar la página principal"]')
self.actualizar_texto("#searchInput", "Parc d'Atraccions Tibidabo")
self.haga_clic("#searchButton")
self.verificar_texto("Tibidabo", "#firstHeading")
self.verificar_elemento('img[alt*="Tibidabo"]')
self.actualizar_texto("#searchInput", "Palma de Mallorca")
self.haga_clic("#searchButton")
self.verificar_texto("Palma de Mallorca", "#firstHeading")
self.verificar_elemento('img[alt*="Palma"]')
self.volver()
self.verificar_verdad("Tibidabo" in self.obtener_url_actual())
self.adelante()
self.verificar_verdad("Mallorca" in self.obtener_url_actual())
SeleniumBase in Italian
SeleniumBase in Italian
Here's what the example test looks like:
from seleniumbase.translate.italian import CasoDiProva
class ClasseDiTest(CasoDiProva):
def test_esempio_1(self):
self.apri_url("https://it.wikipedia.org/wiki/")
self.verificare_il_testo("Wikipedia")
self.verificare_elemento('[title="Lingua italiana"]')
self.aggiornare_il_testo("#searchInput", "Pizza")
self.fare_clic("#searchButton")
self.verificare_il_testo("Pizza", "#firstHeading")
self.verificare_elemento('img[alt*="pizza"]')
self.aggiornare_il_testo("#searchInput", "Colosseo")
self.fare_clic("#searchButton")
self.verificare_il_testo("Colosseo", "#firstHeading")
self.verificare_elemento('img[alt*="Colosseo"]')
self.indietro()
self.verificare_correttezza("Pizza" in self.ottenere_url_corrente())
self.avanti()
self.verificare_correttezza("Colosseo" in self.ottenere_url_corrente())
Add the French translation of SeleniumBase
Add the French translation of SeleniumBase
- Adding SeleniumBase methods in French
- Also updating existing translations
- Add an example test in French
- Limit demo-mode highlights for non-browser asserts
- Make sure special characters are kept with
self.get_current_url()
Here's what the example test in French looks like:
from seleniumbase.translate.french import CasDeBase
class ClasseDeTest(CasDeBase):
def test_exemple_1(self):
self.ouvrir_url("https://fr.wikipedia.org/wiki/")
self.vérifier_le_texte("Wikipédia") # noqa
self.vérifier_un_élément('[title="Visiter la page d’accueil"]')
self.modifier_le_texte("#searchInput", "Crème brûlée")
self.cliquez_sur("#searchButton")
self.vérifier_le_texte("Crème brûlée", "#firstHeading")
self.vérifier_un_élément('img[alt*="Crème brûlée"]')
self.modifier_le_texte("#searchInput", "Jardin des Tuileries")
self.cliquez_sur("#searchButton")
self.vérifier_le_texte("Jardin des Tuileries", "#firstHeading")
self.vérifier_un_élément('img[alt*="Jardin des Tuileries"]')
self.retour()
self.vérifier_la_vérité("brûlée" in self.obtenir_url_actuelle())
self.en_avant()
self.vérifier_la_vérité("Jardin" in self.obtenir_url_actuelle())
Add the Korean translation of SeleniumBase
Add the Korean translation of SeleniumBase
- Adding SeleniumBase methods in Korean
- Also updating a Python dependency
- Add an example test in Korean
Here's what the example test in Korean looks like:
from seleniumbase.translate.korean import 셀레늄_테스트_케이스 # noqa
class 테스트_클래스(셀레늄_테스트_케이스): # noqa
def test_실시예_1(self):
self.URL_열기("https://ko.wikipedia.org/wiki/")
self.텍스트_확인("위키백과")
self.요소_확인('[title="위키백과:소개"]')
self.텍스트를_업데이트("#searchInput", "김치")
self.클릭("#searchButton")
self.텍스트_확인("김치", "#firstHeading")
self.요소_확인('img[alt="Various kimchi.jpg"]')
self.텍스트를_업데이트("#searchInput", "비빔밥")
self.클릭("#searchButton")
self.텍스트_확인("비빔밥", "#firstHeading")
self.요소_확인('img[alt="Dolsot-bibimbap.jpg"]')