Pretty new to Python here. I am running selenium web driver in order to query some info from a website (only accessible from my organization, yes SQL queries would be much better but this is what I have working at the moment). I am using Selenium's .text method to retrieve text from a table and I print(XXX.text), this returns something like this.
XXX.pdf
[Remove]
XXX.pdf
[Remove]
etc...
The question is I would like to remove, the [Remove] so that I am left with something like:
XXX.pdf
XXX.pdf
or even better
XXX.pdf, XXX.pdf
This is what I have tried so far which has not worked.
dataElement = driver.find_element_by_css_selector('''blah blah blah''')
datasheets = str(dataElement.text)
datasheets.replace('[Remove]','')
print(datasheets)
Python 3.5 Selenium 2
Thanks for any help. :)