Now that we have successfully installed OATS, the next step is to create some automated functional test scripts. In this article as a first step we will look at how to record and playback OATS scripts. We also refer OATS as openscript. Openscript is basically the IDE portion of OATS.
In case you have not yet installed OATS, we recommend you to go through following article and complete your OATS installation.
Video recording for how to record and playback OATS scripts.
Below is the video recording as how to record and playback on Chrome web browser. We had created this video in the release where OATS had given the feature to support chrome browser.
I would like to share couple of details about usage of chrome with OATS now. This means OATS had extended its capability to support most of the popular web browsers. Also, we should not forget that OATS was best designed for automation of Oracle EBS applications and unfortunately Oracle EBS application does not support launching of Oracle EBS forms in chrome browser.
So what we should understand here is that, OATS can do functional test automation of web applications in chrome and that is the scope of its capability.
In the next sections we will look at concepts like understanding how objects are identified in OATS tool, how is the xpath created and what aspects to be considered for the same. Also, we will get to know if it is similar to other open source tools way of identifying the objects.
Hello,
I have two questions:
Is it true, that OATS will not getting new features and releases by Oracle?
And also: How is it possible to get the Overall Result of a script in OpenScript with Jav?
I am executing my test and in the Finish-Section I want to log additional information.
But somehow I can’t get the Overall result.
Even if my tes FAILS I always get “passed” in the below commands.
Exception exception = getIterationResult().getError();
if(exception == null){
info(“No Exception”);
}
else{
info(“Exception”);
info(exception.getMessage());
}
boolean isIterationPassed = getIterationResult().isPassed();
if(isIterationPassed){
info(“getIterationResult().isPassed() true”);
}
else{
info(“getIterationResult().isPassed() false”);
}
boolean isLastResultPassed = getLastResult().isPassed();
if(isLastResultPassed){
info(“getLastResult().isPassed() true”);
}
else{
info(“getLastResult().isPassed() false”);
}
boolean hasLastError = getLastResult().hasError();
if(hasLastError){
info(“getLastResult().hasError() true”);
}
else{
info(“getLastResult().hasError() false”);
}
for the else conditions you need to provide fail(“your message”); then your script will fail with red error.
But you should be aware that your script execution will stop the moment it hits the fail command.
In case you do not want to stop the execution even if it fails, you may have to do some error settings, so that it will continue to execute even if it hits a fail command
Is it possible to write a script at the beginning to detect browser and if the browser is not supported for recording or playback of scripts to display a message. can MS Edge be used for recording scripts?
I think you can create two or three dummy scripts, where each will check for each browser for playback.
In those scripts, just have code to set the browser to be IE or Chrome or which ever you are looking for and then launch the browser, if that script fails you can set a global variable saying that particular browser is not supported.
So, once all the dummy scripts are executed, you global variable might have the correct browser. That you can use to execute all other scripts.
this is just a theory as this is a custom requirement. we may have to experiment and see if it works.
Hi,
I am trying to playback a script using Edge browser. I am getting error as “Fail to install Edge helper”. Using the same script I am able to playback using IE browser, but getting this issue in Edge browser
You will have to check the browser compatibility with OATS version or you may have to reinstall OATS and check. If it still does not work I suggest you to raise an SR with oracle and follow up on the same.