0
<p class="details-info-block__text"><span class="details-info-block__label">Business Address 1:</span> 1010 Priority Way West Dr</p>

I want to verify the address value (e.g. "1010 Priority Way West Dr"). But retrieving it using XPath //span[contains(text(), 'Business Address 1')]/.. returns the following string

Business Address 1: 1010 Priority Way West Dr

asked Oct 8, 2019 at 12:42
2

2 Answers 2

1
answered Oct 9, 2019 at 21:30
0

You can retrieve all inner text of <p class="details-info-block__text"> and then parse out the required text using String-related toolset of C#. It will be quite a tricky thing to extract what you want using selenium since the latter piece of text is a separate "naked" text node in a DOM and Selenium cannot parse it to a dedicated WebElement (anything having no associated tag)

answered Oct 8, 2019 at 13:22

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.