- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
08-08-2025 07:14 AM
This is how the username input elements appears for different version of the same webapp:
<input id="input-:r0:" class="focus:tw-outline-none tw-border-none tw-w-full tw-p-0 placeholder:tw-text-neutral-300 tw-bg-neutral-0 dark:tw-text-neutral-800 dark:tw-placeholder-neutral-400 tw-text-lg" placeholder="Username" aria-invalid="false" title="Username" value="">
<input type="text" id="username" class="form-control" name="username" autocorrect="off" autocapitalize="off" autocomplete="off" autofocus="" placeholder="Username">Will this match for both the username element variants above?
Username>{Username}(searchby=text)Xpath and ID search works for only one or the other version. I'm looking for the webform syntax that will work for both versions of the webapp. The online documentation is not very clear on how exactly the "text" search/match works.
Thanks
08-12-2025 09:52 AM
Hi @Somidi Vamshi ,
Correct, FortiManager/Analyzer.
I was reluctant to use if-else conditional statements because in my experience it can add some delay to the connection time. It is working with the following:
//input^[@placeholder='Username'^]>{Username}(searchby=xpath)
//input^[@placeholder='Password'^]>{Password}(searchby=xpath)
Login>(Button)(searchby=text)Thanks for your previous response.
Bryce
08-08-2025 11:33 AM
Hi @BRYCE POWELL
In this scenario, you will need to find a xpath and search using xpath.
Username>{Username}(searchby=xpath)
Username_XPath>//input[@placeholder='Username' or @title='Username']
Hope it helps !
08-08-2025 12:05 PM
Hi @Malhar Vora ,
Thanks. Is this what you mean?
//input^[@placeholder='Username'^] > {Username}(searchby=xpath)
//input^[@placeholder='Password'^] > {Password}(searchby=xpath)
Login > (Button)(searchby=text)I want to have high confidence in this before making a change in production that could break functionality.
Bryce
08-08-2025 12:20 PM
Hi @BRYCE POWELL
As a best practice, I would not suggest to try directly the production without validating in the non-production environment.
It can impact your production users in case it doesn’t work as expected.
Please validate it in the non-production first.
Hope it helps!
08-08-2025 11:48 PM
Hi @BRYCE POWELL ,
Why can't you use if-else condition then ? It seems this is for fotigate web consoles.
if((username > (Condition) (SearchBy=name) (Exists eq True) ) )
//*^[@id="username"^] > {Username} (SearchBy=XPath)
//*^[@id="password"^] > {Password} (SearchBy=XPath)
//*^[@id="login"^] > (Button) (SearchBy=XPath)
end-if
else
//*^[@id="input-:r0:"^] > {Username} (SearchBy=XPath)
//*^[@id="input-:r1:"^] > {Password} (SearchBy=XPath)
//*^[@id="id_layout_main"^]/div/div/div^[2^]/div^[5^]/button > (Button) (SearchBy=XPath)
end-else
Thanks
08-12-2025 09:52 AM
Hi @Somidi Vamshi ,
Correct, FortiManager/Analyzer.
I was reluctant to use if-else conditional statements because in my experience it can add some delay to the connection time. It is working with the following:
//input^[@placeholder='Username'^]>{Username}(searchby=xpath)
//input^[@placeholder='Password'^]>{Password}(searchby=xpath)
Login>(Button)(searchby=text)Thanks for your previous response.
Bryce
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

