Next page not displayed!

hello guys,
please i clicked on the next button, test goes well in the code, but on the graphical interface, nothing happens the system does not switch to the next page.

click next :

code :

test passed correctly :

Thank you for suggestion !

Can we see the element’s HTML and how you identify it by xpath (or other)?

here is :

Not sure how you are currently identifying your button but can you temporary try the below to see if it works (note the spaces around the text):

import org.openqa.selenium.By as By
import org.openqa.selenium.WebDriver as WebDriver
import org.openqa.selenium.WebElement as WebElement

import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory

WebDriver driver = DriverFactory.getWebDriver();
sButton = driver.findElement(By.xpath('//button[text()=" Suivant "]'))
WebUI.verifyMatch(sButton.getText(), "Suivant", false);

not working :

One question please, what i have to put in as xpath in this situation ?
because i captured the object (button suivant ) with spy web method.

I noticed you changed the name in the path from “button” to “button_Suivant”. You cannot change the path structure. If you look at your HTML, you will note that the tag at the beginning of the reference text Suivant is button. That is element that we are getting–find the button that has the text, Suivant:
//button[text()=" Suivant "]

That’s the way KS finds the element. You can check how the Spy Web identifies the features of the element and compare it to the xpath that I was suggesting. In this instance, we will not be using the Object Repository for the element.

If the above doesn’t work, you can also try it like below:

If either of the above work, then you can play with your element’s attributes within the Object Repository.
EDIT: Just a note that I added a line to my code above to check if the element does have the text we want.

hello @grylion54 , I tried to do it the way you suggested to me, but another kind of error popped up :upside_down_face:
code :

error :


Try with //button[contains(., 'Suivant')]

If it doesn’t work : is your object inside an iframe ?

Hello, it does not work, I face to the same error.
thank you for more suggestion !!!


Error :

How about go to your HTML and type, CTRL + f . This should bring up a Find box. Copy and paste any of the xpaths that you have used above into the Find box and see if the indicator at the right of the Find box states “1 of 1” or something else?
//button[contains(., 'Suivant')]