# Problem scroll element into view

**URL:** <https://forum.robotframework.org/t/problem-scroll-element-into-view/5289>\
**Category:** Robot Framework\
**Created:** [9 February 2023 10:03 UTC](https://forum.robotframework.org/t/problem-scroll-element-into-view/5289 "2023-02-09T10:03:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmed](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@ahmed](https://forum.robotframework.org/u/ahmed)\
**Post date:** [9 February 2023 10:03 UTC](https://forum.robotframework.org/t/problem-scroll-element-into-view/5289/1 "2023-02-09T10:03:08Z")

</div>

hello everybody,  
please, when I run the test, it always stops at the “scroll element into view” step. it gives me the error “ELEMENT with locator not found”. although my xpath is correct. I check it on the amazon page.

 ![A.PNG](https://europe1.discourse-cdn.com/flex005/uploads/robotframework1/original/2X/3/3043175445282a36ff255d7c4dd4fb6a23f1886c.jpeg)

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [9 February 2023 11:41 UTC](https://forum.robotframework.org/t/problem-scroll-element-into-view/5289/2 "2023-02-09T11:41:18Z")

</div>

Hi Ahmed,

Are you 100% sure that url didn’t change?

I would suggest you try an xpath like this

```python
//a[text()='Suivant']

```

or

```python
//a[contains(text(), 'Suivant')]

```

Not only will this survive the url being dynamic, but it should hopefully be more obvious to another tester following you to maintain the test as to what the test is trying to do.

Dave.

---

<div class="post-metadata">

**Author:** ![ahmed](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@ahmed](https://forum.robotframework.org/u/ahmed)\
**Post date:** [9 February 2023 13:28 UTC](https://forum.robotframework.org/t/problem-scroll-element-into-view/5289/3 "2023-02-09T13:28:05Z")

</div>

ok dave . thanks for your proposition 😉
