Reputation: 1237
I am having an issue in selenium. I have this xpath that is working well
//*[@id='info_country']//div[contains(@class,'ant-select-selection-selected-value')
and I try to change it and use css selector instead of xpath I write this code:
#info_country .ant-select-selection-selected-value ng-tns-c17-151 ng-star-inserted
and the consul not find the path
can someone advise this is the consul and I pointed the element I want to locate
Upvotes: 0
Views: 311
Reputation: 50809
ng-tns-c17-151
and ng-star-inserted
are separate classes, you need to state it in the selector using .
. Currently, the selector treats ng-tns-c17-151
and ng-star-inserted
as tags
#info_country .ant-select-selection-selected-value.ng-tns-c17-151.ng-star-inserted
The direct translation will be without those classes
#info_country .ant-select-selection-selected-value
Upvotes: 1