Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98369

How i can cut java stacktrace for selenium test?

$
0
0

Same actions for java

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Lol {
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.get("http://suninjuly.github.io/simple_form_find_task.html");
        WebElement button = driver.findElement(By.id("submit"));
    }
}

and python

from selenium import webdriver


driver = webdriver.Firefox()
driver.get("http://suninjuly.github.io/simple_form_find_task.html")
button = driver.find_element_by_id("submit")

but stacktraces are very different it terms of information value:

  • java 35 lines
  • python 14 lines

i didnt paste stacktraces due to security reasons, but you can check blurred screenshots: https://imgur.com/a/hlyJ6AK

java stacktrace even does not fit in macbook 13' screen :c

How i can restrict printing unwanted information except actual trace?


Viewing all articles
Browse latest Browse all 98369

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>