Skip to content

Releases: seleniumbase/SeleniumBase

Improve automation on Safari browsers. And more.

29 Apr 03:56
4ab846e

Choose a tag to compare

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

28 Apr 03:55
ed68e3e

Choose a tag to compare

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

27 Apr 05:19
15af189

Choose a tag to compare

Update language translations

  • Add translations for assert_link_text(LINK_TEXT)
  • Update a few Portuguese translations
  • Update example tests
  • Update __init__.py files to display languages

Updates to running WebDriver tests with Safari

24 Apr 23:48
36e81d7

Choose a tag to compare

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

21 Apr 20:27
c01642e

Choose a tag to compare

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-ext to 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)

21 Apr 06:53
4fe0dc7

Choose a tag to compare

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 DIR command
  • Use a simplified URL format in tests
  • Update and add tests
  • Update GitHub Workflows

Add the Dutch translation and update Russian

20 Apr 23:17
c47cf81

Choose a tag to compare

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

19 Apr 18:53
57fae1c

Choose a tag to compare

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 start

For more information on setting browser desired capabilities, see: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/capabilities/ReadMe.md

Add the SeleniumBase Russian translation

19 Apr 01:02
ffc44bf

Choose a tag to compare

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

18 Apr 05:31
815dad7

Choose a tag to compare

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.)