I am trying to copy the text area message into a variable so that I can parse it.
The text area has message as follows:
<?xml version='1.0' encoding='UTF-8'?><Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><SubmitResponse xmlns="http://eftr</Error></SubmitResponse></Body></Envelope>
The HTML is as follows:
<textarea class="v-textarea v-widget v-readonly v-has-width v-has-height v-textarea-readonly" rows="5" tabindex="-1" readonly="" style="width: 100%; height: 100%;"></textarea>
I am trying the following and other configurations but I have not success:
from selenium import webdriver
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
full_xpath = r'/html/body/div[1]/div/div[2]/div/div[2]/div/div[2]/div/div/div[3]/div/div/div[2]/div/div[2]/div/div/div/div/div[3]/textarea'
path_to_chromedriver = r'C:\chromedriver' # change path as needed
browser = webdriver.Chrome(executable_path=path_to_chromedriver)
.........
.........
content = browser.find_element_by_xpath(full_xpath).text
I am not sure how to achieve the above.
Basically print(content) should produce the following:
<?xml version='1.0' encoding='UTF-8'?><Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><SubmitResponse xmlns="http://eftr</Error></SubmitResponse></Body></Envelope>