Releases: seleniumbase/SeleniumBase
Releases · seleniumbase/SeleniumBase
Improve automation on Safari browsers. And more.
Improve automation on Safari browsers. And more.
- Improve automation on Safari browsers
- Improve hover_and_click actions
- Update the demo page
- Update example tests
- Refresh the "pip" dependency
Update the assert_downloaded_file(file) method
Update the assert_downloaded_file(file) method
- Now by default waits up to six seconds for the file to appear in the downloads folder.
- The default timeout can be changed.
- This change was made to allow time for a download to complete.
Update language translations
Update language translations
- Add translations for
assert_link_text(LINK_TEXT) - Update a few Portuguese translations
- Update example tests
- Update
__init__.pyfiles to display languages
Updates to running WebDriver tests with Safari
Updates to running WebDriver tests with Safari
- Update Safari WebDriver launcher
- Set default Safari position and dimensions if not maximized
- Add an example test for the Apple developer site WebDriver instructions
- Add a localized
set_window_rect(x, y, width, height) - Add additional ways to set the web browser's user agent
- Refresh Python dependencies
Fix Chrome proxy with auth; and a few other updates
Fix Chrome proxy with auth; and a few other updates
- Do not use the Chrome flag: "--disable-extensions" (it breaks proxy auth)
- Add cmd option
--use-auto-extto use Chrome's Automation Extension - Auto-generate the desired capabilities "name" if
"*"is passed - Remove unused "portalocker" from Python dependencies
Proxy Instructions:
# Run tests through a proxy server
pytest proxy_test.py --proxy=IP_ADDRESS:PORT
# Run tests through a proxy server with authentication
pytest proxy_test.py --proxy=USERNAME:PASSWORD@IP_ADDRESS:PORT
Multiple Updates (Translations, Settings, etc)
Multiple Updates (Translations, Settings, etc)
- Add more translated methods (language translations)
- Add more custom parameters for passing into tests
- Add additional custom markers for pytest
- Make Chrome tests more efficient
- Update the
seleniumbase mkdir DIRcommand - Use a simplified URL format in tests
- Update and add tests
- Update GitHub Workflows
Add the Dutch translation and update Russian
Add the Dutch translation and update Russian
- Example Dutch test:
from seleniumbase.translate.dutch import Testgeval
class MijnTestklasse(Testgeval):
def test_voorbeeld_1(self):
self.url_openen("https://nl.wikipedia.org/wiki/Hoofdpagina")
self.controleren_element('a[title*="hoofdpagina gaan"]')
self.controleren_tekst("Welkom op Wikipedia", "td.hp-welkom")
self.tekst_bijwerken("#searchInput", "Stroopwafel")
self.klik("#searchButton")
self.controleren_tekst("Stroopwafel", "#firstHeading")
self.controleren_element('img[alt="Stroopwafels"]')
self.tekst_bijwerken("#searchInput", "Rijksmuseum Amsterdam")
self.klik("#searchButton")
self.controleren_tekst("Rijksmuseum", "#firstHeading")
self.controleren_element('img[alt="Het Rijksmuseum"]')
self.terug()
self.controleren_ware("Stroopwafel" in self.huidige_url_ophalen())
self.vooruit()
self.controleren_ware("Rijksmuseum" in self.huidige_url_ophalen())- And here's the updated Russian test:
from seleniumbase.translate.russian import ТестНаСелен # noqa
class МойТестовыйКласс(ТестНаСелен):
def test_пример_1(self):
self.открыть("https://ru.wikipedia.org/wiki/")
self.подтвердить_элемент('[title="Русский язык"]')
self.подтвердить_текст("Википедия", "h2.main-wikimedia-header")
self.обновить_текст("#searchInput", "МГУ")
self.нажмите("#searchButton")
self.подтвердить_текст("университет", "#firstHeading")
self.подтвердить_элемент('img[alt="МГУ, вид с воздуха.jpg"]')
self.обновить_текст("#searchInput", "приключения Шурика")
self.нажмите("#searchButton")
self.подтвердить_текст("Операция «Ы» и другие приключения Шурика")
self.подтвердить_элемент('img[alt="Постер фильма"]')
self.назад()
self.подтвердить_правду("университет" in self.получить_текущий_URL())
self.вперед()
self.подтвердить_правду("Шурика" in self.получить_текущий_URL())Add option: "--cap-string=STRING" to set capabilities
Add option to set browser desired capabilities with --cap-string=STRING
- Example:
pytest basic_test.py --cap-string='{"browserName":"chrome","name":"test1"}' --server="127.0.0.1" --browser=remote(Enclose cap-string in single quotes. Enclose parameter keys in double quotes.)
If using a local Selenium Grid with SeleniumBase, start up the Grid Hub and nodes first:
seleniumbase grid-hub start
seleniumbase grid-node startFor more information on setting browser desired capabilities, see: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/capabilities/ReadMe.md
Add the SeleniumBase Russian translation
Add the SeleniumBase Russian translation
- Here's an example test in Russian: (UPDATED)
from seleniumbase.translate.russian import ТестНаСелен # noqa
class МойТестовыйКласс(ТестНаСелен):
def test_пример_1(self):
self.открыть("https://ru.wikipedia.org/wiki/")
self.подтвердить_элемент('[title="Русский язык"]')
self.подтвердить_текст("Википедия", "h2.main-wikimedia-header")
self.обновить_текст("#searchInput", "МГУ")
self.нажмите("#searchButton")
self.подтвердить_текст("университет", "#firstHeading")
self.подтвердить_элемент('img[alt="МГУ, вид с воздуха.jpg"]')
self.обновить_текст("#searchInput", "приключения Шурика")
self.нажмите("#searchButton")
self.подтвердить_текст("Операция «Ы» и другие приключения Шурика")
self.подтвердить_элемент('img[alt="Постер фильма"]')
self.назад()
self.подтвердить_правду("университет" in self.получить_текущий_URL())
self.вперед()
self.подтвердить_правду("Шурика" in self.получить_текущий_URL())Add Guest Mode and DevTools options for Chromium
Add Guest Mode and DevTools options for Chromium tests
Usage:
--guest
(When the Guest Mode option is set, the Chromium browser launches in Guest Mode.)--devtools
(When the Devtools option is set, Chromium will open the DevTools window on startup.)