<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00007ElR0GCAVOkta Classic EngineIntegrationsAnswered2024-03-08T00:44:18.000Z2021-10-13T20:55:57.000Z2021-10-18T12:06:34.000Z

SharonB.53112 (Customer) asked a question.

Password field not populating - Changing CSS Selector

We are trying to create a British Gas Consumer app 

https://www.britishgas.co.uk/identity/?redirectTo=https://www.britishgas.co.uk/my-account/accounts/overview

 

There is a British Gas (Consumer) app available in the Catalogue but it doesn't populate the Username or password field.

 

I have customised the "Template Two Page Plugin App" to help facilitate this app. Extracting the CSS selectors I have populated the Username and Continue button (on first page) but cannot get the app to populate the second page password field.  

 

The element for the password field can be seen here:

<input type="password" autocomplete="current-password" id="nsid-mzh8okvwe4-password">

 

The issue is that the bold numbers/letters of the id id="nsid-mzh8okvwe4-password" changes every time a new login instance occurs (or page is refreshed) so it is not a fixed css selector. Does anyone have any suggestions as to how we can overcome this? I have attempted to use the Input Type as an alternative to no avail.

 

We have used this article https://help.okta.com/en/prod/Content/Topics/Apps/Apps_Configure_Template_App.htm but unfortunately it has not resolved the issue.

 

Any help would be appreciated. Thanks!

 


  • User15905896560008893663 (Vendor Management)

    Hi Sharon,

     

    I tried adding this, but they do a register if I do not have a valid account email with them.

    I suggest using a * (asterisk) for the dynamic part, such as :

     

    <input type="password" autocomplete="current-password" id="nsid-*-password">

    Expand Post
  • SharonB.53112 (Customer)

    Thanks for the suggestion and taking the time to respond, I tried various iterations of this to no avail. In the first instance I am presuming that with your suggested change the password field would read #nsid-*-password

     

    I should also say the password url page is the following:

    https://www.britishgas.co.uk/identity/authenticate/password?redirectTo=https%3A%2F%2Fwww.britishgas.co.uk%2Fmy-account%2Faccounts%2Foverview

     

    Do you have any other suggestions?

     

    Many thanks

    Expand Post
  • SharonB.53112 (Customer)

    I should also say that using #password does allow you to bypass the password field (but doesn't populate it) and then it does select the "Log in to my account" button as it then puts up an error on the Password field that "This field is required". I have therefore tried #*-*-password and #*password to no avail.

This question is closed.
Loading
Password field not populating - Changing CSS Selector