Getting Started
Save the Date! watsonx Hackathon - Pre-TechXchange Conference Event
The IBM Maximo Test Automation Framework now Available!IBM Maximo Test Automation Framework
As part of the IBM Maximo Application Suite, the IBM Maximo Test Automation Framework can be utilized to validate or re-validate Maximo Manage processes and capabilities for a given release based on approved and certified configurations from IBM.
The IBM Maximo Test Automation Framework consists of a series of validation test scripts that encompass asset and work management business processes. These test scripts contain information that can be built upon to develop and document a manufacturer's policies and procedures according to the implementation and use of Maximo Manage application software.
These scripts can be used as quality assurance test cases to validate information systems. They will be updated for every Maximo Application Suite long term supported release.
The IBM Maximo Test Automation Framework is a Java framework based on the Selenium API. The IBM Maximo Test Automation Framework can be used to automate the testing of Manage applications in non-production environments. The scripts have been developed to validate out of the box processes, but can be modified in order to align with any customer specific configurations of business processes.
Selenium is a free tool, widely used in the software development community, which can be easily downloaded and installed in an existing Eclipse environment. There are tutorials about how to install and configure your Eclipse/Selenium environment.
The IBM Maximo Test Automation Framework is offered “AS IS", WITH NO WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTY OF TITLE, NON-INFRINGEMENT OR NON-INTERFERENCE AND THE IMPLIED WARRANTIES AND CONDITIONS OFMERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Any issues or questions about the IBM Maximo Test Automation Framework should be reported through this Community.
Find the IBM Maximo Test Automation Framework download on the early programs site here.
@Supriya Nanjangud Jayanna
When you receive that error it's because the driver cannot find the file specified in the TpaeTestFramework.properties file. In the log it should give the path of the file it was trying to find - are you able to find the same file using that path?
Started using the Maximo Automation framework and when trying to create/copy new bin file Getting error " cannot find the .bin file". Existing bin files will work when executed from Tpaeframework.properties.
@John Hunt
I think you put the message below in the wrong community - this is for the framework from Manage 8.6 and I think you're trying to set up for 7.6.1.x? That community is here: https://community.ibm.com/community/user/asset-facilities/viewdocument/maximo-selenium-automation-framewor?CommunityKey=7f1637b5-e23d-4694-a843-ab9c5b205d49&tab=librarydocuments
I keep getting this error now. Acts like it cannot find the driver but its there.
@Benny Larsen
If you make the updates for that login screen part of the TpaePageLogin.java file it will work for either login screen. You can add/modify the following in the file:
Add these lines with the other string variables:
String userNameId2 = "j_username";
String passwordId2 = "j_password";
Update setUserName with:
public void setUserName(String userName) throws Exception{
String user = "";
if (browser.getElement(userNameId) != null)
user = this.userNameId;
else if (browser.getElement(userNameId2) != null)
user = this.userNameId2;
browser.typeOver(user, userName);
}
Update setPassword with:
public void setPassword(String password) throws Exception{
String pwd = "";
pwd = this.passwordId;
if(browser.getElement(pwd) != null)
else if (browser.getElement(passwordId2) != null)
pwd = this.passwordId2;
browser.typeOver(pwd, password);
if (browser.isFirefox() || browser.isChrome())
browser.getElement(pwd).sendKeys(Keys.ENTER);
@Kristin Fernandes
When we run against one of our environment we don´t have any issue, but when we change to another environment we get:
org.openqa.selenium.JavascriptException: javascript error: Cannot read properties of null (reading 'scrollIntoView')
(Session info: chrome=125.0.6422.142)
Build info: version: '4.7.2', revision: '4d4020c3b7'
System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.23'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [619cf7766ca8afbb40b0c6b1c9e9e14f, executeScript {script=arguments[0].scrollIntoView();, args=[null]}]
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 125.0.6422.142, chrome: {chromedriverVersion: 125.0.6422.141 (4b1e8393712..., userDataDir: C:\Users\larben04\AppData\L...}, fedcm:accounts: true, goog:chromeOptions: {debuggerAddress: localhost:49954}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: WINDOWS, proxy: Proxy(), se:cdp: ws://localhost:49954/devtoo..., se:cdpVersion: 125.0.6422.142, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:extension:minPinLength: true, webauthn:extension:prf: true, webauthn:virtualAuthenticators: true}
Session ID: 619cf7766ca8afbb40b0c6b1c9e9e14f
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
It looks like the element 'username' is NULL.
The different between the environments is: the environment that fails is connected to Active Directory/Singel SignOn.
At the login page i can see that the username & password fields have different id:s (username resp. J_username).
When i change to J_username & j_password in TpaePageLogin.java file:
String usernameId = "j_username";
String passwordId = "j_password";
Then it works!
But is there a better way to do this? We want to be able to change environment without changing java code everytime
@Fredrik Thörnblad
The framework does not support multiple locales and we have never claimed to do so. The testing done internally using automation uses en as the locale (if one is even specified) and testing using different locales is not done using these scripts.
There is no way using the existing framework to support multiple locales and it looks like the easiest way would be to replace the comma with a period, do the calculation and then change it back to a comma. It's not easy I know, but again, it's not supported.
You can also build in locale testing in your framework locally that would automatically support the different locales. There are already a lot of existing libraries that can be use to do that.
Working with numbers, time, locale formats is a pain...I tried to assert a value from SQL from the db, the retrieved value uses dot and the value in Maximo is in swedish format, thus a comma (3.45 vs 3,45).
When using the multiply/result you can't use comma, you need dot. And to make things worse, if the result is without decimals, it will only give the integer part (1.50 * 2.00 = 3, not 3.00) and the assert is false. Also if the result has more than two decimals (3.12345) it will not equal the two decimals displayed in Maximo (3.12 or 3,12)
The same when trying to multiply the time, it's in hh:mm format but needs to be with dot if used in multiply.
The only way I have found to convert between formats is to use SQL, eg to convert the time variable into a usable format.
{"index":1,"event":"makeVariable","sql":"SELECT top 1 CAST(LEFT('{$time}', CHARINDEX(':', '{$time}') - 1) AS DECIMAL(10, 2)) + CAST(RIGHT('{$time}', 2) AS DECIMAL(5, 2)) / 60.0 FROM workorder;","params":["timedec"]},
Please tell me there are better ways to do this...
You can use the result parameter with makeVariable to do that. So let's say you have the two values saved as variables and you want to multiply them, you can do it like this:
{"event":"makeVariable","result":"{$time} * {$cost}","params":["price"]},
And then for addition you would do the same thing. Looking at the framework it only accepts two values so you'd have to do it twice to add the prices.
Any pointers how to verify/assert costs with this framework?Basically I need to do math in a workorder, 1. First verify three fields, that time * cost = price 2. and then add up all lines of price to match a total.
If it works by changing it in the properties file, that's totally fine. The purpose of sending the commands in using the command line is so the properties file doesn't need to be changed and the properties will change based on what is sent in via command line to override the properties file.
I think i was a little bit careless with my words...when i wright that nothing happens, i refering to that headless doesn't work, the test/tests starts and run as expected.
My command line looks like this: java -Djava.net.preferIPv4Stack=true -ea -Duitest.runHeadless=true -Dfile.encoding=Cp1252 -classpath C:/Temp/testng-remote.jar;C:\Users\larben04\source\repos\MXTestAutomation\AutomationTRV\classes;C:\Users\larben04\source\repos\MXTestAutomation\AutomationTRV\lib\* org.testng.TestNG C:\Temp\testng-customsuite.xml
***But what i found was that if i change in the properties file located in the class folder, then it works to run headless (but that is not how we should run it i guess)
No, you cannot debug using the command line. There would be no way to step through code or analyze any variables.
If nothing happens when trying to run from the command line, then it looks like the command isn't set up properly (it looks like you have the same problem on both machines). You need to make sure that you are running the command from the Automation folder inside your workspace.
The following is an example of a command I'm successfully able to run from the command line once I'm inside the Automation folder:
java -Djava.net.preferIPv4Stack=true -ea -Dfile.encoding=Cp1252 -Duitest.runHeadless=true -classpath C:/temp/testng.jar;C:\<path to workspace>\Automation\classes;C:\<path to project>\Automation\lib\* org.testng.TestNG C:\temp\testng-customsuite.xml
Is it possible to run Debug from CMD?Because now if i run debug from Eclipse Developer environment), the 'System.getProperty(...' is null. And thats correct, but...
1. If i run CMD from my computer (with parameter), nothing happens. If i change in properties file to true, then i run in Headless mode - same result as before. So my conclusion is that the framework isn´t running the code for CMD.2. If i run from another machine (server), then nothing happens regardless if i use properties file or parameters in CMD.
When it's not working when you specify System.getProperty, are you passing in the parameter through the command line (-Duitest.runHeadless=true)? If not, that's why it's not picking it up. The reason the line AutomationUtility.getProperty("uitest.runHeadless") is working in its place is because it's reading it from the file instead of getting it from the command line that's being used to run the test. You can keep it that way if you don't want to specify it on the command line.
When i do: String runHeadless = System.getProperty("uitest.runHeadless"); - i get NULL as result regardless true/false in properties file. But if i change to: AutomationUtility.getProperty("uitest.runHeadless"); - then i get what i wrote in properties file.
BUT...this is in my developer environment, and as i mention before, here i don´t have any issues, here it works...but when i put the framework on a different machine as a server, without any developer applications and run test, then is starts the browser anyway...its a mystery´.
When you say it works for you, do you test on your developer environment or on a toltaly different machine?
No, TpaeTestDriver extends TestDriver. You can't use TestDriver directly.
It should be working with the added code from what I see (when I tested it, it opened the browser before adding the code but no longer opened it after adding it). You can try to put some debug code in either TestDriver or AutomationBaseTest to ensure that the setting is being picked up on the environment.
I have now updated my file on the server and started CMD...still opens the browser.
I use TpaeTestDriver.java is that why?
Looking at the framework, it doesn't look like that's a property that's currently picked up when running from the command line but I can give you the code to update the one file. I just made the update on my side for the next release and it works fine.
Open Automation/tests/testdriver/TestDriver.java. Add the following at line 882:
String runHeadless = System.getProperty("uitest.runHeadless");
And at line 915:
if (runHeadless != null && !runHeadless.equals(""))
AutomationUtility.setProperty("uitest.runHeadless", runHeadless);
This should now pick up the headless property when running from the command line.
Hi @Kristin Fernandes
If i want to run my testcases from CMD with browser in 'headless mode, how do i do?
In my properties file i put in following text:
// Run Browser Headless
uitest.runHeadless=true
This works fine when i run from Eclipse, it also works fine when i run from CMD on my computer, but if i put framework on a server without any developer applicationes and run from CMD - everything works except for headless mode.
I have tried to have it in properties file, i have also hard coded it in AutomationBaseTest.java - but it still starts the browser.
Any suggestion?
Br.
Benny
Hi @Elaine Doucette
I’m not sure this is the correct place for this question to be asked because the community is a place to get help with the framework itself. This is not a question pertaining to that.
As I stated in my response to you via Slack, this project is offered as is on the Early Programs site. We support via the community only and we do not join any calls regarding the framework. This is not a paid offering so it's not supported the same way other projects are supported. The framework and the scripts included were made available for customer use after receiving inquiries about what we use in-house to automate testing. The framework and scripts are made available for customers to take and run in their own environments, as well as create their own scripts, using the same framework we use during our testing cycles.
There is not an exact count of the number of scripts available, but there are around 900 scripts included with the project. They are not broken down or separated by application or module because most of the tests go cross-application and cross-module. They test various applications, functional flows of records from one application to another, hundreds of different scenarios and some scripts were created as a result of fixed APARs.
There are no L3/L4 specific scripts because everyone uses the same scripts.
As for an upgrade, this framework is for MAS 8.10, which is specified when downloading the project, so it will not work on a 7.x environment.
that worked, the error was i didnt specify the chrome.exe file on the path
uitest.chrome.capabilitiesLocation=C:/Program Files/Google/Chrome/Application
the automation was able to run successfully, thank you.
@gabriel jacob
Did you specify the entire path to Chrome in the properties file? I was able to reproduce the problem you were seeing when I removed a portion of the path. In my properties file, the path is set as:
uitest.chrome.capabilitiesLocation=C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
If I remove chrome.exe I see the same problem you were seeing.
RE Maximo MAS Upgrade to V8 and impact on Maximo Test Automation Scripts ( TAF)
Hi Team, @Kim Woodbury
We are solutioning a few Maximo MAS Update proposals where the clients are asking IBM to be responsible for testing and to automate the testing.
Can someone who is familar with the existing Maximo OOTB Test Automation script provide some guidence for input to our estimations.
Is there someone I can chat with as as we have a few more questions also.
Thank You
Elaine Doucette, Senior Solution Consultant
edoucett@ca.ibm.com
506-271-2362
the browser is Version 123.0.6312.123 (Official Build) (64-bit)
the chromedriver is Version: 123.0.6312.122
123.0.6312.122
that is the latest stable win64 chromedriver. beta is 124.0.6367.60 so the best match is the one installed. chrome is managed by my organization so i cant change that.
I have been trying to reproduce it but am unable to and receive a more detailed error message (chrome cannot be found, the driver cannot be found, the driver and chrome version don't match, etc) where you have the unknown error each time I'm trying to reproduce.
Do the browser version and chromedriver version match up? If it wasn't able to find Chrome there would be a message, same thing if it wasn't able to find the driver.
here is the full error:
Is that the entire error message? There is usually more to the message referring to chromedriver or the chrome binary. I tried to reproduce the problem but each message I received had more details than what you posted.
Things to check would be that the framework is able to find both the chrome application as well as the driver, that the version of chrome and the driver are both the same, that chrome is able to be launched and there isn't a security setting preventing it from opening, that the driver is able to be launched and there isn't a security setting preventing it from opening.
i followed the instructions but got this error:
ChromeDriver was started successfully.FAILED CONFIGURATION: @BeforeClass framework.AutomationBaseTest.beforeClass(org.testng.TestRunner@773e2eb5)org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Failed to create Chrome process.
If anyone needs to use the chromedriver directly in the project instead of using the WebdriverManager, the following steps can be used:
1. Download the chromedriver that matches the version of chrome being tested and add it to Automation/lib
2. In the TpaeTestFramework/GraphiteTestFramework.properties file, add the following section:
// Chrome settings
uitest.chrome.capabilitiesLocation=<path to chrome on the machine>
uitest.chrome.webdriverLocation=lib/<chromedriver name>
3. Open the framework/AutomationBaseTest file and make the following updates:
At line 286, after Logger.details("Starting chrome driver"); add the following two lines:
String chromeBin = AutomationUtility.getProperty("uitest.chrome.capabilitiesLocation","C:/Program Files (x86)/Google/Chrome/Application");
((ChromeOptions)options).setBinary(chromeBin);
That will get the value set in your properties file in the uitest.chrome.capabilitiesLocation property, which should point to the browser. It will overwrite the default value set in the line above.
Comment out lines 335 and 336 as these are needed when using WebDriverManager.
At line 337, enter the following:
String chromeWebdriverLocation = AutomationUtility.getProperty("uitest.chrome.webdriverLocation", "lib\\chromedriver.exe");
System.setProperty("webdriver.chrome.driver", chromeWebdriverLocation);
Lines 372 and 373 can be commented out :
(if(wdm != null && localExecution)
wdm.setup();
Once you set these properties and make the framework changes, when you run the test it will get the browser at the specified location and use the specified chromedriver to do the testing.
@Elaine Doucette
I am the SME for this project. This community is the only way we provide support because it is offered as is.
That error points to a problem on your site with being able to make a connection. Are you behind a firewall or something that would prevent you from being able to make a connection?
Sry for late answer...Next time i have the issue that the webbrowser version and the webdriver version does not match, i will give you the versions so you can test. For now that works, for how long...i don't know. ;-)
Hi Team - Is there a SME on the test automation scripts and FW that I could connect with. We are solutioning the testing and validations for a Maximo MAS update and I am wanting to assess if there value to using / reusing the scripts and if there are any insights or LL's on the testing of the MAS Update for our clients.
Greatly appreciated if someone is able to contact me on Apr 11 - eastern time.
Thanks
Elaine
i downloaded the latest version(5.8) and that error disappeared but i got a new one, any tips?
Unfortunately this problem is outside of the framework and isn't something we have any control over. I did look at any issues relating to this and I found it had been reported and fixed but there was an offered solution as well: https://github.com/bonigarcia/webdrivermanager/issues/1226#issuecomment-1960645899
I just update it to the latest version(5.7.0) but I still got the same error
The problem you're seeing is coming from something outside of the framework (WebDriverManager). Are you using the latest version of WebDriverManager? I did see there were reported problems that looked just like this in an earlier version that should have been fixed in the latest version (according to the issues I saw on their GitHub site).
Hello,
I'm currently installing the automation framework but I get an error when I try to run the tests in this step: “For Manage, use TpaeTestDriver. Right click the TestDriver and choose Run As → TestNG Test”
Error:
Apr 02, 2024 9:35:31 AM org.testng.log4testng.Logger info
INFO: [Utils] DynamicGraphHelper.createDynamicGraph() took 4 ms.
Apr 02, 2024 9:35:33 AM io.github.bonigarcia.wdm.WebDriverManager resolveDriverVersion
INFO: Using chromedriver 123.0.6312.86 (resolved driver for Chrome 123)
Apr 02, 2024 9:35:33 AM io.github.bonigarcia.wdm.online.Downloader downloadAndExtract
INFO: Downloading https://storage.googleapis.com/chrome-for-testing-public/123.0.6312.86/win64/chromedriver-win64.zip
Apr 02, 2024 9:38:06 AM io.github.bonigarcia.wdm.cache.ResolutionCache clear
INFO: Clearing WebDriverManager resolution cache
Apr 02, 2024 9:38:06 AM io.github.bonigarcia.wdm.WebDriverManager handleException
WARNING: There was an error managing chromedriver 123.0.6312.86 (Connection reset) ... trying again avoiding reading release from repository
Apr 02, 2024 9:38:07 AM io.github.bonigarcia.wdm.WebDriverManager fallback
WARNING: There was an error managing chromedriver (latest version) (For input string: "public") ... trying again using latest driver stored in cache
Apr 02, 2024 9:38:07 AM io.github.bonigarcia.wdm.WebDriverManager resolveDriverVersion
INFO: Using chromedriver public (resolved driver for Chrome 123)
Apr 02, 2024 9:38:07 AM io.github.bonigarcia.wdm.WebDriverManager handleException
SEVERE: There was an error managing chromedriver public (For input string: "public")
java.lang.NumberFormatException: For input string: "public"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.base/java.lang.Integer.parseInt(Integer.java:652)
at java.base/java.lang.Integer.parseInt(Integer.java:770)
at io.github.bonigarcia.wdm.managers.ChromeDriverManager.buildUrl(ChromeDriverManager.java:178)
at io.github.bonigarcia.wdm.managers.ChromeDriverManager.buildUrl(ChromeDriverManager.java:155)
at io.github.bonigarcia.wdm.WebDriverManager.download(WebDriverManager.java:1282)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1199)
at io.github.bonigarcia.wdm.WebDriverManager.fallback(WebDriverManager.java:1461)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1442)
at io.github.bonigarcia.wdm.WebDriverManager.manage(WebDriverManager.java:1205)
at io.github.bonigarcia.wdm.WebDriverManager.handleException(WebDriverManager.java:1435)
at io.github.bonigarcia.wdm.WebDriverManager.setup(WebDriverManager.java:427)
at framework.AutomationBaseTest.setupDriver(AutomationBaseTest.java:368)
at framework.AutomationBaseTest.beforeClass(AutomationBaseTest.java:237)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:361)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:296)
at org.testng.internal.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:180)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:122)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
at org.testng.TestRunner.privateRun(TestRunner.java:829)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:437)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:431)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:391)
at org.testng.SuiteRunner.run(SuiteRunner.java:330)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1176)
at org.testng.TestNG.runSuites(TestNG.java:1099)
at org.testng.TestNG.run(TestNG.java:1067)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
@MERCEDES KILLINGSWORTH
It looks like the issues with the Early Programs site have been resolved. You should be able to download again.
Ha! Now I'm confused too! I was using the information you provided in both communities together, thinking you just moved the question over and it was the same problem.
So let's start from the beginning with a couple of questions to get started.
With some of that information I can try to replicate the same thing if we can't figure out the problem without trying to run the same code.
hmmm now i am confused...where do you see that i am using edge and not chrome? we use chrome because it works somtimes, and with sometimes i mean when i am able to download a webdriver version corresponding to our installed webbrowser. But now and then our organisation update the browser to a newer version, and if i then can't find a webdriver version suitable for the updated webbrowser - then my tests fail.
So then i tried to run with edge (but thoose questions was on the other community, för 7.6.1.3), and answer was that i am running wrong edge. So my question below is regarding Chrome.
It looks like you're using Edge, not Chrome because there was no Chrome version with the number below.
You need to get the driver for Edge for that version from here: https://msedgewebdriverstorage.z22.web.core.windows.net/?prefix=121.0.2277.128/ and then you'd need to set the paths for Edge the same way as the instructions for Chrome so it finds the browser and the driver.
Yes i know, but when we download manually from https://googlechromelabs.github.io/chrome-for-testing/
We sometimes doesn't find same version for webdriver that we have on our webbrowser, and then we have a missmatch, and we can't run our tests.
It's strange that we seems to be the only one that have this issue, or where is the framework downloading the webdriver? maybe from another place where it always find the correct one?
If there's a mismatch it's because the webdriver version and browser version are different. You need to make sure you get the driver version that matches the version of the browser being tested.
@Fredrik Thörnblad @Kristin Fernandes
We asked same question in wrong community...so i think i am in right place now. ;-)
So the problem is: our organisation doesn't allow the framework to go online to find new files in that manner. So it will have to be a static solution with preinstalled browser/driver.
Response we received:
You would just need to add a couple of lines to framework/AutomationBaseTest to use a Chrome for Testing browser.
At line 309, after Logger.details("Starting chrome driver"); add the following two lines:
options.setBinary(chromeBin);
It still doesn't work...and i don't understand how? because you still have a missmatch between webdriver and installed webbrowser. Our organization controll the version we run on, we can't change that
Br
Unfortunately there is a known problem with downloading files from the Early Programs website at this time. I can post an update when I see that the problem has been resolved.
Thanks.
I'm unable to download the files from the early programs site. When I click on a link, it says "Checking File / Agreement" while spinning. Have the links been disabled or updated?
What version of the framework are you using? I'm confused here as this forum is for MAS 8.10 but you're talking about being on 7.6.1.x.
The framework for 7.6.1.x as well as the documentation that lists the versions of each of the files used at that time can be found here: https://community.ibm.com/community/user/asset-facilities/viewdocument/maximo-selenium-automation-framewor?CommunityKey=3d7261ae-48f7-481d-b675-a40eb407e0fd
There are newer versions of eclipse as well as jar files since the framework was released (it was released in 2018) but the documentation lists the ones it was using when it was released. I don't know if any of the framework files have been customized at all but you should be able to set up the V3 framework and then add any scripts you created to that project.
@Kristin Fernandes,
I am no longer able to run tests via eclipse. All was working fine until I had to update the edgedriver and chromedriver (I have used both browsers in the past) and have not been able to get to work since. Encounter multiple java errors. I was finally able to get the errors cleared in the individual java files however now getting this latest one when trying to run a test using TestNG. org.testng.TestNGException: The factory method class framework.AutomationBaseTest.framework.AutomationBaseTest() threw an exception at org.testng.internal.FactoryMethod.invoke(FactoryMethod.java:103) at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:150) at org.testng.TestRunner.initMethods(TestRunner.java:424) at org.testng.TestRunner.init(TestRunner.java:247) at org.testng.TestRunner.init(TestRunner.java:217) at org.testng.TestRunner.<init>(TestRunner.java:169) at org.testng.remote.support.RemoteTestNG6_9_10$1.newTestRunner(RemoteTestNG6_9_10.java:29) at org.testng.remote.support.RemoteTestNG6_9_10$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG6_9_10.java:65) at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:594) at org.testng.SuiteRunner.init(SuiteRunner.java:168) at org.testng.SuiteRunner.<init>(SuiteRunner.java:117) at org.testng.TestNG.createSuiteRunner(TestNG.java:1319) at org.testng.TestNG.createSuiteRunners(TestNG.java:1306) at org.testng.TestNG.runSuitesLocally(TestNG.java:1160) at org.testng.TestNG.run(TestNG.java:1064) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)Caused by: java.lang.IllegalArgumentException: wrong number of arguments at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.testng.internal.FactoryMethod.invoke(FactoryMethod.java:95) ... 17 morePicked up JAVA_TOOL_OPTIONS: -Djava.vendor="OracleJava7Fix"
I have tried updating the framework to version V.3 (as we are on Maximo v7.6.1.1 going to 7.6.1.3) then I have tried multiple versions of Selenium (2.47.1, 3.0 , 3.141.59. and 4.18.1) and different versions of TestNG (6.8, 6.8.5, 6.9.10, 6.11, 6.14.3). I am not a programmer, I am on the business side and perform Development and Acceptance testing. I really do not know what versions to use together to make it work. Eclipse is Version: Neon.3 Release (4.6.3)Build id: 20170314-1500. Any help , guidance or direct contact support would be greatly appreciated.
A note to anyone who is interested in downloading the automation project: I want to reiterate that the project is for MAS 8.10/Manage 8.6 only.
Note: The error below is due to trying to use the framework on an unsupported MAS version.
Thank you.
Tested it for MAS 8.7 in TechZone, I am getting the following error: Failed to load Maximo Login Page for primary and backup server
Here are the Eclipse Logs:
TEST 1: Go run the bin file: /Users/..../eclipse-workspace/Automation/tests/testcases/work_order_tracking/CreateAndVerifyCorrectiveWorkOrder.bin
JavaScript warning: https://auth.inst1.apps.270006jx7k-59iu.cloud.techzone.ibm.com/login/static/js/npm.sdp.faf78995.chunk.js, line 0: Successfully compiled asm.js code (total compilation time 0ms)
console.warn: LoginRecipes: "Falling back to a synchronous message for: https://auth.inst1.apps.270006jx7k-59iu.cloud.techzone.ibm.com."
1709145272370 Marionette WARN Ignoring event 'DOMContentLoaded' because document has an invalid readyState of 'complete'.
JavaScript warning: https://masdev-all.manage.inst1.apps.270006jx7k-59iu.cloud.techzone.ibm.com/maximo/oslc/graphite/manage-shell/static/js/npm.quagga-graphite.aecf2d68.chunk.js, line 0: Successfully compiled asm.js code (total compilation time 1ms)
1709145279703 Marionette WARN Ignoring event 'DOMContentLoaded' because document has an invalid readyState of 'complete'.
java.lang.Exception: Failed to load Maximo Login Page for primary and backup server.
at framework.selenium.Browser.testFail(Browser.java:157)
at framework.selenium.TpaeBrowser.logInAs(TpaeBrowser.java:817)
at framework.selenium.TpaeBrowser.logInAs(TpaeBrowser.java:741)
at framework.selenium.Browser.logIn(Browser.java:487)
at tests.testdriver.TestDriver.processEvent(TestDriver.java:1644)
at tests.testdriver.TestDriver.processTestFileLineByLine(TestDriver.java:1385)
at tests.testdriver.TestDriver.CALLOUT(TestDriver.java:3147)
at tests.testdriver.TestDriver.processEvent(TestDriver.java:1660)
at tests.testdriver.TestDriver.Driver(TestDriver.java:515)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:677)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:221)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:969)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:194)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
1709145280825 RemoteAgent INFO Perform WebSocket upgrade for incoming connection from 127.0.0.1:55204
1709145280826 CDP WARN Invalid browser preferences for CDP. Set "fission.webContentIsolationStrategy"to 0 and "fission.bfcacheInParent" to false before Firefox starts.
1709145280840 Marionette INFO Stopped listening on port 55135
FAILED: tests.testdriver.TestDriver.Driver
java.lang.AssertionError: TestDriver.Driver(): Driver Failed
at org.testng.Assert.fail(Assert.java:110)
at framework.selenium.Browser.driverFail(Browser.java:200)
at tests.testdriver.TestDriver.Driver(TestDriver.java:805)
===============================================
Default test
Tests run: 1, Failures: 1, Skips: 0
Thanks for your help. Now the scripts are running successfully.
@Vijay Krishna Avvaru
The code you added below is not a script but is rather a callout and should be used inside of a script. The format for the code is in the callout (the line with {"event":"callout"....)
Looking at the contents of the callout, you need to already be in the Crews application with either a new crew record created, or another one on the screen. This callout adds an assigned labor record to a crew, and you need a crew record to be able to do that.
Actually we are able to Login into the application then the script is search for the mentioned element "mcb5164af_bg_button_addrow-pb" at the home page but as it is unable to find it so we are getting the provided error.
We are using the below script.
/* Add an Assigned Labor to crew.
1. Go to the Labor Assignments tab, if applicable.
2. Insert a new row in the Assigned Labor.
3. Select the position using Select Value.
4. Specify the required labor.
5. Save, if specified.
params:
ARGS1: Open tab?
ARGS2: Position
ARGS3: Labor
ARGS4: Save record? (boolean)
{"event":"callout","binfile":"./applications/crews/AddAssignedLaborToCrew.bin","params":"$ARGS1, $ARGS2, $ARGS3"}
*/
/* IBM Interaction Recorder output file */
{
"interactions": [
{"event":"startTestStep","name":"Add assigned labor {$ARGS3} to crew"},
{"event":"if","condition":"{$ARGS1} == true"},
{"index":0,"event":"click","id":"m55a3ec52-tab_anchor","comment":"Click the Labor Assignments tab","eventType":"click"},
{"index":1,"comment":"maintabchange : Labor Assignments"},
{"event":"endif"},
{"index":2,"event":"click","id":"mcb5164af_bg_button_addrow-pb","comment":"Click the New Row button in the Assigned Labor table","eventType":"click"},
{"index":3,"event":"click","id":"m731ce203-img","comment":"Click the Select Value image for the Position field","eventType":"click"},
{"index":4,"comment":"showdialog : Select Value"},
{"index":5,"event":"typeover","id":"lookup_page1_tfrow_[C:0]_txt-tb","params":["$ARGS2"],"comment":"Type {$ARGS2} in the Position filter field","eventType":"change"},
{"index":6,"event":"keystroke","id":"lookup_page1_tfrow_[C:0]_txt-tb","params":[13,"\r",false,false,false],"comment":"Press the ENTER key in the Position filter field","eventType":"keydown"},
{"index":7,"event":"click","id":"lookup_page1_tdrow_[C:0]_ttxt-lb[R:0]","comment":"Click the link for record {$ARGS2}","eventType":"click"},
{"index":8,"comment":"hidedialog : Select Value"},
{"index":9,"event":"typeover","id":"mea15b3b9-tb","params":["{$ARGS3}"],"comment":"Type {$ARGS3} in the Labor field","eventType":"change"},
{"event":"if","condition":"{$ARGS4} == true"},
{"index":10,"event":"click","id":"toolactions_SAVE-tbb_image","comment":"Click the Save Crew toolbar button","eventType":"click"},
{"event":"endif"}
]
}Thanks.
What script are you trying to run? Every script that was provided should be able to be run successfully. Once I know what script you are trying to run I should be able to better help.
Hello @Kristin Fernandes,
When we trying to execute a test script from the Automation Testing Framework we are facing the below issue.
1.We have provided the necessary details in the TpaeTestFramework.properties and GraphiteTestFramework.properties.
2.We are trying to execute the script using TpaeTestDriver/GraphiteTestDriver.
3.We are able to login to the Maximo Application.
4.Then the script is searching for the "mcb5164af_bg_button_addrow-pb" and unable to get the element so we are getting the above error.
NOTE:
It is a provided framework along with the scripts which are recorded by the IBM Interaction recorder which is generating scripts in the JSON format which are being utilized by this framework.
We are trying to rerun the provided scripts to know the complete flow of the provided framework and how exactly the framework works.
The script is trying to create a new Crew Record but unable to create it as the above element is not found in the MAS 8.
We have not created any crew record before.
As information provided in the provided script the script begins with "Clicking on the New Crew icon" of the Crew Application. As we are trying to rerun the script the script is failing at the "Start Center" page or the Home page, it is not even navigating upto the Crew Application present in MAS8.
As this is a provided script we are not sure about this script running successfully before but as we are trying to run it we are not able to run the script.
As per the test case/test script the script begins with "Clicking on the New Crew icon" but as the execution is failing at the "Start Center" page only the test case is not getting started thus no report generated.
ERROR:
java.lang.Exception: No such element: mcb5164af_bg_button_addrow-pb
at framework.selenium.Browser.findElement(Browser.java:316)
at framework.selenium.TpaeBrowser.click(TpaeBrowser.java:213)
at tests.testdriver.TpaeTestDriver.CLICK(TpaeTestDriver.java:425)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
Dec 21, 2023 6:10:17 PM org.asynchttpclient.netty.handler.WebSocketHandler handleException
WARNING: onError
java.net.SocketException: Connection reset
you've provided information about the IBM Maximo Test Automation Framework, emphasizing its use in validating or re-validating Maximo Manage processes and capabilities. Below is a summary and breakdown of the key points:
Framework Purpose:
Contents and Use:
Updates:
Technical Details:
Availability:
Disclaimer:
Support and Reporting:
Download:
If there's a failure such as no such element it's because it isn't available on the screen you're currently on, which you already know. I only see that button click further on in scripts after a crew record is created. Is the crew record created first? Is the entire script before this being run successfully? And lastly, do you have the report generated when the test is run? That would help to see if there is some other problem there.
Thank you!
Vijay Krishna Avvaru:
Regarding being unable to login, can you provide any information as far as error received when logging in, an html report - anything will provide any debug information.
And the error below will happen if an error that it's trying to be found is not found. I'm confused how it's getting here if it's unable to login? Are you running a provided script or a new one that was created?
@Samvid Shivram Based on the files provided, it looks like it's unable to log in? I saw that the system information shows that the framework is being used for Manage 8.7, but it's not supported on that version, it was released for 8.6. The login screens for the two releases are different and the framework will not work on 8.7 unless you modify the framework to support the different screen (there are other differences inside MAS between the two releases as well).
Hello All,
When we trying to execute a test script from the Automation Testing Framework we are facing the above issue.
4.Then the script is searching for the "mcb5164af_bg_button_addrow-pb" and unable to get the element so we are getting the above error.Kindly help someone to resolve this issue (IBM Maximo Automation testing framework 8.10 version) or Any inputs?
Facing issues and unable to run a simple test using Maximo Test Automation Framework Setup. Details in the attached link. Any inputs would be appreciated. Click here for more details
@Morten Moeller There was an update made to the framework to fix this problem that was published on 9/25. Do you have that version of the framework?
@KirstinTrying to get the GraphiteInspector working in the latest release of MTAF.When executing your proposed script from a Graphite app, in MAS loaded in Chrome, I get 'inspector is not a constructor':
javascript: void (function() { window.inspectorBaseUrl = window.inspectorBaseUrl || 'http://localhost/'; var dojoUrl = 'https://ajax.googleapis.com/ajax/libs/dojo/1.10.2/dojo/dojo.js'; var inspectorUrl = window.inspectorBaseUrl + '/GraphiteInspector.js'; console.log("dojo: " + window.dojo); console.log("window.require: " + window.require); if (!window.dojo || !window.require) { var xhttp = new XMLHttpRequest(); var dojoSrc = dojoUrl; console.log(xhttp.readyState.toString()); console.log(xhttp.status.toString()); xhttp.onreadystatechange = function() { if (xhttp.readyState === 4 && xhttp.status === 200) { var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.src = dojoSrc; window.djConfig = {afterOnLoad: true, require: ['dojo.behavior']}; document.getElementsByTagName('head')[0].appendChild(scr); window.setTimeout(function() { window.require([inspectorUrl], function (inspector) { new inspector().startup( false, inspectorUrl); }); }, 500); } }; xhttp.open('GET', dojoSrc, true); xhttp.send(); } else { window.require([inspectorUrl], function (inspector) { new inspector().startup(/*headless*/ false, inspector); }); } })(); VM1067:5 dojo: [object Object] VM1067:6 window.require: function(a,c,b){return La(a,c,b,0,q)} VM1067:31 Uncaught TypeError: inspector is not a constructor at <anonymous>:31:4 at ha (dojo.js.uncompressed.js:1134:35) at dojo.js.uncompressed.js:829:7 at ia (dojo.js.uncompressed.js:1277:5) at La (dojo.js.uncompressed.js:828:6) at q (dojo.js.uncompressed.js:124:11) at <anonymous>:30:12 at <anonymous>:33:3
A similar technique works for the ManageInspector but in your ManageInspector script, 'function (inspector)...' is invoked in the context of a window, and in the GraphiteInspector script it is not.I have run out of ideas.... do you have anyThanks in advance
@Kim Woodbury in the documentation to set up the eclipse project there is a line that states:
Add your database jar files to
Can you assist in where these are located based on a MAS installation in IBM Cloud?
Many Thanks
Steve
Hello I have a couple of question if I may - I have a potential opp at a client who is looking to automate their regression testing going forward on Maximo Mas 8.10 and I am interested in MAS 8.10 Validation for Regulated Industries and the IBM Maximo Test Automation Framework v8.10
Hi Galina.
This framework is for Manage 8.6 only, it is not backwards compatible to other versions of Maximo. We do have a framework available for 7.6.1.x that was released a few years ago (has not been updated since then) that is available at this location: https://community.ibm.com/community/user/asset-facilities/viewdocument/maximo-selenium-automation-framewor?CommunityKey=7f1637b5-e23d-4694-a843-ab9c5b205d49&tab=librarydocuments
Hi Kim.
Is it possible to test Maximo MAS instances which are configured to use SAML SSO?
For example, by using the SAML Enhanced Client or Proxy(ECP) profile?
I would prefer to avoid relying on LDAPS or java crypto/cryptox based authentication.
Thank you very much, Kristin, for your recommendation! Using the Developer's Tool console worked for us, and I was able to start the Recorder and create a test.
However, I can't play it back. We are still on Maximo 7.6.1.3 and won't be moving to Maximo 8 for another year ( waiting for the funding). When I try to run my test back, it opens a new Chrome window, goes to the Maximo URL , provided in the TpaeTestFramework.properties file, but doesn't fill the username and password fields.
TEST 1: Go run the bin file: C:/Loc/MXSeleniumWS/Automation/tests\./testcases/GLDemoTests\GLtest2delete.bin org.openqa.selenium.JavascriptException: javascript error: Cannot read properties of null (reading 'scrollIntoView') (Session info: chrome=113.0.5672.127) Build info: version: '4.9.1', revision: 'eb2032df7f' System info: os.name: 'Windows Server 2019', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.2' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [2fa8d329cfd731dc118da541c1d8b15e, executeScript {script=arguments[0].scrollIntoView();, args=[null]}]
Is it because it's looking for the MAS/Maximo 8 login screens, but it finds Maximo 7.6 login screen instead? Is it possible to use the IBM Selenium framework with Maximo 7.6? Can you advise on which Java classes we need to modify to make it work ?
The only other way to run the recorder without creating a bookmark would be to use the same code that would be used when creating a bookmark and executing it in the Console of Developer Tools in the browser. If you open Developer Tools and go to the Console tab, you should be able to enter it there and see the recorder window open.
As for the Selenium Chrome plugin, that is not compatible with our framework, it is only compatible with Selenium's own framework. The framework we use is custom to Manage/Maximo, which is why we also developed our own recorder so the actions a user performs can be captured while automating scenarios.
Greetings!
Is there other way to run the Recorder? All settings for the browsers are controlled by our organization and it doesn't allow to run Javascript as a bookmark's URL.
However, our organization allows us to install Selenium Chrome plugin. May this plugin be used to runs IBM test scripts or made to work IBM Selenium framework?
Please advise.
Ken - You received a message letting you know that IBM export was performing an export search. Once the search is complete and you are cleared thru export, you will receive an email from DO_NOT_REPLY (IBM Export) letting you know you can now access the website.
Our system is hooked into the corporate Export Verification System (EVS). What happens when a person enters in their IBMid, control is given to EVS. EVS performs an automatic search on the EROid# and then checks the Denied Parties List (DPL). If the auto search fails, then Export puts it in a manual search to try to clear them thru export. The failures typically occurs when there is a very close hit on the DPL. Exports says the search will take about 2 business days for them to complete the search. However, we have been seeing them complete the search in 1 business day or less. ‘Hope that helps. -
Kim, Tried to follow the link you provided and got the attached error message. Is this content 'controlled' in some mannerThought it was perhaps due to my being in Canada, however one of my US based colleagues got a similar error.