1 package org.apache.archiva.web.test.parent;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 public abstract class AbstractSearchTest
23 extends AbstractArchivaTest
26 public void goToSearchPage()
28 clickLinkWithText( "Search" );
32 public void assertSearchPage()
34 assertPage( "Apache Archiva \\ Quick Search" );
35 assertTextPresent( "Search for" );
36 assertElementPresent( "quickSearch_q" );
37 assertButtonWithValuePresent( "Search" );
38 //assertLinkPresent( "Advanced Search" );
39 assertTextPresent( "Enter your search terms. A variety of data will be searched for your keywords." );
40 //assertButtonWithDivIdPresent( "searchHint" );
43 public void searchForArtifact( String artifactId )
45 if ( !"Apache Archiva \\ Quick Search".equals( getSelenium().getTitle() ) )
47 clickLinkWithText( "Search" );
49 getSelenium().waitForPageToLoad( maxWaitTimeInMs );
51 assertPage( "Apache Archiva \\ Quick Search" );
54 getSelenium().type( "dom=document.forms[1].elements[0]", artifactId );
55 clickButtonWithValue( "Search" );