Page 1 of 1

Studio "Search/Replace" feature for element xpath?

Posted: Thu Feb 27, 2020 5:57 pm
by qa-auto
Hi, Ranorexors,

I want to update a lot of the xpath in my repos from

.//input[@id='ctl00_ctl00_MainContent_ChildContent1_loanOrigination_txtCheckNumber']

to


.//input[@id<'loanOrigination_txtCheckNumber']

Can you do a search/replace in Studio? repos.cs is locked so can't do it there. I think the answer is no, but I want to be sure before I update each individual element.

Thanks!
Lorinda

Re: Studio "Search/Replace" feature for element xpath?

Posted: Thu Feb 27, 2020 6:20 pm
by odklizec
Hi Lorinda,

The best (and probably the only) way is to edit the rxrep file, using a good text editor, with search&replace functionality. But before you edit the file, make sure you have a backup copy of last working version (ideally, stored in source control). Once the file is edited, you need to rebuild entire solution. Hope this helps?

Re: Studio "Search/Replace" feature for element xpath?

Posted: Mon Mar 02, 2020 5:08 pm
by qa-auto
Hey Pavel,

Thank you - that did help! I backed everything up then did a mass find/replace. But, that file then wouldn't load because of badly formed XML. I couldn't though figure out what the source of it was so I reverted back, then did manual updates for times sake. That was a good tip though!

Take care,
Lorinda

Re: Studio "Search/Replace" feature for element xpath?

Posted: Mon Mar 02, 2020 5:18 pm
by odklizec
Hi,

Apparently, the file editing operation corrupted the file? Unfortunately, without seeing the file and knowing which editing app you used, it's hard to tell what caused the corruption. I'm using Notepad++ or PSPad and both work great.