Can we add customized selector for Element

Hi Team,

I have encountered a scenarios where selectors was changing dynamically so facing issues of element not present while running the script.Since it is an web based application. I tried to find out elements other locator by looking into elements properties which was Id which is an unique properties for each web element on Page.

How can we add selectors which is not captured by Ui-Explorer feature but we can find it by looking into element properties in HTML structure.

Thanks
Dinkar

yes u can update your selector with variables,

For ex: you have name: ‘xxxxxx’ that you can replace with
name: ‘"+YourVariable+"’

Wildcard --> * will replace undifinesd number of chars
app=‘firefox.exe’ title=‘Artists, Rappers Network’ url='https://www.facebook.com

? - Will replace 1 char
For title=‘Artists’
title=‘Artist?’

Read this post its a nice ex: How to use a variable in: <webctrl aaname=VARIABLE />

Hi,
You can wild characters on selectors. Also if a particular selector not captured through UIExplorer in that case if you are too confident enough to write selectors of your own, that may me helpful.

Hi @dinkar.singh4

There is a feature in Studio that allows you to use variables in your selectors, please see here:

1 Like

Thanks everyone for your support.

Regards
Dinkar

1 Like