cerberustesting / cerberus-core

The Open Source Test Automation Platform.
https://cerberus-testing.com
GNU General Public License v3.0
329 stars 100 forks source link

[Cerberus Version : 4.16-1747][GL] The command scroll to is not working #2458

Closed Moujib-automate closed 7 months ago

Moujib-automate commented 1 year ago

Hello,

we noticed that the command Scroll TO is not working ; it is performing a wait instead as shown in the screenshot

Cerberus Version : 4.16-1747 image

vertigo17 commented 1 year ago

I will need more detail and context on that. Can you provide the page where you want to scroll and a screenshot of the element you want to scroll to. That could be a wrong xpath or iframe issue. Anyway you can always try to get around that issue by scrollTo using a text or using keyPress action with page down.

mflorid commented 1 year ago

@vertigo17

We have the same issue here : #2450

image

Cerberus mark it at passed but he didnt do the action

If we put the scroll with the text

image

Cerberus didnt manage to do the action either.

vertigo17 commented 1 year ago

Can you put the URL that you open and the xpath in text mode so that I try to reproduce ? Thanks.

mflorid commented 1 year ago

Can you put the URL that you open and the xpath in text mode so that I try to reproduce ? Thanks.

https://www.adeo.com/

xpath=(//*[@class="adeo-section fullwidth bg-darkblue padded"])[1]

or

text : À LA UNE

vertigo17 commented 1 year ago

Thanks. I managed to reproduce. I will come back to you.

vertigo17 commented 1 year ago

Issue should be fixed. Don't hesite to reopen is not the case on latest master.

MathisSenicourt commented 7 months ago

Hi, the issue seems to be still present on 4.18

MathisSenicourt commented 7 months ago

The scroll doesn't work but there is no error from cerberus. To reproduce :

open url : https://www.laredoute.it/ppdp/prod-350309180.aspx

reject cookies by cliking on: //*[@id="popin_tc_privacy_button_2"]

scroll to : //button[contains(@class,'product-rating-open-language')]//span

there is a bypass by using javascrip :

document.evaluate("XPATH HERE", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.scrollIntoView();

and example: document.evaluate("//*[@data-cerberus='color']", document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.scrollIntoView();

vertigo17 commented 7 months ago

fixed with commit https://github.com/cerberustesting/cerberus-core/commit/9757314baa56a5838d0bd830151027b319f980fb