[ 
https://issues.apache.org/jira/browse/CONNECTORS-1196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14549308#comment-14549308
 ] 

Kishore Kumar commented on CONNECTORS-1196:
-------------------------------------------

Hi,

I am able to convert one of the test class using Selenium with PhantomJS 
driver. This test was carried out for Active Directory connector with success.

{code:title=ConnectorBaseUIPostgresql.java|borderStyle=solid}
  //TODO: Read path from property file.
  private static String PHANTOMJS_BINARY = 
"E:\\MCF\\phantomjs-2.0.0-windows\\bin\\phantomjs.exe";
  protected WebDriver driver = null;
  
  @Before
  public void setupHTMLTester()
    throws Exception
  {
    final DesiredCapabilities capabilities = new DesiredCapabilities();
    // Configure our WebDriver to support JavaScript and be able to find the 
PhantomJS binary
    capabilities.setJavascriptEnabled(true);
    capabilities.setCapability("takesScreenshot", true);
    capabilities.setCapability(
            PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
            PHANTOMJS_BINARY
    );
    driver = new PhantomJSDriver(capabilities);
  }
  
  @After
  public void teardownHTMLTester()
    throws Exception
  {
    if (driver != null)
    {
      driver.quit();
    }
  }
{code}

{code:title=NavigationPostgresql.java|borderStyle=solid}
  @Test
  public void createConnectionsAndJob()
          throws Exception
  {
    driver.navigate().to("http://localhost:8346/mcf-crawler-ui/index.jsp";);

    // Login
    driver.findElement(By.name("userID")).sendKeys("admin");
    driver.findElement(By.name("password")).sendKeys("admin");
    
    driver.findElement(By.xpath("//input[@type='button']")).click();

    // Define an authority connection via the UI
    driver.findElement(By.linkText("List Authority Groups")).click();
    driver.findElement(By.linkText("Add a new authority group")).click();
    
    driver.findElement(By.name("groupname")).sendKeys("MyAuthorityConnection");
    driver.findElement(By.xpath("//input[@value='Save']")).click();
    driver.findElement(By.linkText("List Authority Connections")).click();
    
    driver.findElement(By.linkText("Add a new connection")).click();
    // Fill in a name
    driver.findElement(By.name("connname")).sendKeys("MyAuthorityConnection");
    
    driver.findElement(By.linkText("Type")).click();

    // Select a type
    WebElement select = driver.findElement(By.name("classname"));
    new Select(select).selectByVisibleText("AD authority");
    new 
Select(driver.findElement(By.name("authoritygroup"))).selectByVisibleText("MyAuthorityConnection");
    
    driver.findElement(By.xpath("//input[@alt='Continue to next 
page']")).click();

    // Server tab
    driver.findElement(By.linkText("Domain Controller")).click();
    
driver.findElement(By.name("dcrecord_domaincontrollername")).sendKeys("localhost");
    driver.findElement(By.name("dcrecord_username")).sendKeys("foo");
    
    driver.findElement(By.xpath("//input[@value='Add to End']")).click();

    driver.findElement(By.linkText("Name")).click();
    
    driver.findElement(By.xpath("//input[@alt='Save this authority 
connection']")).click();
    
    driver.findElement(By.linkText("List Authority Connections")).click();
    driver.findElement(By.xpath("//a[@alt='Delete 
MyAuthorityConnection']")).click();    
  }
{code}

This need to be further optimized by placing the recurring code in base classes.

> Proposal to update Manifold Crawler UI
> --------------------------------------
>
>                 Key: CONNECTORS-1196
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-1196
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Framework core
>    Affects Versions: ManifoldCF next
>            Reporter: Kishore Kumar
>            Assignee: Kishore Kumar
>         Attachments: Bandwidth Report.png, Index.jsp.png, List 
> Repository.png, Report.png, View.png
>
>
> Hi,
> I have been working on a new User Interface for ManifoldCF.
> This UI is based on Bootstrap, jQuery and some other opensource scripts.
> Only the index.jsp will be loaded once and other page are rendered using AJAX 
> call, making it more responsive and modern.
> Please find the attached screenshots.
> *Backward compatibility:*
> Since most of our tab comes from connectors, those tabs will be displayed as 
> it is with no immediate attention required. (see sample screenshot attached)
> *What next?*
> In future we can add Charts to our reports where ever applicable, so that it 
> will be more user friendly & informative for end users.
> Can make use of Web socket to notify exception or error to users as 
> Notifications.
> *Browser compatibility*
> Has been tested with most latest browser and IE10, will try to add support 
> for IE8 with acceptable degradation.
> Any suggestion, concern much appreciated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to