@@ -238,15 +238,14 @@ def run_oidc_fclo(browser_type, ip_address, port):
238238 # Log in to keycloak via fclo one
239239
240240 page .goto ("https://fclo-one.example.com" )
241- page .wait_for_selector ('input[name="username"]' )
242- page .fill ('input[name="username"]' , username )
243- page .wait_for_selector ('input[name="password"]' , timeout = 5000 )
244- page .fill ('input[name="password"]' , password )
245241
246- with page .expect_navigation ():
247- page .click ('button[type="submit"]' )
248- page .wait_for_load_state ("load" )
249- page_text = page .text_content ("body" )
242+ page .locator ("input[name='username']" ).fill (username )
243+ page .locator ("input[name='password']" ).fill (password )
244+
245+ page .locator ('button[type="submit"]' ).click ()
246+ page .wait_for_url ("https://fclo-one.example.com" )
247+
248+ page_text = page .locator ("body" ).text_content ()
250249 fields_to_check = [
251250 "Server address:" ,
252251 "Server name:" ,
@@ -259,15 +258,15 @@ def run_oidc_fclo(browser_type, ip_address, port):
259258 # Check that we're also logged in via fclo two
260259 page .goto ("https://fclo-two.example.com" )
261260 page .wait_for_load_state ("load" )
262- page_text = page .text_content ("body" )
261+ page_text = page .locator ("body" ). text_content ( )
263262
264263 for field in fields_to_check :
265264 assert field in page_text , f"'{ field } ' not found in page text on fclo two"
266265
267266 # Start the log out process, go to keycloak's logout page
268267 page .goto ("https://keycloak.example.com/realms/master/protocol/openid-connect/logout" )
269268 page .locator ("#kc-logout" ).click ()
270- page_text = page .text_content ("body" )
269+ page_text = page .locator ("body" ). text_content ( )
271270 fields_to_check = [
272271 "You are logging out from following apps" ,
273272 "fclo-one client name" ,
0 commit comments