@rick.bullard The screenshots are still not showing up.
I don’t understand I didn’t do screen shots last time. I pasted text.
Let me try again. And Ugh you can’t just paste HTML in without it disappearing. So please ignore the spaces at the < and >.
< input name="M$layout$webInputForm$txtLoginName" type="text" autocomplete="off" maxlength="100" id="M_layout_txtLoginName" class="input_box full_width" autofocus="" >
< input name="M$layout$webInputForm$txtPassword" type="password" autocomplete="off" id="M_layout_webInputForm_txtPassword" class="input_box_full_width" >
Can you try this :
OK, I get the following:
[error] Invalid xpath : //input[@id=‘M_layout_txtLoginName’]
Ideally I would like something like this:
@rick.bullard Can I access your test website ?
This is where I am testing.
User id :
Have you tried without XPath in the target box with the new ids from your posted code?
I note that they are different from the ids in your original post without all the extra text i.e.
content_PCDZ_MMCA7G7_ctl00_webInputForm is missing
Command: type Target: id=M_layout_txtLoginName Value: testuser01
Command: type Target: id=M_layout_webInputForm_txtPassword Value: Fiserv1!
I get the following error:
[error] Invalid xpath : //*[contains(@id, ’webInputForm_txtLoginName’)]
This is true if I use ‘_webInputForm_txtLoginName’ or ‘webInputForm_txtLoginName’.
The extra part (ie content_PCDZ_MMCA7G7_ctl00_webInputForm) is the dynamic part of the ID and part of the bonus option I mention. This data was in the original post (once Russ helped me out). And I just shortened the data in subsequent responses as Manpreet was providing the help I needed (ie getting XPath formatting correct).
Unfortunately Katalon Automation Recorder and Chrome are either not working together or my setup is somehow getting in the way. I say that because everything I have found on the web regarding KAR, XPath, etc. and what Manpreet is suggesting all matches up, but still with no viable results.
@rick.bullard What I am understanding from here there is some inner working of Katalon IDE that is giving us this issue. As I mentioned that I have never used IDE. I do all the automation work in Katalon Studio. I will give this scenario a try this morning in my Katalon Studio Project and share my findings.
@rick.bullard So I tried this with Katalon Studio not Katalon Recorder (IDE) and it worked.
I created 2 objects :
And used them in the script :
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase import static com.kms.katalon.core.testdata.TestDataFactory.findTestData import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile import com.kms.katalon.core.model.FailureHandling as FailureHandling import com.kms.katalon.core.testcase.TestCase as TestCase import com.kms.katalon.core.testdata.TestData as TestData import com.kms.katalon.core.testobject.TestObject as TestObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI import internal.GlobalVariable as GlobalVariable WebUI.openBrowser('') WebUI.navigateToUrl('https://cpfcu.architect-cert.fiservapps.com/signin.aspx') WebUI.click(findTestObject('New Folder/Page_Sign In - Cedar Point FCU/User_ID'), FailureHandling.STOP_ON_FAILURE) WebUI.sendKeys(findTestObject('New Folder/Page_Sign In - Cedar Point FCU/User_ID'), 'test') WebUI.setEncryptedText(findTestObject('New Folder/Page_Sign In - Cedar Point FCU/Password'), 'P9ET2sDE0SE=')
It worked :
OK, so I won’t be able to use Studio as I am using Recorder as a front end scripting tool fro CA’s (Broadcom) ASM WebDriver tool. And they only accept XML as an input form, as such I havent’ been able to fiugre out how to export a Studio project into XML.
Also I have been able to get the basic script to work with the Firefox extension. However, I can only use the full ID or XPath as any shortened version (i.e. to handle dynamic ID’s) has either failed with invalid xpath or just not actually clicked/typed. It feels like Recorder doesn’t handle the full XPath capabilities.
For record keeping the full paths that work are:
xpath=(.//*[normalize-space(text()) and normalize-space(.)=‘User ID’])/following::input
@rick.bullard If you want can you give specify the work flow you are trying to achieve ?
You want to run the XML generated by Katalon on another tool ?
Well, first I am just trying to get Katalon Recorder to work as I need it to. Once I can build a successful script (still more to go besides entering username and password) I will export to XML and upload that into a third party automation app.
Entering the username and password is currently my roadblock as I need to use a dynamic ID (not just this one site but I will be doing this for hundreds, with similar but not exact labels) to enter them.
This might be totally wrong, but did you tried the User_ID with class
And Password with
We need to solve this, otherwise there will be problems ahead on the road. Also from what I read on google IDE is not a good option for larger projects.
My apologies, I didn’t catch the xpath information in your screenshots.
My script now works from KAR in Firefox.
@rick.bullard So all good ?
Yes I am all good.
@rick.bullard Good to hear that.
Don’t forget to select if the reply solves your problem.