Ghost inspector provides a few different import and export options when it comes to your test data:
Table of Contents
Importing Ghost Inspector JSON Tests
_id. The Ghost Inspector JSON import feature accepts the Ghost Inspector test export format.
To import at test, navigate to your suite within the application and select More > Import a Test in Ghost Inspector Format (.json):
The import process should take no more than a few seconds. Once complete, you’ll be redirected to the test editor screen showing the steps of your imported test. Here you can review the imported steps and make any necessary adjustments. Use the “Save” button to save the test after review. You will be returned to the test’s main screen where you can then run the test.
Ghost Inspector format JSON tests can also be imported via the API.
Importing Selenium HTML Tests
Ghost Inspector also allows you to import single tests in Selenium IDE’s HTML format. This is done from the suite screen (so you must have or create a suite first). Under the More menu, choose the Import a Test in Selenium Format (.html) option. This will present you with a file selection box for choosing the local .html file on your machine.
This import process will also take you to the test editor where you can make adjustments to the test before saving.
Selenium v1 Command Compatibility
waitForElementPresentare not necessary with Ghost Inspector, because these are applied automatically between each step.
Ghost Inspector supports both CSS and XPath selector methods. The following selector values are supported.
css= xpath= id= name= type= link=
Ghost Inspector supports the vast majority of commonly used commands available in the Selenium HTML format. Below is a complete list of supported commands. (Note that the
*AndWait versions of all these commands are also supported.)
captureEntirePageScreenshot click contextMenu doubleClick dragAndDropToObject keyPress mouseDown open openWindow pause refresh runScript select sendKeys store storeEval type
assertElementNotPresent assertElementPresent assertEval assertLocation assertNotLocation assertNotText assertNotTitle assertText assertTextNotPresent assertTextPresent assertTitle
verifyElementNotPresent verifyElementPresent verifyEval verifyLocation verifyNotLocation verifyNotText verifyNotTitle verifyText verifyTextNotPresent verifyTextPresent verifyTitle
Selenium HTML format tests can also be imported via our API.
Exporting Tests and Suites
Ghost Inspector has the ability to export tests into several formats. Here is a breakdown of the different options and their features:
|Ghost Inspector Format||
|Selenium IDE v3||
|Selenium IDE v1||
To download a suite or a test navigate to the suite or test in our system and click on More > Export this Suite/Test. You will be prompted with a dialog that will allow you to select the format to download the test(s) in. Note that if you are downloading a suite you will be provided with a
.zip file containing the tests. If you are downloading a single file, you will receive the file in the specified format.