Selenium IDE and WebDriver

0

I have started a project of unit tests of a web. For this I have decided to use Selenium, but I have had a series of doubts and problems.

Selenium IDE and the WebDriver are on the web, this second one seems to be a little abandoned, and gives problems with the most modern versions of the browsers, while the IDE leaves the programming aside, and it seems that in the latest versions of the IDE there is no way to get the code it generates.

I would like to know if someone knows a better tool, or knows how to get the code in JAVA from the files generated by Selenium IDE.

    
asked by Jorege 26.10.2018 в 08:53
source

1 answer

0

Something similar happened to me, but I managed to generate the code using Katalon Recorder (Selenium IDE for Chrome) . Once having the code lower the geckoDriver and paste it in a folder in C:

Then in the class that generates Katalon Recorder I did this:

@Before
  public void setUp() throws Exception {
    System.setProperty("webdriver.gecko.driver", "C:/geckoDriver/geckodriver.exe");
    DesiredCapabilities capabilities = DesiredCapabilities.firefox();
    capabilities.setCapability("marionette", true); 
    driver = new FirefoxDriver();
    //driver = new ChromeDriver();
    baseUrl = "https://www.google.com/";
    Dimension initial_size = driver.manage().window().getSize();
    height = initial_size.getHeight();
    width = initial_size.getWidth();
    System.out.println(height+ ","+width);

    driver.manage().window().maximize();
    initial_size = driver.manage().window().getSize();
    height = initial_size.getHeight();
    width = initial_size.getWidth();
    System.out.println(height+ ","+width);

    driver.manage().window().setSize(new Dimension(width, height-175));

    //driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
  }

The rest is to add the necessary jars, and use the rest of the code generated by Katalon Recorder in the method

@Test
  public void testMonitoreo() throws Exception {
    
answered by 26.10.2018 / 17:25
source