Im currently trying to develop an application to robo-drive edits to a RavenDB database. The edits are done within an Ace editor box and the data is stored as JSON files. There appears to be no way to download, edit and reupload the Json files, they must be edited within the web page using the robo-driver.
Finding the desired lines and printing them is already solved using
div_contents = driver.find_elements(By.CLASS_NAME, value="ace_line")
for line in div_contents:
if line.text.find("oldLine") != -1:
print(line.text)
However the problem arises when trying to edit this DIV in any meaningful way. The div_contents are held as in immutable tuple, meaning this doesn't work
line.text = line.text.replace("old string", "new string")
Converting it from a tuple to a list and back seems impossible, i think because you cannot overwrite a tuple that selenium is currently working with (or im doing it wrong, if you can suggest a way to do this that's great), and i cannot find a better solution for editing DIV's in live HTML, the only solutions seem to be things like BS4 which wont work here because the page has to be live.
If anyone knows how to make it work with this current setup i'd be more than appreciative, but any alternative solutions and technologies would be just as good.