Hi,
I have previously used the SeleniumLibrary and successfully automated more than 150 test cases for a 3rd party product with this library. Since the Browser Library is said to have better handling of waits I wanted to try this but I cannot get the login to work.
RF with SeleniumLibrary:
Login to 3DX
Login to 3DX and wait for the object count to appear.
Set Selenium Timeout ${SELENIUM TIMEOUT}
IF ‘${HEADLESS}’ == ‘yes’
Open Browser ${LOGIN URL} ${BROWSER} options=${HEADLESS OPTIONS}
ELSE
Open Browser ${LOGIN URL} ${BROWSER}
END
Set Window Size 1920 1080
${width} ${height}= Get Window Size
Log Height: ${height}
Log Width: ${width}
Set Selenium Speed ${DELAY}
Title Should Be Login | 3DEXPERIENCE ID | Dassault Systèmes
Wait Until Element Is Visible xpath://[@id*=“username”]
Input Text xpath://[@id=“username”] ${USERNAME}
Input Text xpath://[@id=“password”] ${PASSWORD}
Click Element xpath://input[@type=‘submit’]
Wait Until Page Contains Element content
Select Frame content
Wait Until Element Is Visible xpath://*[@id=“mx_objectCount”]
RF with Browser:
Login to 3DX
Login to 3DX and wait for the object count to appear.
IF ‘${HEADLESS}’ == ‘yes’
New Browser browser=${BROWSER} headless=True args=${HEADLESS OPTIONS}
ELSE
New Browser browser=${BROWSER} headless=False
END
New Page ${LOGIN URL}
Set Browser Timeout ${BROWSER TIMEOUT}
Set Viewport Size width=1920 height=1080
${size} Get Viewport Size key=ALL
Get Title contains Login | 3DEXPERIENCE ID | Dassault Systèmes
Get Element xpath=//[@id*=“username”]
Fill Text xpath=//[@id=“username”] ${USERNAME}
Fill Text xpath=//[@id=“password”] ${PASSWORD}
Take Screenshot
${url} Get Url
Click xpath=//input[@type=‘submit’]
Take Screenshot
${url} Get Url
Take Screenshot
Get Element id=content >>> xpath=//*[@id=“mx_objectCount”]
Set Selector Prefix content scope=Test
Get Element xpath=//*[@id=“mx_objectCount”]
The problem is that after supplying the user & password and clicking on submit, the login gets stuck. In the transition from the login page and the submission of user credentials, to the landing page, the java server is requiring or requesting for something which RF/Playwright isn’t supplying I guess.
I retrieved the url before and after clicking on submit.
Before: https://3dpassport-uat01.plm.ericsson.net/3dpassport/login?service=https%3A%2F%2F3dspace-uat01.plm.ericsson.net%2F3dspace%2F%3FserverId%3Dplmuat01_MCS_Front_5
After: https://3dspace-uat01.plm.ericsson.net/3dspace/common/emxSecurityContextSelection.jsp
So the login works with Selenium but not with Playwright. Does anybody have an idea why it doesn’t work?
I’m pasting in the Playwright log below.
{“level”:30,“time”:“2026-05-29T05:34:39.471Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Listening on 127.0.0.1:49537”}
{“level”:30,“time”:“2026-05-29T05:34:39.496Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method newBrowser”}
{“level”:30,“time”:“2026-05-29T05:34:39.569Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Adding browser to stack: chromium, version: 141.0.7390.37”}
{“level”:30,“time”:“2026-05-29T05:34:39.569Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Adding 0 contexts to browser”}
{“level”:30,“time”:“2026-05-29T05:34:39.569Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method newBrowser”}
{“level”:30,“time”:“2026-05-29T05:34:39.574Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method newPage”}
{“level”:30,“time”:“2026-05-29T05:34:39.574Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“currentBrowser: {“name”:“chromium”,“browser”:{”_type":“Browser”,“_guid”:“browser@2383be7b844d1f6806b8461502063c7f”},“headless”:true,“_contextStack”:,“id”:“browser=890084dc-bdcc-4b48-a6bb-c9708dc92820”}"}
{“level”:30,“time”:“2026-05-29T05:34:39.580Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Setting default timeout for context context=85ceee94-d47c-4ae8-9bff-3fc5b8d1ac6e to 10000”}
{“level”:30,“time”:“2026-05-29T05:34:39.580Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Changed active context: context=85ceee94-d47c-4ae8-9bff-3fc5b8d1ac6e”}
{“level”:30,“time”:“2026-05-29T05:34:39.604Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Video path: undefined”}
{“level”:30,“time”:“2026-05-29T05:34:39.604Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Changed active page”}
{“level”:30,“time”:“2026-05-29T05:34:39.790Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method newPage”}
{“level”:30,“time”:“2026-05-29T05:34:39.796Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method setViewportSize”}
{“level”:30,“time”:“2026-05-29T05:34:39.798Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method setViewportSize”}
{“level”:30,“time”:“2026-05-29T05:34:39.810Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method getElement”}
{“level”:30,“time”:“2026-05-29T05:34:39.810Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Strict mode is enabled, find Locator with xpath=//[@id*=“username”] in page.”}
{“level”:30,“time”:“2026-05-29T05:34:39.948Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method getElement”}
{“level”:30,“time”:“2026-05-29T05:34:39.951Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method fillText”}
{“level”:30,“time”:“2026-05-29T05:34:39.951Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Strict mode is enabled, find Locator with xpath=//[@id=“username”] in page."}
{“level”:30,“time”:“2026-05-29T05:34:39.957Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method fillText”}
{“level”:30,“time”:“2026-05-29T05:34:39.962Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method fillText”}
{“level”:30,“time”:“2026-05-29T05:34:39.962Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:"Strict mode is enabled, find Locator with xpath=//[@id=“password”] in page.”}
{“level”:30,“time”:“2026-05-29T05:34:39.967Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method fillText”}
{“level”:30,“time”:“2026-05-29T05:34:39.971Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method takeScreenshot”}
{“level”:30,“time”:“2026-05-29T05:34:39.971Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“Take screenshot with options: “:{“path”:”/opt/plm/plmdev06/RobotFW_bl/logs_20260529_073438_UAT/browser/screenshot/robotframework-browser-screenshot-1.png”,“fileType”:“png”,“fullPage”:false,“timeout”:90000,“omitBackground”:false}}
{“level”:30,“time”:“2026-05-29T05:34:40.240Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method takeScreenshot”}
{“level”:30,“time”:“2026-05-29T05:34:40.245Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method click”}
{“level”:30,“time”:“2026-05-29T05:34:40.245Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Strict mode is enabled, find Locator with xpath=//input[@type=‘submit’] in page.”}
{“level”:30,“time”:“2026-05-29T05:34:40.551Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method click”}
{“level”:30,“time”:“2026-05-29T05:34:40.555Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method takeScreenshot”}
{“level”:30,“time”:“2026-05-29T05:34:40.555Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“Take screenshot with options: “:{“path”:”/opt/plm/plmdev06/RobotFW_bl/logs_20260529_073438_UAT/browser/screenshot/robotframework-browser-screenshot-2.png”,“fileType”:“png”,“fullPage”:false,“timeout”:90000,“omitBackground”:false}}
{“level”:30,“time”:“2026-05-29T05:34:41.228Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method takeScreenshot”}
{“level”:30,“time”:“2026-05-29T05:34:41.235Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method takeScreenshot”}
{“level”:30,“time”:“2026-05-29T05:34:41.235Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“Take screenshot with options: “:{“path”:”/opt/plm/plmdev06/RobotFW_bl/logs_20260529_073438_UAT/browser/screenshot/robotframework-browser-screenshot-3.png”,“fileType”:“png”,“fullPage”:false,“timeout”:90000,“omitBackground”:false}}
{“level”:30,“time”:“2026-05-29T05:34:41.788Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“End of node method takeScreenshot”}
{“level”:30,“time”:“2026-05-29T05:34:41.791Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Start of node method getElement”}
{“level”:30,“time”:“2026-05-29T05:34:41.791Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Strict mode is enabled, find Locator with id=content >> internal:control=enter-frame >> xpath=//*[@id=“mx_objectCount”] in page.”}
{“level”:30,“time”:“2026-05-29T05:36:11.794Z”,“pid”:2362321,“hostname”:“ESEPAPLDAP016.pcop.ericsson.se”,“msg”:“Error of node method getElement”}
================= Original suppressed error =================
locator.waitFor: Timeout 90000ms exceeded.
Call log:
-
waiting for locator(‘id=content’).contentFrame().locator(‘//*[@id=“mx_objectCount”]’)
at getElement (/home/pucaoacnt/.local/lib/python3.9/site-packages/Browser/wrapper/index.js:11486:17)
at async PlaywrightServer.getElement (/home/pucaoacnt/.local/lib/python3.9/site-packages/Browser/wrapper/index.js:13510:28) {
name: ‘TimeoutError’
}