public static void main()

in marmotinni/java/src/org/apache/royale/html/staticControls/textButton/TextButton.java [35:76]


    public static void main(String[] args)
    {
        WebDriver driver = new FirefoxDriver();

        Map<String, String> argsMap = new HashMap<String, String>();
        for (String arg : args)
        {
            String[] keyValuePair = arg.split("=");
            argsMap.put(keyValuePair[0], keyValuePair[1]);
        }
        
        final String url = argsMap.get("url");
        
        driver.get(url);

        WebElement element = driver.findElement(By.tagName("button"));

        try
        {
            // there is a button in the DOM
            if (element != null)
            {
                // the button x position is 100
                if (element.getCssValue("left").equals("100px"))
                    System.out.println(SUCCESS);
                else
                    System.out.println(FAILED);
            }
            else
            {
                System.out.println(FAILED);
            }
        }
        catch (Exception e)
        {
            System.out.println(e.getMessage());
        }
        finally
        {
            driver.quit();
        }
    }