0

When using the click or type command in Selenium IDE to click or type in a text box it will just do nothing until the command times out. I'm currently using the selenium IDE extension, it doesn't work in Firfox, chrome or edge.

HTML I'm trying to click/type in:

<input id="signInName" class="textInput invalid" type="text" placeholder="Username" aria-label="Username" aria-required="true">

The entire text box code (from inspect):

<div class="attrEntry validate"><label id="signInName_label" for="signInName">Username</label><a id="forgotUsername" class="abt-btn--link  abt-space__xs__p-r-none abt-space_sm__p-r-none abt-space_md__p-r-none abt-space_lg__p-r-none  abt-space_xl__p-r-none abt-space_xxl__p-r-none" tabindex="-1" href="https://myescreenb2c.b2clogin.com/myescreenb2c.onmicrosoft.com/b2c_1a_myescreen_forgotusername/oauth2/v2.0/authorize?client_id=4a10fd0f-eb95-4ecf-99ec-1de08bea45c8&amp;response_type=code%20id_token&amp;scope=openid%20profile&amp;state=OpenIdConnect.AuthenticationProperties%3DMzGUSPza40WSX9KLeZC0d-sqKp8zexqWGlGch7XJE9yLq0AB0y6kjIMV5xz2Z8HR5qoVD2uYfy6n34x39Oy-v-evsEwTWjudPQOI85huepCQhjLtoUhqfMY143AsmCfZHhHa_0n2mxqjylawMTATD50lw3Jxe2BZO1HUWiM95OAgh2v9eX-M_K-1HdZH_yTwj3zzXw&amp;response_mode=form_post&amp;nonce=638217701963730673.NGE5ZTI3ODEtM2Q4Yy00MjEwLTg4MjAtZDk4Mzk0M2FkZWFjN2JkMzIzYjEtODVjMy00OGFhLWIyZTMtYjk1MTFmNDRmNGM4&amp;brand_key=concentra&amp;redirect_uri=https%3A%2F%2Fwww.results-concentra.com%2Fwebsite&amp;prompt=login&amp;x-client-SKU=ID_NET461&amp;x-client-ver=5.3.0.0">Forgot Username?</a><div class="error itemLevel show" role="alert" aria-hidden="false">This information is required.</div><input id="signInName" class="textInput invalid" type="text" placeholder="Username" aria-label="Username" aria-required="true"><a class="helpLink tiny" href="javascript:void(0)" data-help="">What is this?</a></div>

I have used all four options for elements that were offered by Selenium IDE (including multiple Xpath, CSS and HTML id) and none of them worked, used multiple browsers (Chrome, Firfox, Edge), I have tried using DOM click:

document.getElementById("signInName").click()

and I have slowed down the script to it's slowest setting and even added a 30 sec pause to the script to allow the javascript to load. I have also used click at command as well. none of these solutions worked to allow selenium to click the text box.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

Given the html of the <input> element:

<input id="signInName" class="textInput invalid" type="text" placeholder="Username" aria-label="Username" aria-required="true">

Inorder to click within the <input> element, first to locate the element you can use either of the following locator strategies:

  • Using CSS_SELECTOR:

    input#signInName[aria-label='Username'][placeholder='Username']
    
  • Using XPATH:

    //input[@id='signInName'][@aria-label='Username' and @placeholder='Username']
    
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352