How to verify the two texts is not exactly common

Could you share the HTML for a couple of the rows, so that we can come up with an attack plan here?

Please copy a couple of them from your Developer Console, and paste them like so:

<!-- your code here-->

(Use ``` to start and ``` to end the code block)

HTML of one row

<div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">1</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">VLI Dac Vu</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Van Lang IPA</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div>

HTML of the table

<div class="sc-cxNHIi fHUQtx compose-section"><div class="sc-lmgQwP knQPyO compose-section-header no-border"><span class="title"><div><span>Other Profiles</span><button type="button" class="ant-btn ant-btn-link ant-btn-sm sc-laZMeE ljWfRO s8-button"><span role="img" aria-label="info-circle" class="anticon anticon-info-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="info-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path></svg></span></button></div></span></div><div class="sc-cApVyb eHJCkP paginated paginated-table profile-list"><div id="paginated-4fcf2e90-737b-40da-9801-c48d13f1984b" class="sc-hoPuav gXmMhE paginated-body"><div class="sc-gLMgcV cTPEai paginated-table-row paginated-table-header"><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf jHmYOS truncate"><div class="header-content truncate">Index</div></div></div><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf giZJzJ truncate"><div class="header-content truncate">Profile</div></div></div><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf jHmYOS truncate"><div class="header-content truncate">Company name</div></div></div><div class="sc-bnFVBq Ka-dXi table-header-cell"><div class="sc-iKUVsf ilJSfy truncate"><div class="header-content truncate">Profile Status</div></div></div></div><div class="sc-hlXxXZ fUZwnO"><div class="sc-leehGg gIgMeA paginated-non-data-container"><div class="sc-jrsJWt dJdFwe non-data-container"><div class="ant-empty ant-empty-normal sc-kOokqr jCiuZr"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">No Data Available</div></div></div></div></div><div class="sc-lgWdIC cRRXke paginated-row-container" style="min-height: 0px;"><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">1</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">VLI Dac Vu</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Van Lang IPA</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">2</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Kate Jenner</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Mission Medical Supply</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">3</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Kate Jenner</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Gulf Coast Prosthetics</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF ilKPUV core-label  user-profile-status-icon" style="background-color: var(--main-grey); text-transform: capitalize; color: var(--main-grey);"><span class="core-label-content">Inactive</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">4</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Jack Sparrow</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">COASTAL EYE ASSOCIATES, PLLC</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF fNiHDM core-label  user-profile-status-icon" style="background-color: var(--sub-caution); text-transform: capitalize; color: var(--sub-caution);"><span class="core-label-content">Company Deactivated</span></span></div></div></div></div><div type="tertiary" class="sc-ezzafa eTrCdp compose-header type-tertiary size-compact header-variant paginated-footer"><div class="sc-bYwzuL bMDHOB header-item header-item-span"><div class="paginator paginator-small "><div class="paginator-page-list paginator-page-list-tight"></div><div class="paginator-size-changer "><div class="ant-select ant-select-sm selector  ant-select-single ant-select-show-arrow"><div class="ant-select-selector"><span class="ant-select-selection-search"><input autocomplete="off" type="search" class="ant-select-selection-search-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_19_list" aria-autocomplete="list" aria-controls="rc_select_19_list" aria-activedescendant="rc_select_19_list_0" readonly="" unselectable="on" value="" id="rc_select_19" style="opacity: 0;"></span><span class="ant-select-selection-item">50 items</span></div><span class="ant-select-arrow" unselectable="on" aria-hidden="true" style="user-select: none;"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div></div></div></div></div></div></div>

i try to select an element with CSS selector

This is the code that i try to getText

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import static com.kms.katalon.core.testobject.ObjectRepository.findWindowsObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testng.keyword.TestNGBuiltinKeywords as TestNGKW
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import com.kms.katalon.core.windows.keyword.WindowsBuiltinKeywords as Windows
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys


WebUI.verifyElementPresent(findTestObject('Object Repository/lbl.Network and Contracting'), GlobalVariable.timeout)

WebUI.click(findTestObject('btn.Current Profile VLI Dac VuVan Lang IPA'))

alternateProfile = WebUI.getText(findTestObject('Object Repository/Verify dropdown profile/lbl.Alternate Profile'))

System.out.println(alternateProfile)

WebUI.navigateToUrl('https://admin.gotecq.com/tecq/usr')

WebUI.click(findTestObject('Object Repository/Verify dropdown profile/btn.User Module'))

WebUI.verifyTextPresent('PROFILES', true)

WebUI.setText(findTestObject('Object Repository/Verify dropdown profile/txt.Search Box'), 'ANN super admin')

WebUI.sendKeys(findTestObject('Object Repository/Verify dropdown profile/txt.Search Box'), Keys.chord(Keys.ENTER))

WebUI.click(findTestObject('Object Repository/Verify dropdown profile/tbl.User List'))

WebUI.scrollToElement(findTestObject('Object Repository/Verify dropdown profile/tbl.Other Profiles'), GlobalVariable.timeout)

alternateProfileAppUSR = WebUI.getText(findTestObject('Object Repository/Verify dropdown profile/tbl.Other Profiles'))

System.out.println(alternateProfileAppUSR)

Thank you for getting back to me with the code snippets and what you have tried!

However, when I pretty-print and examine it, I see a table with only four columns:

  • Index
  • Profile
  • Company name
  • Profile Status

It does not seem to match your screenshot, or the concern of your question…

We’re to match against the Index column, right?

The screenshot is just the example, I want to verify match 2 text from 2 element
one from this

<div class="dropdown-content"><div class="sc-EhTUr bKsxLj"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">COASTAL EYE ASSOCIATES, PLLC<span role="img" aria-label="exclamation-circle" class="anticon anticon-exclamation-circle inactivated-profile-icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="exclamation-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"></path></svg></span></span></div><div class="tertiary-slot"><span role="img" aria-label="team" class="anticon anticon-team"><svg viewBox="64 64 896 896" focusable="false" data-icon="team" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"></path></svg></span></div></div></div><div class="sc-EhTUr bKsxLj"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">Gulf Coast Prosthetics<span role="img" aria-label="exclamation-circle" class="anticon anticon-exclamation-circle inactivated-profile-icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="exclamation-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"></path></svg></span></span></div><div class="tertiary-slot"><span role="img" aria-label="team" class="anticon anticon-team"><svg viewBox="64 64 896 896" focusable="false" data-icon="team" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"></path></svg></span></div></div></div><div class="sc-EhTUr bKsxLj"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">Mission Medical Supply</span></div><div class="tertiary-slot"><span role="img" aria-label="team" class="anticon anticon-team"><svg viewBox="64 64 896 896" focusable="false" data-icon="team" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"></path></svg></span></div></div></div><div class="sc-EhTUr eCeahS"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">Van Lang IPA</span></div><div class="tertiary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-user-admin  "><svg width="1em" height="1em" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.24 14.88c-2.4-1.2-4.02-3.6-4.02-6.48 0-3.96 3.24-7.2 7.2-7.2s7.2 3.24 7.2 7.2c0 3.9-3.06 7.08-6.96 7.2h-.06c-5.94 0-10.8 4.86-10.8 10.8 0 .36-.24.6-.6.6s-.6-.24-.6-.6c0-5.46 3.66-10.08 8.64-11.52zm3.18-.48c3.3 0 6-2.7 6-6s-2.7-6-6-6-6 2.7-6 6 2.7 6 6 6zm16.44 3.96.12.3-1.44 1.74a.9.9 0 0 0 0 1.08l1.44 1.68-.12.3c-.3.84-.72 1.68-1.32 2.34l-.24.24-2.22-.36c-.36-.06-.78.18-.9.54l-.78 2.16-.3.06c-1.14.24-2.28.24-3.42 0l-.36-.06-.72-2.1c-.12-.36-.54-.6-.9-.54l-2.28.36-.24-.24c-.3-.3-.54-.66-.72-1.02-.24-.42-.48-.9-.6-1.38l-.12-.3 1.5-1.68c.24-.3.24-.78 0-1.02l-1.44-1.74.12-.3c.3-.9.78-1.68 1.38-2.4l.24-.24 2.16.36c.36.06.78-.18.96-.54l.78-2.1.3-.06c1.08-.24 2.22-.24 3.36 0l.36.06.72 2.04c.12.36.54.66.96.6l2.22-.3.24.24c.3.36.54.66.72 1.08.18.3.36.78.54 1.2zm-1.68-.72c-.12-.24-.24-.42-.42-.66l-1.56.18c-.96.12-1.92-.48-2.22-1.38l-.48-1.38c-.72-.12-1.44-.12-2.16 0l-.54 1.44c-.3.9-1.32 1.5-2.28 1.32l-1.5-.24c-.36.42-.6.96-.84 1.44l1.02 1.2c.6.72.6 1.86 0 2.58l-1.02 1.2c.12.3.24.54.42.84.12.24.24.42.42.6l1.62-.24c.96-.12 1.92.48 2.22 1.38l.48 1.44c.72.12 1.5.12 2.22 0l.54-1.5c.3-.9 1.32-1.5 2.22-1.32l1.5.24c.3-.42.6-.9.78-1.44l-.96-1.14c-.6-.72-.66-1.86-.06-2.58l1.02-1.2c-.12-.24-.24-.48-.42-.78zm-5.76 6c-1.5 0-2.7-1.2-2.7-2.7s1.2-2.7 2.7-2.7 2.7 1.2 2.7 2.7-1.26 2.7-2.7 2.7zm0-1.2c.84 0 1.5-.66 1.5-1.5s-.66-1.5-1.5-1.5-1.5.66-1.5 1.5.66 1.5 1.5 1.5z" fill="currentColor" stroke="currentColor"></path></svg></span></div></div></div></div>

and one from column Company name of this

<div class="sc-cxNHIi fHUQtx compose-section"><div class="sc-lmgQwP knQPyO compose-section-header no-border"><span class="title"><div><span>Other Profiles</span><button type="button" class="ant-btn ant-btn-link ant-btn-sm sc-laZMeE ljWfRO s8-button"><span role="img" aria-label="info-circle" class="anticon anticon-info-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="info-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path></svg></span></button></div></span></div><div class="sc-cApVyb eHJCkP paginated paginated-table profile-list"><div id="paginated-4fcf2e90-737b-40da-9801-c48d13f1984b" class="sc-hoPuav gXmMhE paginated-body"><div class="sc-gLMgcV cTPEai paginated-table-row paginated-table-header"><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf jHmYOS truncate"><div class="header-content truncate">Index</div></div></div><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf giZJzJ truncate"><div class="header-content truncate">Profile</div></div></div><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf jHmYOS truncate"><div class="header-content truncate">Company name</div></div></div><div class="sc-bnFVBq Ka-dXi table-header-cell"><div class="sc-iKUVsf ilJSfy truncate"><div class="header-content truncate">Profile Status</div></div></div></div><div class="sc-hlXxXZ fUZwnO"><div class="sc-leehGg gIgMeA paginated-non-data-container"><div class="sc-jrsJWt dJdFwe non-data-container"><div class="ant-empty ant-empty-normal sc-kOokqr jCiuZr"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">No Data Available</div></div></div></div></div><div class="sc-lgWdIC cRRXke paginated-row-container" style="min-height: 0px;"><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">1</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">VLI Dac Vu</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Van Lang IPA</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">2</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Kate Jenner</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Mission Medical Supply</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">3</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Kate Jenner</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Gulf Coast Prosthetics</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF ilKPUV core-label  user-profile-status-icon" style="background-color: var(--main-grey); text-transform: capitalize; color: var(--main-grey);"><span class="core-label-content">Inactive</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">4</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Jack Sparrow</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">COASTAL EYE ASSOCIATES, PLLC</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF fNiHDM core-label  user-profile-status-icon" style="background-color: var(--sub-caution); text-transform: capitalize; color: var(--sub-caution);"><span class="core-label-content">Company Deactivated</span></span></div></div></div></div><div type="tertiary" class="sc-ezzafa eTrCdp compose-header type-tertiary size-compact header-variant paginated-footer"><div class="sc-bYwzuL bMDHOB header-item header-item-span"><div class="paginator paginator-small "><div class="paginator-page-list paginator-page-list-tight"></div><div class="paginator-size-changer "><div class="ant-select ant-select-sm selector  ant-select-single ant-select-show-arrow"><div class="ant-select-selector"><span class="ant-select-selection-search"><input autocomplete="off" type="search" class="ant-select-selection-search-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_19_list" aria-autocomplete="list" aria-controls="rc_select_19_list" aria-activedescendant="rc_select_19_list_0" readonly="" unselectable="on" value="" id="rc_select_19" style="opacity: 0;"></span><span class="ant-select-selection-item">50 items</span></div><span class="ant-select-arrow" unselectable="on" aria-hidden="true" style="user-select: none;"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div></div></div></div></div></div></div>

I noticed that your target element reside inside a node of Scalable Vector Graphics.

SVG elements belong to different XML Namespace, they do not belong to the XML Namespace of HTML.Therefore you need to write your XPath expression in the way XML Namespace aware.

Are you familiar with XML Namespace?

If not, you need to study how to write a XPath which is XML Namespace-aware.

Without that skill, you would never be able to solve your current issue.


Have a look at my previous post:

Unfortunately, I am not

Thanks, I will read it

I see…

In this case, we need to change up our strategy a little bit…

Katalon Studio, out of the box, won’t be enough to help us

Introducing Page Object Model!

This is a test design pattern meant to separate testing/verification concerns from page-interaction ones, as well as abstract away a lot of the gritty details, to make your code easier to reason about and maintain (I’ma drop an article on those at some point, just not here :wink: )

Our code for this task is going to live there…

It will be defined like:

public class JiraPage { 
    public final String dropdownListClassName = "dropdown-content",
        tableRowClassName = "paginated-table-row";

    public final int companyNameIndex = 3;

    public List<String> getCompanyNamesFromTable() { 
        // TODO: wait for your current page to become visible here

        return DriverFactory.getWebDriver()
            .findWebElements(By.css(".${this.tableRowClassName} .table-cell:nth-child(${this.companyNameIndex}) > div"))
            .collect({ WebElement tableCell -> return tableCell.getText() })
    }

    public List<String> getDropdownTextList() {  
        // TODO: wait for your dropdown options to become visible here

        return DriverFactory.getWebDriver()
            .findWebElements(By.css(".${this.dropdownListClassName} div.secondary-slot > span.format-text"))
            .collect({ WebElement dropdownTextContainer -> return dropdownTextContainer.getText()})
    }

}

I would suggest, with this, that you wait on your table data and dropdown list to become visible/present, inside the respective methods…

From here, we change our previous helper method to the following:

Helper method change

Throw out that StringUtils, we’re going to replace it with :

public final class CollectionUtils {
    public static boolean VerifySublist(List<String> actualList, List<String> expectedSuperList) {
        return actualList
            .find({ String element -> return !expectedSuperList.contains(element); })
            == null;
    }
}

Putting it altogether

Armed with this, we now just

JiraPage page = new JiraPage();

assert CollectionUtils.VerifySublist(page.getDropdownTextList(), page.getCompanyNamesFromTable());

lmk if you have any questions on this!

1 Like

Are we defining it in the test case?

We’re defining it in Custom Keywords

I’ll try it, thank you so much

1 Like

I don’t know how to apply your code to execute, do I right when creating a keyword and putting the code in it, it have a problem with =

probably because of where it’s at. I will leave debugging skills up to you.

Also, write those classes to their own keyword files.

Your test case should be creating that page objects and calling those methods. That’s kinda the point of this design.

How goes your progress in implementing this?

I made a html file that contains this fragment. I opend the html in browser to see how the page looks. I saw this:

I found that a SVG element just renders a tiny graphics:
スクリーンショット 2023-04-03 11.06.33

This SVG is no significant for your problem. You can just ignore SVG elements.

I was wrong. Sorry, I disturbed you.

I don’t think I could understand yet what you want to achieve. I thought that I should create a set of working code as an entry point.

I created a HTML file that contains 2 HTML <div> elements you provided:

linh.html (22.1 KB)

It looked as this when I opened this html in browser:

I tried to write a Test Case script which finds 2 HTML elements that have a text "COASTAL EYE ASSOCIATES, PLLC"

import com.kms.katalon.core.testobject.ConditionType
import com.kms.katalon.core.testobject.TestObject
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

// This test checks if 2 HTML elements have the same text "COASTAL EYE ASSOCIATES, PLLC"

TestObject makeTestObject(String xpath) {
	TestObject tObj = new TestObject(xpath)
	tObj.addProperty("xpath", ConditionType.EQUALS, xpath)
	return tObj
}

TestObject coastal1 = makeTestObject("/html/body/div[1]/div[1]/div/div[2]/span")
TestObject coastal2 = makeTestObject("//*[@id='paginated-4fcf2e90-737b-40da-9801-c48d13f1984b']/div[3]/div[4]/div[3]/div")

String url = new File("./linh.html").toURI().toURL().toExternalForm()
WebUI.openBrowser('')
WebUI.navigateToUrl(url)
WebUI.verifyElementPresent(coastal1, 10)

String text1 = WebUI.getText(coastal1)
println "text1=" + text1

String text2 = WebUI.getText(coastal2)
println "text2=" + text2

assert text1 == text2

WebUI.closeBrowser()

This test case worked fine.

2023-04-03 19:47:24.039 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
2023-04-03 19:47:24.043 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/linh
2023-04-03 19:47:24.543 DEBUG testcase.linh                            - 1: coastal1 = makeTestObject("/html/body/div[1]/div[1]/div/div[2]/span")
2023-04-03 19:47:24.546 DEBUG testcase.linh                            - 1: tObj = new com.kms.katalon.core.testobject.TestObject(xpath)
2023-04-03 19:47:24.558 DEBUG testcase.linh                            - 2: tObj.addProperty("xpath", EQUALS, xpath)
2023-04-03 19:47:24.569 DEBUG testcase.linh                            - 3: return tObj
2023-04-03 19:47:24.571 DEBUG testcase.linh                            - 2: coastal2 = makeTestObject("//*[@id='paginated-4fcf2e90-737b-40da-9801-c48d13f1984b']/div[3]/div[4]/div[3]/div")
2023-04-03 19:47:24.574 DEBUG testcase.linh                            - 1: tObj = new com.kms.katalon.core.testobject.TestObject(xpath)
2023-04-03 19:47:24.576 DEBUG testcase.linh                            - 2: tObj.addProperty("xpath", EQUALS, xpath)
2023-04-03 19:47:24.580 DEBUG testcase.linh                            - 3: return tObj
2023-04-03 19:47:24.583 DEBUG testcase.linh                            - 3: url = toURL().toExternalForm()
2023-04-03 19:47:24.611 DEBUG testcase.linh                            - 4: openBrowser("")
2023-04-03 19:47:24.935 INFO  c.k.k.core.webui.driver.DriverFactory    - Starting 'Chrome' driver
4 03, 2023 7:47:24 午後 org.openqa.selenium.remote.DesiredCapabilities chrome
情報: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
2023-04-03 19:47:24.975 INFO  c.k.k.core.webui.driver.DriverFactory    - Action delay is set to 0 milliseconds
Starting ChromeDriver 110.0.5481.77 (65ed616c6e8ee3fe0ad64fe83796c020644d42af-refs/branch-heads/5481@{#839}) on port 23218
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
[1680518847.798][WARNING]: This version of ChromeDriver has not been tested with Chrome version 111.
[1680518847.844][WARNING]: virtual void DevToolsClientImpl::AddListener(DevToolsEventListener *) subscribing a listener to the already connected DevToolsClient. Connection notification will not arrive.
4 03, 2023 7:47:27 午後 org.openqa.selenium.remote.ProtocolHandshake createSession
情報: Detected dialect: W3C
2023-04-03 19:47:28.096 INFO  c.k.k.core.webui.driver.DriverFactory    - sessionId = b6be4b16829425843f5f14f308d01506
2023-04-03 19:47:28.119 INFO  c.k.k.core.webui.driver.DriverFactory    - browser = Chrome 111.0.0.0
2023-04-03 19:47:28.120 INFO  c.k.k.core.webui.driver.DriverFactory    - platform = Mac OS X
2023-04-03 19:47:28.121 INFO  c.k.k.core.webui.driver.DriverFactory    - seleniumVersion = 3.141.59
2023-04-03 19:47:28.124 INFO  c.k.k.core.webui.driver.DriverFactory    - proxyInformation = ProxyInformation { proxyOption=NO_PROXY, proxyServerType=HTTP, username=, password=********, proxyServerAddress=, proxyServerPort=0, executionList="", isApplyToDesiredCapabilities=true }
2023-04-03 19:47:28.146 DEBUG testcase.linh                            - 5: navigateToUrl(url)
2023-04-03 19:47:28.302 DEBUG testcase.linh                            - 6: verifyElementPresent(coastal1, 10)
2023-04-03 19:47:28.445 DEBUG testcase.linh                            - 7: text1 = getText(coastal1)
2023-04-03 19:47:28.522 DEBUG testcase.linh                            - 8: println("text1=" + text1)
text1=COASTAL EYE ASSOCIATES, PLLC
2023-04-03 19:47:28.526 DEBUG testcase.linh                            - 9: text2 = getText(coastal2)
2023-04-03 19:47:28.579 DEBUG testcase.linh                            - 10: println("text2=" + text2)
text2=COASTAL EYE ASSOCIATES, PLLC
2023-04-03 19:47:28.583 DEBUG testcase.linh                            - 11: assert text1 == text2
2023-04-03 19:47:28.585 DEBUG testcase.linh                            - 12: closeBrowser()
2023-04-03 19:47:28.791 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/linh

I could select 2 strings of “COASTAL EYE ASSOCIATES, PLLC” out of the page.

@linh.pham

What do you want more?

hi @linh.pham,
I think you are trying to check if the 3rd column in every row contains Text which is not same as the expected text
if yes then I think all those texts are inside a web table.
follow this method

  1. create a web table code to fetch the cell content one by one by iterating it row-wise and storing it in a list
  2. store the text you need to verify in a new list
  3. create a loop and verify the text in the first list with the second list using verify not match keyword or using verify match keyword.
    I hope this will help you

Yes, I’m trying to create a loop to verify each row in this list with all text that i get from the table
Firstly, I count rows from the list in this HTML (step 1)

<div class="dropdown-content"><div class="sc-EhTUr bKsxLj"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">COASTAL EYE ASSOCIATES, PLLC<span role="img" aria-label="exclamation-circle" class="anticon anticon-exclamation-circle inactivated-profile-icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="exclamation-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"></path></svg></span></span></div><div class="tertiary-slot"><span role="img" aria-label="team" class="anticon anticon-team"><svg viewBox="64 64 896 896" focusable="false" data-icon="team" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"></path></svg></span></div></div></div><div class="sc-EhTUr bKsxLj"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">Gulf Coast Prosthetics<span role="img" aria-label="exclamation-circle" class="anticon anticon-exclamation-circle inactivated-profile-icon"><svg viewBox="64 64 896 896" focusable="false" data-icon="exclamation-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"></path></svg></span></span></div><div class="tertiary-slot"><span role="img" aria-label="team" class="anticon anticon-team"><svg viewBox="64 64 896 896" focusable="false" data-icon="team" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"></path></svg></span></div></div></div><div class="sc-EhTUr bKsxLj"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">Mission Medical Supply</span></div><div class="tertiary-slot"><span role="img" aria-label="team" class="anticon anticon-team"><svg viewBox="64 64 896 896" focusable="false" data-icon="team" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M824.2 699.9a301.55 301.55 0 00-86.4-60.4C783.1 602.8 812 546.8 812 484c0-110.8-92.4-201.7-203.2-200-109.1 1.7-197 90.6-197 200 0 62.8 29 118.8 74.2 155.5a300.95 300.95 0 00-86.4 60.4C345 754.6 314 826.8 312 903.8a8 8 0 008 8.2h56c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5A226.62 226.62 0 01612 684c60.9 0 118.2 23.7 161.3 66.8C814.5 792 838 846.3 840 904.3c.1 4.3 3.7 7.7 8 7.7h56a8 8 0 008-8.2c-2-77-33-149.2-87.8-203.9zM612 612c-34.2 0-66.4-13.3-90.5-37.5a126.86 126.86 0 01-37.5-91.8c.3-32.8 13.4-64.5 36.3-88 24-24.6 56.1-38.3 90.4-38.7 33.9-.3 66.8 12.9 91 36.6 24.8 24.3 38.4 56.8 38.4 91.4 0 34.2-13.3 66.3-37.5 90.5A127.3 127.3 0 01612 612zM361.5 510.4c-.9-8.7-1.4-17.5-1.4-26.4 0-15.9 1.5-31.4 4.3-46.5.7-3.6-1.2-7.3-4.5-8.8-13.6-6.1-26.1-14.5-36.9-25.1a127.54 127.54 0 01-38.7-95.4c.9-32.1 13.8-62.6 36.3-85.6 24.7-25.3 57.9-39.1 93.2-38.7 31.9.3 62.7 12.6 86 34.4 7.9 7.4 14.7 15.6 20.4 24.4 2 3.1 5.9 4.4 9.3 3.2 17.6-6.1 36.2-10.4 55.3-12.4 5.6-.6 8.8-6.6 6.3-11.6-32.5-64.3-98.9-108.7-175.7-109.9-110.9-1.7-203.3 89.2-203.3 199.9 0 62.8 28.9 118.8 74.2 155.5-31.8 14.7-61.1 35-86.5 60.4-54.8 54.7-85.8 126.9-87.8 204a8 8 0 008 8.2h56.1c4.3 0 7.9-3.4 8-7.7 1.9-58 25.4-112.3 66.7-153.5 29.4-29.4 65.4-49.8 104.7-59.7 3.9-1 6.5-4.7 6-8.7z"></path></svg></span></div></div></div><div class="sc-EhTUr eCeahS"><div class="sc-gzcbmu dpBxjj"><div class="primary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-building  company-compact-building-icon"><svg width="1em" height="1em" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12.167 7.167V.5H3.833v3.333H.5V15.5h6.667v-3.333h1.666V15.5H15.5V7.167h-3.333Zm-8.334 6.666H2.167v-1.666h1.666v1.666Zm0-3.333H2.167V8.833h1.666V10.5Zm0-3.333H2.167V5.5h1.666v1.667ZM7.167 10.5H5.5V8.833h1.667V10.5Zm0-3.333H5.5V5.5h1.667v1.667Zm0-3.334H5.5V2.167h1.667v1.666ZM10.5 10.5H8.833V8.833H10.5V10.5Zm0-3.333H8.833V5.5H10.5v1.667Zm0-3.334H8.833V2.167H10.5v1.666Zm3.333 10h-1.666v-1.666h1.666v1.666Zm0-3.333h-1.666V8.833h1.666V10.5Z" fill="currentColor"></path></svg></span></div><div class="secondary-slot truncate"><span class="sc-dkQUaI bOtGDl format-text">Van Lang IPA</span></div><div class="tertiary-slot"><span role="img" aria-label="inbox" class="anticon s8-custom-icon icon-user-admin  "><svg width="1em" height="1em" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.24 14.88c-2.4-1.2-4.02-3.6-4.02-6.48 0-3.96 3.24-7.2 7.2-7.2s7.2 3.24 7.2 7.2c0 3.9-3.06 7.08-6.96 7.2h-.06c-5.94 0-10.8 4.86-10.8 10.8 0 .36-.24.6-.6.6s-.6-.24-.6-.6c0-5.46 3.66-10.08 8.64-11.52zm3.18-.48c3.3 0 6-2.7 6-6s-2.7-6-6-6-6 2.7-6 6 2.7 6 6 6zm16.44 3.96.12.3-1.44 1.74a.9.9 0 0 0 0 1.08l1.44 1.68-.12.3c-.3.84-.72 1.68-1.32 2.34l-.24.24-2.22-.36c-.36-.06-.78.18-.9.54l-.78 2.16-.3.06c-1.14.24-2.28.24-3.42 0l-.36-.06-.72-2.1c-.12-.36-.54-.6-.9-.54l-2.28.36-.24-.24c-.3-.3-.54-.66-.72-1.02-.24-.42-.48-.9-.6-1.38l-.12-.3 1.5-1.68c.24-.3.24-.78 0-1.02l-1.44-1.74.12-.3c.3-.9.78-1.68 1.38-2.4l.24-.24 2.16.36c.36.06.78-.18.96-.54l.78-2.1.3-.06c1.08-.24 2.22-.24 3.36 0l.36.06.72 2.04c.12.36.54.66.96.6l2.22-.3.24.24c.3.36.54.66.72 1.08.18.3.36.78.54 1.2zm-1.68-.72c-.12-.24-.24-.42-.42-.66l-1.56.18c-.96.12-1.92-.48-2.22-1.38l-.48-1.38c-.72-.12-1.44-.12-2.16 0l-.54 1.44c-.3.9-1.32 1.5-2.28 1.32l-1.5-.24c-.36.42-.6.96-.84 1.44l1.02 1.2c.6.72.6 1.86 0 2.58l-1.02 1.2c.12.3.24.54.42.84.12.24.24.42.42.6l1.62-.24c.96-.12 1.92.48 2.22 1.38l.48 1.44c.72.12 1.5.12 2.22 0l.54-1.5c.3-.9 1.32-1.5 2.22-1.32l1.5.24c.3-.42.6-.9.78-1.44l-.96-1.14c-.6-.72-.66-1.86-.06-2.58l1.02-1.2c-.12-.24-.24-.48-.42-.78zm-5.76 6c-1.5 0-2.7-1.2-2.7-2.7s1.2-2.7 2.7-2.7 2.7 1.2 2.7 2.7-1.26 2.7-2.7 2.7zm0-1.2c.84 0 1.5-.66 1.5-1.5s-.66-1.5-1.5-1.5-1.5.66-1.5 1.5.66 1.5 1.5 1.5z" fill="currentColor" stroke="currentColor"></path></svg></span></div></div></div></div>
WebDriver driver = DriverFactory.getWebDriver()
List<WebElement> profile = driver.findElements(By.cssSelector('.ant-popover-inner-content > div > div:nth-child(3) > div.dropdown-content')) 
println(profile.size())
Number  x = profile.size()

and I also get text from the table in this HTML

<div class="sc-cxNHIi fHUQtx compose-section"><div class="sc-lmgQwP knQPyO compose-section-header no-border"><span class="title"><div><span>Other Profiles</span><button type="button" class="ant-btn ant-btn-link ant-btn-sm sc-laZMeE ljWfRO s8-button"><span role="img" aria-label="info-circle" class="anticon anticon-info-circle"><svg viewBox="64 64 896 896" focusable="false" data-icon="info-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path></svg></span></button></div></span></div><div class="sc-cApVyb eHJCkP paginated paginated-table profile-list"><div id="paginated-4fcf2e90-737b-40da-9801-c48d13f1984b" class="sc-hoPuav gXmMhE paginated-body"><div class="sc-gLMgcV cTPEai paginated-table-row paginated-table-header"><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf jHmYOS truncate"><div class="header-content truncate">Index</div></div></div><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf giZJzJ truncate"><div class="header-content truncate">Profile</div></div></div><div class="sc-bnFVBq cpxcYi table-header-cell"><div class="sc-iKUVsf jHmYOS truncate"><div class="header-content truncate">Company name</div></div></div><div class="sc-bnFVBq Ka-dXi table-header-cell"><div class="sc-iKUVsf ilJSfy truncate"><div class="header-content truncate">Profile Status</div></div></div></div><div class="sc-hlXxXZ fUZwnO"><div class="sc-leehGg gIgMeA paginated-non-data-container"><div class="sc-jrsJWt dJdFwe non-data-container"><div class="ant-empty ant-empty-normal sc-kOokqr jCiuZr"><div class="ant-empty-image"><svg class="ant-empty-img-simple" width="64" height="41" viewBox="0 0 64 41" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0 1)" fill="none" fill-rule="evenodd"><ellipse class="ant-empty-img-simple-ellipse" cx="32" cy="33" rx="32" ry="7"></ellipse><g class="ant-empty-img-simple-g" fill-rule="nonzero"><path d="M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"></path><path d="M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z" class="ant-empty-img-simple-path"></path></g></g></svg></div><div class="ant-empty-description">No Data Available</div></div></div></div></div><div class="sc-lgWdIC cRRXke paginated-row-container" style="min-height: 0px;"><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">1</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">VLI Dac Vu</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Van Lang IPA</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">2</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Kate Jenner</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Mission Medical Supply</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF hdNqPP core-label  user-profile-status-icon" style="background-color: var(--main-success); text-transform: capitalize; color: var(--main-success);"><span class="core-label-content">Active</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">3</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Kate Jenner</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Gulf Coast Prosthetics</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF ilKPUV core-label  user-profile-status-icon" style="background-color: var(--main-grey); text-transform: capitalize; color: var(--main-grey);"><span class="core-label-content">Inactive</span></span></div></div><div class="sc-gpEJdM fLuIBe paginated-row paginated-table-row"><div class="sc-cxxZvF jhBYPP table-cell"><div class="sc-cSiAOC exbPXw">4</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">Jack Sparrow</div></div><div class="sc-cxxZvF jhBYPP table-cell"><div class="truncate profile-list-item-action">COASTAL EYE ASSOCIATES, PLLC</div></div><div class="sc-cxxZvF jhBYPP table-cell"><span fill="outlined" class="ant-tag sc-jHNicF fNiHDM core-label  user-profile-status-icon" style="background-color: var(--sub-caution); text-transform: capitalize; color: var(--sub-caution);"><span class="core-label-content">Company Deactivated</span></span></div></div></div></div><div type="tertiary" class="sc-ezzafa eTrCdp compose-header type-tertiary size-compact header-variant paginated-footer"><div class="sc-bYwzuL bMDHOB header-item header-item-span"><div class="paginator paginator-small "><div class="paginator-page-list paginator-page-list-tight"></div><div class="paginator-size-changer "><div class="ant-select ant-select-sm selector  ant-select-single ant-select-show-arrow"><div class="ant-select-selector"><span class="ant-select-selection-search"><input autocomplete="off" type="search" class="ant-select-selection-search-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_19_list" aria-autocomplete="list" aria-controls="rc_select_19_list" aria-activedescendant="rc_select_19_list_0" readonly="" unselectable="on" value="" id="rc_select_19" style="opacity: 0;"></span><span class="ant-select-selection-item">50 items</span></div><span class="ant-select-arrow" unselectable="on" aria-hidden="true" style="user-select: none;"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg viewBox="64 64 896 896" focusable="false" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></div></div></div></div></div></div></div>
alternateProfileAppUSR = WebUI.getText(findTestObject('Object Repository/Verify dropdown profile/tbl.Other Profiles'))

System.out.println(alternateProfileAppUSR)

Then I create a loop

i=1
while i < x:
  i += 1
{
  String GlobalVariable.alternateProfile = ".ant-popover-inner-content > div > div:nth-child(3) > div.dropdown-content :nth-child(i)"
  if (GlobalVariable.alternateProfileAppUSR.contains(GlobalVariable.alternateProfile )) {
	System.out.println(match)
     }
}

It just my assume, now i stuck in step1

List<WebElement> profile = driver.findElements(By.cssSelector('.ant-popover-inner-content > div > div:nth-child(3) > div.dropdown-content'))

and this is the error

=============== ROOT CAUSE =====================


For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

04-04-2023 04:54:24 PM Test Cases/Login/Testcountrow

Elapsed time: 0.471s

Test Cases/Login/Testcountrow FAILED.
Reason:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
file:/home/phamthuylinh/git/automation-testing/Scripts/Login/Testcountrow/Script1680514819377.groovy: 18: unable to resolve class WebElement 
 @ line 18, column 6.
   List<WebElement> profile = driver.findElements(By.cssSelector('.ant-popover-inner-content > div > div:nth-child(3) > div.dropdown-content')) 
        ^

1 error

	at com.kms.katalon.core.main.ScriptEngine.getScript(ScriptEngine.java:199)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1680602060813.run(TempTestCase1680602060813.groovy:25)

Thank you so much.
I tried yours, but it seems to have trouble with the locator.
And one more thing, can you tell me the syntax to get the locator by cssSelector/xPath?

=============== ROOT CAUSE =====================


For trouble shooting, please visit: https://docs.katalon.com/katalon-studio/docs/troubleshooting.html
================================================

04-04-2023 05:04:50 PM verifyElementPresent(coastal1, 10)

Elapsed time: 11.518s

com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: '/html/body/div[1]/div[1]/div/div[2]/span' located by '/html/body/div[1]/div[1]/div/div[2]/span' not found (Root cause: com.kms.katalon.core.exception.StepFailedException: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: '/html/body/div[1]/div[1]/div/div[2]/span' located by '/html/body/div[1]/div[1]/div/div[2]/span' not found
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
	at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword$_verifyElementPresent_closure1.doCall(VerifyElementPresentKeyword.groovy:85)
	at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword$_verifyElementPresent_closure1.call(VerifyElementPresentKeyword.groovy)
	at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
	at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.verifyElementPresent(VerifyElementPresentKeyword.groovy:92)
	at com.kms.katalon.core.webui.keyword.builtin.VerifyElementPresentKeyword.execute(VerifyElementPresentKeyword.groovy:68)
	at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementPresent(WebUiBuiltInKeywords.groovy:1464)
	at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$verifyElementPresent$5.call(Unknown Source)
	at Verify match.run(Verify match:22)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:448)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:439)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:418)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:410)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:285)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:142)
	at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:133)
	at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
	at TempTestCase1680602670301.run(TempTestCase1680602670301.groovy:25)
)