diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1ba18d3db..3a44bbd07 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,6 +1,6 @@ name: SeleniumLibrary CI -on: [push, pull_request] +on: workflow_dispatch jobs: build: diff --git a/.github/workflows/Select.yml b/.github/workflows/Select.yml index dcc02d7f4..dcb89c7e4 100644 --- a/.github/workflows/Select.yml +++ b/.github/workflows/Select.yml @@ -1,10 +1,11 @@ -name: Select Configurations +name: Selected Test Configuration Matrix -on: workflow_dispatch +on: [push, pull_request] jobs: test_config: runs-on: ubuntu-latest + continue-on-error: true strategy: matrix: config: @@ -17,7 +18,12 @@ jobs: python-version: 3.12.12 rf-version: 7.3.2 selenium-version: 4.38.0 - browser: firefox + browser: chrome + - description: older_rf_version + python-version: 3.11.14 + rf-version: 6.1.1 + selenium-version: 4.37.0 + browser: chrome steps: - uses: actions/checkout@v4 @@ -32,9 +38,8 @@ jobs: - name: Setup ${{ matrix.config.browser }} browser uses: browser-actions/setup-chrome@v1 with: - chrome-version: 138 + chrome-version: latest install-dependencies: true - install-chromedriver: true id: setup-chrome - run: | echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }} @@ -61,12 +66,6 @@ jobs: - name: Install RF ${{ matrix.config.rf-version }} run: | pip install -U --pre robotframework==${{ matrix.config.rf-version }} - - name: Install drivers via selenium-manager - run: | - SELENIUM_MANAGER_EXE=$(python -c 'from selenium.webdriver.common.selenium_manager import SeleniumManager; sm=SeleniumManager(); print(f"{str(sm._get_binary())}")') - echo "$SELENIUM_MANAGER_EXE" - echo "WEBDRIVERPATH=$($SELENIUM_MANAGER_EXE --browser chrome --debug | awk '/INFO[[:space:]]Driver path:/ {print $NF;exit}')" >> "$GITHUB_ENV" - echo "$WEBDRIVERPATH" - name: Run tests under specified config run: | diff --git a/atest/acceptance/keywords/cookies.robot b/atest/acceptance/keywords/cookies.robot index 2349bc68d..04b355e6a 100644 --- a/atest/acceptance/keywords/cookies.robot +++ b/atest/acceptance/keywords/cookies.robot @@ -36,15 +36,21 @@ Add Cookie When Secure Is False Should Be Equal ${cookie.secure} ${False} Add Cookie When Expiry Is Epoch - Add Cookie Cookie1 value1 expiry=1761755100 + # To convert epoch to formatted string + # from time import strftime, localtime + # strftime('%Y-%m-%d %H:%M:%S', localtime(1793247900)) + # To update time each September (as Chrome limits cookies to one year expiry date) use + # import datetime + # print (datetime.datetime.strptime("2027-10-29 12:25:00", "%Y-%m-%d %I:%M:%S").timestamp()) + Add Cookie Cookie1 value1 expiry=1793247900 ${cookie} = Get Cookie Cookie1 - ${expiry} = Convert Date ${1761755100} exclude_millis=True + ${expiry} = Convert Date ${1793247900} exclude_millis=True Should Be Equal As Strings ${cookie.expiry} ${expiry} Add Cookie When Expiry Is Human Readable Data&Time - Add Cookie Cookie12 value12 expiry=2025-10-29 12:25:00 + Add Cookie Cookie12 value12 expiry=2026-10-29 12:25:00 ${cookie} = Get Cookie Cookie12 - Should Be Equal As Strings ${cookie.expiry} 2025-10-29 12:25:00 + Should Be Equal As Strings ${cookie.expiry} 2026-10-29 12:25:00 Delete Cookie [Tags] Known Issue Safari @@ -114,7 +120,7 @@ Test Get Cookie Keyword Logging ... domain=localhost ... secure=False ... httpOnly=False - ... expiry=2025-09-01 *:25:00 + ... expiry=2026-09-01 *:25:00 ... extra={'sameSite': 'Lax'} ${cookie} = Get Cookie far_future @@ -122,7 +128,7 @@ Test Get Cookie Keyword Logging Add Cookies # To update time each September (as Chrome limits cookies to one year expiry date) use # import datetime - # print (datetime.datetime.strptime("2025-09-01 12:25:00", "%Y-%m-%d %I:%M:%S").timestamp()) + # print (datetime.datetime.strptime("2027-09-01 12:25:00", "%Y-%m-%d %I:%M:%S").timestamp()) Delete All Cookies Add Cookie test seleniumlibrary ${now} = Get Current Date @@ -130,4 +136,4 @@ Add Cookies ${tomorrow_thistime_datetime} = Convert Date ${tomorrow_thistime} datetime Set Suite Variable ${tomorrow_thistime_datetime} Add Cookie another value expiry=${tomorrow_thistime} - Add Cookie far_future timemachine expiry=1756700700 # 2025-09-01 12:25:00 + Add Cookie far_future timemachine expiry=1788236700 # 2026-09-01 12:25:00