Issue
<a class="ui-autocomplete-row ui-corner-all"
aria-label="(1100)Texas (PL1200/PC1030)- (200167)-Supplies: Other Supplies (620038): 1100-1200-200167-620038"
id="ui-id-7" tabindex="-1">
(1100)- (PL1200/PC1030)-(200167)-Supplies:
Other Supplies (620038):
<u><b>1100-1200-200167-620038</b></u>
</a>
In Xpath, I want to check if aria-label
contains the value "1100-1200-200167-620038". It looks like there is a syntax error in the below statement:
element = wait.until(EC.visibility_of_element_located((By.XPATH,'//*[@aria-label="1100-1200-200164-620038"]')))
Solution
You can use two option like this:
- CSS Selector
element = wait.until(EC.visibility_of_element_located((By.CSS_SELECTOR, 'a[aria-label*="1100-1200-200167-620038"]')))
- Xpath:
element = wait.until(EC.visibility_of_element_located((By.XPATH, '//a[contains(@aria-label, "1100-1200-200167-620038")]')))
Answered By - frianH
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.