How to locate element which is down at page (need to scroll down)?

i need to locate element which is on same page but need to scroll down. how to locate it

1 Like

hey its working with the xpath, i have used xpath for property.

1 Like

but i am not able to find the ‘id’, the attribute has only class names. i have tried through the text property also.

Test Cases/testCase3 FAILED because (of) Unable to scroll to object ‘Object Repository/testcase3_OR/a_Load more’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/testcase3_OR/a_Load more’ located by ‘By.xpath: //a[count(. | id(“publication-section”)/div[@class=“wpb_column vc_column_container vc_col-sm-12”]/div[@class=“wpb_wrapper”]/div[@class=“vc_grid-container-wrapper vc_clearfix”]/div[@class=“vc_grid-container vc_clearfix wpb_content_element vc_basic_grid publication-list-block”]/div[@class=“vc_grid vc_row vc_grid-gutter-30px vc_pageable-wrapper vc_hook_hover”]/div[@class=“vc_pageable-load-more-btn”]/div[@class=“vc_btn3-container vc_grid-btn-load_more vc_btn3-inline”]/a[@class=“vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-flat vc_btn3-color-blue”]) = count(id(“publication-section”)/div[@class=“wpb_column vc_column_container vc_col-sm-12”]/div[@class=“wpb_wrapper”]/div[@class=“vc_grid-container-wrapper vc_clearfix”]/div[@class=“vc_grid-container vc_clearfix wpb_content_element vc_basic_grid publication-list-block”]/div[@class=“vc_grid vc_row vc_grid-gutter-30px vc_pageable-wrapper vc_hook_hover”]/div[@class=“vc_pageable-load-more-btn”]/div[@class=“vc_btn3-container vc_grid-btn-load_more vc_btn3-inline”]/a[@class=“vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-flat vc_btn3-color-blue”])][count(. | //[@href = ‘javascript:;’]) = count(//[@href = ‘javascript:;’])][count(. | //[text() = ‘Load more’]) = count(//[text() = ‘Load more’])][count(. | //[@class = ‘vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-flat vc_btn3-color-blue’]) = count(//[@class = ‘vc_general vc_btn3 vc_btn3-size-md vc_btn3-shape-rounded vc_btn3-style-flat vc_btn3-color-blue’])]’ not found)

i have tried scroll to element and pass the object which i want to click.

but it gets failed

1 Like

Hm, so how about using ‘Scroll To Position’ here. x position is 0 and y position can be 400 to scroll down.

The root cause is it can’t find the element. Since id attribute of the element is quite unique, you can try to just set only ‘id’ attribute as an only active property and uncheck other attributes of that test object, then try again. Like this: http://prnt.sc/et3r29

Hi there,

Can you show me the execution logs or the message displayed when it failed?

Thanks

Hi there,

You can use ‘Scroll To Element’ keyword. Just add a step to scroll to that element or nearby elements and do whatever you want after that.

Thanks