Java
- If the Java applications are not getting automated in Enterprise Personal Assistant:
- Verify if the Mapping Server is running
- Validate if java.exe for mappingserver.jar is running in the Task Manager.
- If the Mapping Server is not running, verify if the port number specified for the property mappingServerPort in the mappingserver.properties file from location <UserHome>\\AppData\\Local\\EdgeVerve is available .
- Run the “netstat –an LISTENING” command in the command prompt.
- Unable to scrape Java applications in Automation Studio:
- Check if the AvailablePorts.xml file is present in the build folder at path ~\Automation Studio\.
- Unable to fetch port number of the Java application while executing the process using a Robot:
- When configuring Java application in Automation Studio, choose Environment Type as EVENT_BASED instead of WINDOW_CLASS_BASED.
- Java Search Failed in Enterprise Personal Assistant
- Verify if the mapping server is running
- Verify if java.exe for mappingserver.jar is running in the Task Manager.
- If the mapping server is not running, validate if the port number specified for the property mappingServerPort in the mappingserver.properties file from location <UserHome>\\AppData\\Local\\EdgeVerve application.properties file is available by running the “netstat –an LISTENING” command in the command prompt.
- During the launching of the JNLP application in Automation Studio/Enterprise Personal Assistant, an exception pop-up from the browser appears, and a ‘port number not found’ error appears.
- Open the browser and navigate to Tools -> Internet Options.
- Click on the ‘Connections’ tab and click on the ‘LAN Settings’ button.
- Verify that the ‘Use automatic configuration script’ checkbox is unchecked.
JNLP Sign In and Process Automation Failed
- Close Automation Studio.
- Unselect all the check-boxes in IE LAN Settings.
- Kill all IE and Java processes from the Task Manager.
- Restart Automation Studio.
Issue in Assigning Port to Java Application
In case of an issue with alignment of the port and Java application, troubleshoot with the following steps:
- Determine whether the mapping server is launched, before launching the application.
- Check that the environment variable is set before launching the application.
- Value of the environment variable is correct.
- To confirm, whether an environment variable is accurately adjusted:
- Execute the command – “wmic /output:D:\file_name.html process get /format:htable”.
- An HTML file is generated at a specified location with the currently running process details.
- If unable to execute java.exe, adjust the command line parameters for java.exe process of the application/IE. If the com- mand line does not include –javaagent:”<PATH_TO_BUILD>\ProtonAgent.jar”, then the variable is either not set or is being overridden due to re-parenting.
- Internet Explorer is launched using the ‘nomerge’ switch to avoid re-parenting.
- E.g. “c:\Program Files\Internet Explorer\iexplore.exe” -nomerge http://www.ex.com
- This action is executed because, in case the parent is already set to open IE (in the absence of an environment variable set), and it stands to inherit the parent properties.
Evaluating whether Mapping Server is in Operation
To evaluate whether the mapping server is in operation.
- Execute the below command on the command prompt
Netstat –an
- Filter the results further using the find command
Netstat –an | find “LISTENING”
- Verify if the port number specified for the property mappingServerPort in the mappingServer.properties file from location <UserHome>\\AppData\\Local\\EdgeVerve is available.
- Check port number from above file is in the results displayed from the find command.
- If the entry is found in the results, conclude that the mapping server is running, else conclude that it is not running.
Inability to Call the Core APIs
In case of the ‘no such handler available’ error, follow the below steps:
- Examine the object name and corresponding class name in api-config.xml file.
- Confirm if the same object name is being used to call the API.
Unable to Launch App - Setting Environment Variable
Scenario: Even after setting the environment variable appropriately and launching the mapping server, the application is not launched.
Reason: This is because of tighter security parameters around the latest JRE version, which prevents instrumentation of the JVM agents.
Solution: Grant extra permission while launching the application.
For Java/ Applets: proxy.SetAgentJarEnvVariableWithPolicy() |
For JNLP: Call the API- proxy.SetPolicy(); Proxy.SetAgentJarEnvVariable(); Where proxy is the object of MappingServer.cs class in Utilities.JavaAutomationWrapper DLL. It is an instance of the running mapping server and grants the necessary permission to launch the application in sync with the automation code that is injected into it. |
App is Unable to Recognize the Text in The Text Box
Scenario: Text is being appropriately embedded in the text box, but it is not recognizable by the application.
Solution:
- Use the API SetKeyEventText (String searchpath, String text)
- This API is used to set the text using Key events.
Appropriate Actions are not Commissioned by Button Click
Scenario: Button click does not perform the designated actions, even though automation is carried out appropriately.
Solution: In this scenario, use ButtonEnter(String searchPath) API to perform the necessary actions on the JButton.
Unable to get Port for Mapping Server
When running an automation, robot is unable to get the mapping server port number.
It is recommended to:
- Keep only one version of java that application uses and remove others.
- Set the java_tools_option env variable explicitly at user level or system level to handle the mapping server.
Failure in Network Connection
When there is a failure in network connection with the remote server and the ports are unavailable, the scheduled trigger fails to start the robot. An error message “A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://localhost:49970/session//window_handles” is displayed.