Yes. I just discovered where exactly is the problem, but I don’t know how to solve it.
When my page is not maximized, it shows only 5 columns. When in the test, I take out column 4,5,6 and 7, but I leave columns 1.2.3.4 and 8, the test works in Jenkins. I try putting a maximizeWindow() after changing the page, but it looks like in Studio it works, but in Jenkins, it doesn’t.
Here are the lines:
‘Open the browser’
WebUI.openBrowser(’’)
‘Maximize the window because there is a bug in the application and the sizes are absolute, not relative. Some elements won’t appear if the window is not maximized’
WebUI.maximizeWindow()
‘navigate to the signin url.’
WebUI.navigateToUrl(GlobalVariable.signin_url,FailureHandling.OPTIONAL)
def signinPresent = WebUI.verifyElementPresent(findTestObject(‘rep/input_Username_username’),4, FailureHandling.OPTIONAL)
if ( signinPresent)
{
‘Sometimes it takes a bit long to get the login page, so the script will wait until the element username is present.’
WebUI.waitForElementPresent(findTestObject(‘rep/input_Username_username’), 3)
‘Specify the user’
WebUI.setText(findTestObject(‘rep/input_Username_username’), ‘theuser’)
‘Specify the password’
WebUI.setEncryptedText(findTestObject(‘rep/input_Password_password’), ‘thepassword’)
‘Click on signin’
WebUI.click(findTestObject(‘rep/button_Sign in’))
}
‘Verify that you are logged in’
WebUI.maximizeWindow()
WebUI.verifyElementPresent(findTestObject(‘rep/test_object’), 10)
WebUI.verifyTextPresent(“Clients”, false)
WebUI.verifyTextPresent(“Client’s Name”, false)
WebUI.verifyTextPresent(“Id”, false)
WebUI.verifyTextPresent("phone ", false)
//if I add the text corresponding to the middle columns it fails, so I just write the last one.
WebUI.verifyTextPresent(“Last shopping date”, false)
And then it works. It is a problem with the maximizeWindow.
Thanks for your help and support.