String txt = driver.findElement(ByAngular.repeater(âcompany in companiesâ).row(4).column(ânameâ)).getText();
System.err.println(txt + " Added.");
if (txt.equalsIgnoreCase(âTest Companyâ))
{
System.out.println(âNew Company Added. Now remove itâ);
driver.findElement(ByAngular.repeater(âcompany in companiesâ).row(4)).findElement(ByAngular.buttonText(âRemoveâ)).click();
}
These 2 fragments are meant to achieve the same thing. But they look different.
I hope any testers, even if h/she may say âi am not a programmerâ, would understand the conventional code. But how about the ngWebDriver-based code? I am afraid it would puzzle them. To me, the ngWebDriver-based code above is easy enough.
The âManual modeâ of test case editor in Katalon Studio would be no help for writing ngWebDriver-based code.
Do we expect the âManual modeâ of test case editor to be able to support ngWebDriver-based code just as it does for conventional WebDriver-based code? This could be a criteria to test if ngWebDriver is integrated with Katalon Studio or not.
My reply is âNo, i do not need it integrated, because I personally never use the Manual modeâ.
More over, I do not have a Angular application to test myself, therefore I am not keen on this topic very much.
In the above sample code, I find the following line is most interesting.
Angular-powered web apps are highly Ajax-driven. Therefore there would be many cases where we need to wait for target elements to be present / visible / clickable in the Angular-specific way. The above one line of code seems encapsulating quite a lot of technical details.
Not only custom keywords, we need TestObject and Object Repository to be extend to host Angular-origined citizens like ByAngular.mode("name")
;;;
However in the README, I found an puzzling note by the ngWebDriver creater
Note that for Angular 2 apps, the binding and model locators are not supported. We recommend using by.css .
hmm, should Katalon support ByAngular.mode("name") as a new type of TestObject, or not necessary?
If ngWebDriver pushes by.css then why not Katalon makes by.css as the Default Selection Method of TestObjects automatically generated by Recorder/Spy Web tools?
can anyone help me with this in how to use ngwebdriver angular thigs in the katalon testcases.
It will be helpfull if i use ngdriver.waitForAngularRequestsToFinish(); as the webpages which i use are of angular pages.
Thanks in advance.
Hi @kazurayam
Thanks for the response.I have downloaded the jar and placed it inside the katalon project as told in the README but i was still not able to use it.
It is throwing error at the import statements itself
Hi @kazurayam
I was using waitForAngularRequestsToFinish() in the test case and I was getting the script timeout exception when it comes to the waitForAngularRequestsToFinish step.
WebDriver driver1 = new ChromeDriver()
NgWebDriver ngWebDriver = new NgWebDriver(driver1);
WebUI.click(findTestObject(âCreatingTipoAndAddingFieldsInside/Address Embed Ref/div_Textclearfullscreenâ))
ngWebDriver.waitForAngularRequestsToFinish();
This is the code that is present in the scriptâŚThe website is built upon angular.
can you help me with some walkaround if anyâŚ
Thanks in advance.