Hi, I am a newbie to Katalon Studio and Katalon Recorder.
I have several scripts in Selenium ide(chrome extension) that I want to migrate to Katalon studio. I use import Selenium IDE scripts in Katalon studio, it generates a new test suite, but it is blank. I could not see the test cases I imported. I tried to “Open a Test Suite” from Katalon Recorder to export the Selenium script to Katalon studio. The above step shows blank test cases in Katalon Recorder as well. I don’t want to start creating automated scripts from scratch as I have quite a number to go through. Any suggestion is appreciated.
Hi @skeerthigha
Can you share the Selenium project ? I tested saving a project in Selenium IDE and importing into Katalon and it seems to work. Can you share the version of the Selenium IDE, the version of Katalon Studio you’re using ?
Continuing the discussion from How to migrate existing Selenium IDE scripts to Katalon studio/katalon Recorder:
I tried to reply to the post and it does not allow me to reply so I am trying this message option instead.
I use Selenium IDE Chrome extension Version 3.17.0 ,Katalon Studio version is 7.8.0 and Katalon Recorder Version is 5.3.21.
Below is shorter version of the code that is used
// Generated by Selenium IDE
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import static org.junit.Assert.;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.core.IsNot.not;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.Dimension;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Alert;
import org.openqa.selenium.Keys;
import java.util.;
import java.net.MalformedURLException;
import java.net.URL;
public class AlphaTagsTest {
private WebDriver driver;
private Map<String, Object> vars;
JavascriptExecutor js;
@Before
public void setUp() throws MalformedURLException {
driver = new RemoteWebDriver(new URL(“http://localhost:4444/wd/hub”), DesiredCapabilities.chrome());
js = (JavascriptExecutor) driver;
vars = new HashMap<String, Object>();
}
@After
public void tearDown() {
driver.quit();
}
@Test
public void alphaTags() {
driver.get(“URL”);
driver.manage().window().setSize(new Dimension(1382, 744));
driver.findElement(By.id(“UserName”)).sendKeys(“User Name”);
driver.findElement(By.id(“Password”)).sendKeys(“password”);
driver.findElement(By.id(“LoginButton”)).click();
driver.findElement(By.linkText(“Create”)).click();
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F3”)).sendKeys(“Desc “);
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F1492”)).sendKeys(“Price”);
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F4”)).sendKeys(”.15”);
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F996”)).sendKeys("");
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F1617”)).sendKeys("");
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F27”)).sendKeys("");
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F89”)).sendKeys("");
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F231”)).sendKeys(“12”);
driver.findElement(By.id(“ctl00_mainContentPlaceHolder_F257”)).sendKeys(“09/03/2020”);
}
}
Many Thanks.
are you able to import? in katalon existing selenium scripts
If you have Katalon Studio, then from the main menu, you should be able to use:
File > ‘Import Selenium IDE Project’
and then choose your file.
When I did it years ago, I had to change some of the “Assert” references to get the test case to work. Maybe it has changed since then and you will have less concerns.