Web "scrape relative" captures different text after copy/paste to new location

I used the web recorder to record a “relative scrape” sequence on a web browser. Recordings, as far as I know, always get placed somewhere other than exactly where I want them.

I ran the original recording a few times to ensure it scrapes as expected. It does. I identified where the 1 variable is that catches the scraped output even if I move the browser window around, etc… The recording basically captured:

1. Attach to browser window (simple locator for this)

2. Sequence
a. find image
b. translate clipping region (direction: translate)

3. Get full text (into output variable)

4. Reset clipping region

Once I understood it, I copy/pasted the whole thing into another section of the process… and now it’s capturing a whole bunch of other text, unlike the original recording, even though I verified that the translate clipping region is the same, etc. on the copied instance.

Are there some other moving parts to this that I’m missing??

It might be a problem of relativity - if your paste location is inside any scope activity (other attach, after a find element etc.), then the clipping region will be different, as any of those will change current clipping region.

You could try:

  • Check if it works if pasted to top level
  • Reset clipping region before this recorded sequence
  • Use a blank Highlight activity - without any arguments it should highlight current clipping region (can be useful to see if region before and after is what you expected)
  • Make a separate workflow out of it and invoke where you need it (probably easiest/safest to do)

(Sidenote - it would help if there would be a no-bs way of actually getting current clipping region for debugging purposes, unfortunately I don’t know of any)

1 Like

Thanks. I’m perplexed because I haven’t used clipping anywhere else in the project. I’ve added a reset clipping region activity at the beginning of this attach scope. Same problem persists.

Odd how it works fine in isolation… but fails when integrated into my project.

Some of the activities change clipping region whenever they’re used:

  • Attach WIndow/Browser
  • Element Scope
  • Find Image/Element

(maybe more)
Any of these could throw your execution off.
DId you try using it as a separate workflow and invoking from your original one? That still should work.

@Cosmin_Ion_Nicolae - could we get a list of activities that change clipping region in the docs, f.e. similarly to how Encodings are listed?