My user interface has a list of elements displayed in 2 columns. The first column shows the name of the item, such as Manager, Operator, and the list is expected to grow. The second column consists of a color picker element where you can choose a color. I am currently trying to locate the color picker element for a specific name, for example, for Operator. I need to iterate over the elements and find the color picker element for Operator. Below is an HTML code snippet I would like to locate:
<span tabindex="0" class="colour-select" style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"></span>
To retrieve the list of name elements, I am using the following CSS selector:
li[class='cdk-drag item container-fluid'] span[class='form-control']
However, I am uncertain about how to proceed further to access the colour-select class in the code snippet above.
When examining the HTML code snippet provided:
<li _ngcontent-ppo-c336="" cdkdrag="" class="cdk-drag item container-fluid" ng-reflect-ng-class="[object Object]" ng-reflect-data="[object Object]" ng-reflect-disabled="false" rowid="370" orderid="0">
<div _ngcontent-ppo-c336="" class="row">
...
</div>
</li>
I am seeking guidance on which CSS locator to utilize in order to access the colour-select class. Any assistance provided would be greatly appreciated.
Thank you for your help.
- Riaz