Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalatest

    ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

    ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

    Definition Classes
    org
  • package selenium
    Definition Classes
    scalatest
  • trait WebBrowser extends AnyRef

    Trait that provides a domain specific language (DSL) for writing browser-based tests using Selenium.

    Trait that provides a domain specific language (DSL) for writing browser-based tests using Selenium.

    To use ScalaTest's Selenium DSL, mix trait WebBrowser into your test class. This trait provides the DSL in its entirety except for one missing piece: an implicit org.openqa.selenium.WebDriver. One way to provide the missing implicit driver is to declare one as a member of your test class, like this:

    import org.scalatest._
    import selenium._
    import org.openqa.selenium._
    import htmlunit._
    
    class BlogSpec extends FlatSpec with Matchers with WebBrowser {
    
      implicit val webDriver: WebDriver = new HtmlUnitDriver
    
      val host = "http://localhost:9000/"
    
      "The blog app home page" should "have the correct title" in {
        go to (host + "index.html")
        pageTitle should be ("Awesome Blog")
      }
    }
    

    For convenience, however, ScalaTest provides a WebBrowser subtrait containing an implicit WebDriver for each driver provided by Selenium. Thus a simpler way to use the HtmlUnit driver, for example, is to extend ScalaTest's HtmlUnit trait, like this:

    import org.scalatest._
    import selenium._
    
    class BlogSpec extends FlatSpec with Matchers with HtmlUnit {
    
      val host = "http://localhost:9000/"
    
      "The blog app home page" should "have the correct title" in {
        go to (host + "index.html")
        pageTitle should be ("Awesome Blog")
      }
    }
    

    The web driver traits provided by ScalaTest are:

    DriverWebBrowser subtrait
    Google Chrome Chrome
    Mozilla Firefox Firefox
    HtmlUnit HtmlUnit
    Microsoft Internet Explorer InternetExplorer
    Apple Safari Safari

    Navigation

    You can ask the browser to retrieve a page (go to a URL) like this:

    go to "http://www.artima.com"
    

    Note: If you are using the page object pattern, you can also go to a page using the Page instance, as illustrated in the section on page objects below.

    Once you have retrieved a page, you can fill in and submit forms, query for the values of page elements, and make assertions. In the following example, selenium will go to http://www.google.com, fill in the text box with Cheese!, press the submit button, and wait for result returned from an AJAX call:

    go to "http://www.google.com"
    click on "q"
    enter("Cheese!")
    submit()
    // Google's search is rendered dynamically with JavaScript.
    eventually { pageTitle should be ("Cheese! - Google Search") }
    

    In the above example, the "q" used in “click on "q"” can be either the id or name of an element. ScalaTest's Selenium DSL will try to lookup by id first. If it cannot find any element with an id equal to "q", it will then try lookup by name "q".

    Alternatively, you can be more specific:

    click on id("q")   // to lookup by id "q" 
    click on name("q") // to lookup by name "q" 
    

    In addition to id and name, you can use the following approaches to lookup elements, just as you can do with Selenium's org.openqa.selenium.By class:

    • xpath
    • className
    • cssSelector
    • linkText
    • partialLinkText
    • tagName

    For example, you can select by link text with:

    click on linkText("click here!")
    

    If an element is not found via any form of lookup, evaluation will complete abruptly with a TestFailedException.

    Getting and setting input element values

    ScalaTest's Selenium DSL provides a clear, simple syntax for accessing and updating the values of input elements such as text fields, radio buttons, checkboxes, selection lists, and the input types introduced in HTML5. If a requested element is not found, or if it is found but is not of the requested type, an exception will immediately result causing the test to fail.

    The most common way to access field value is through the value property, which is supported by the following input types:

    Tag Name Input Type Lookup Method
    input text textField
    textarea - textArea
    input password pwdField
    input email emailField
    input color colorField
    input date dateField
    input datetime dateTimeField
    input datetime-local dateTimeLocalField
    input month monthField
    input number numberField
    input range rangeField
    input search searchField
    input tel telField
    input time timeField
    input url urlField
    input week weekField

    You can change a input field's value by assigning it via the = operator, like this:

    textField("q").value = "Cheese!"
    

    And you can access a input field's value by simply invoking value on it:

    textField("q").value should be ("Cheese!")
    

    If the text field is empty, value will return an empty string ("").

    You can use the same syntax with other type of input fields by replacing textField with Lookup Method listed in table above, for example to use text area:

    textArea("body").value = "I saw something cool today!"
    textArea("body").value should be ("I saw something cool today!")
    

    or with a password field:

    pwdField("secret").value = "Don't tell anybody!"
    pwdField("secret").value should be ("Don't tell anybody!")
    

    Alternate Way for Data Entry

    An alternate way to enter data into a input fields is to use enter or pressKeys. Although both of enter and pressKeys send characters to the active element, pressKeys can be used on any kind of element, whereas enter can only be used on text entry fields, which include:

    • textField
    • textArea
    • pwdField
    • emailField
    • searchField
    • telField
    • urlField

    Another difference is that enter will clear the text field or area before sending the characters, effectively replacing any currently existing text with the new text passed to enter. By contrast, pressKeys does not do any clearing—it just appends more characters to any existing text. You can backup with pressKeys, however, by sending explicit backspace characters, "\u0008".

    To use these commands, you must first click on the input field you are interested in to give it the focus. Here's an example:

    click on "q"
    enter("Cheese!")
    

    Here's a (contrived) example of using pressKeys with backspace to fix a typo:

    click on "q"              // q is the name or id of a text field or text area
    enter("Cheesey!")         // Oops, meant to say Cheese!
    pressKeys("\u0008\u0008") // Send two backspaces; now the value is Cheese
    pressKeys("!")            // Send the missing exclamation point; now the value is Cheese!
    

    Radio buttons

    Radio buttons work together in groups. For example, you could have a group of radio buttons, like this:

    <input type="radio" id="opt1" name="group1" value="Option 1"> Option 1</input>
    <input type="radio" id="opt2" name="group1" value="Option 2"> Option 2</input>
    <input type="radio" id="opt3" name="group1" value="Option 3"> Option 3</input>
    

    You can select an option in either of two ways:

    radioButtonGroup("group1").value = "Option 2"
    radioButtonGroup("group1").selection = Some("Option 2")
    

    Likewise, you can read the currently selected value of a group of radio buttons in two ways:

    radioButtonGroup("group1").value should be ("Option 2")
    radioButtonGroup("group1").selection should be (Some("Option 2"))
    

    If the radio button has no selection at all, selection will return None whereas value will throw a TestFailedException. By using value, you are indicating you expect a selection, and if there isn't a selection that should result in a failed test.

    If you would like to work with RadioButton element directly, you can select it by calling radioButton:

    click on radioButton("opt1")
    

    you can check if an option is selected by calling isSelected:

    radioButton("opt1").isSelected should be (true)
    

    to get the value of radio button, you can call value:

    radioButton("opt1").value should be ("Option 1")
    

    Checkboxes

    A checkbox in one of two states: selected or cleared. Here's how you select a checkbox:

    checkbox("cbx1").select()
    

    And here's how you'd clear one:

    checkbox("cbx1").clear()
    

    You can access the current state of a checkbox with isSelected:

    checkbox("cbx1").isSelected should be (true)
    

    Single-selection dropdown lists

    Given the following single-selection dropdown list:

    <select id="select1">
     <option value="option1">Option 1</option>
     <option value="option2">Option 2</option>
     <option value="option3">Option 3</option>
    </select>
    

    You could select Option 2 in either of two ways:

    singleSel("select1").value = "option2"
    singleSel("select1").selection = Some("option2")
    

    To clear the selection, either invoke clear or set selection to None:

    singleSel("select1").clear()
    singleSel("select1").selection = None
    

    You can read the currently selected value of a single-selection list in the same manner as radio buttons:

    singleSel("select1").value should be ("option2")
    singleSel("select1").selection should be (Some("option2"))
    

    If the single-selection list has no selection at all, selection will return None whereas value will throw a TestFailedException. By using value, you are indicating you expect a selection, and if there isn't a selection that should result in a failed test.

    Multiple-selection lists

    Given the following multiple-selection list:

    <select name="select2" multiple="multiple">
     <option value="option4">Option 4</option>
     <option value="option5">Option 5</option>
     <option value="option6">Option 6</option>
    </select>
    

    You could select Option 5 and Option 6 like this:

    multiSel("select2").values = Seq("option5", "option6")
    

    The previous command would essentially clear all selections first, then select Option 5 and Option 6. If instead you want to not clear any existing selection, just additionally select Option 5 and Option 6, you can use the += operator, like this.

    multiSel("select2").values += "option5"
    multiSel("select2").values += "option6"
    

    To clear a specific option, pass its name to clear:

    multiSel("select2").clear("option5")
    

    To clear all selections, call clearAll:

    multiSel("select2").clearAll()
    

    You can access the current selections with values, which returns an immutable IndexedSeq[String]:

    multiSel("select2").values should have size 2
    multiSel("select2").values(0) should be ("option5")
    multiSel("select2").values(1) should be ("option6")
    

    Clicking and submitting

    You can click on any element with “click on” as shown previously:

    click on "aButton"
    click on name("aTextField")
    

    If the requested element is not found, click on will throw an exception, failing the test.

    Clicking on a input element will give it the focus. If current focus is in on an input element within a form, you can submit the form by calling submit:

    submit()
    

    Switching

    You can switch to a popup alert bo using the following code:

    switch to alertBox
    

    to switch to a frame, you could:

    switch to frame(0) // switch by index
    switch to frame("name") // switch by name
    

    If you have reference to a window handle (can be obtained from calling windowHandle/windowHandles), you can switch to a particular window by:

    switch to window(windowHandle)
    

    You can also switch to active element and default content:

    switch to activeElement
    switch to defaultContent
    

    Navigation history

    In real web browser, you can press the 'Back' button to go back to previous page. To emulate that action in your test, you can call goBack:

    goBack()
    

    To emulate the 'Forward' button, you can call:

    goForward()
    

    And to refresh or reload the current page, you can call:

    reloadPage()
    

    Cookies!

    To create a new cookie, you'll say:

    add cookie ("cookie_name", "cookie_value")
    

    to read a cookie value, you do:

    cookie("cookie_name").value should be ("cookie_value") // If value is undefined, throws TFE right then and there. Never returns null.
    

    In addition to the common use of name-value cookie, you can pass these extra fields when creating the cookie, available ways are:

    cookie(name: String, value: String)
    cookie(name: String, value: String, path: String)
    cookie(name: String, value: String, path: String, expiry: Date)
    cookie(name: String, value: String, path: String, expiry: Date, domain: String)
    cookie(name: String, value: String, path: String, expiry: Date, domain: String, secure: Boolean)
    

    and to read those extra fields:

    cookie("cookie_name").value   // Read cookie's value
    cookie("cookie_name").path    // Read cookie's path
    cookie("cookie_name").expiry  // Read cookie's expiry
    cookie("cookie_name").domain  // Read cookie's domain
    cookie("cookie_name").isSecure  // Read cookie's isSecure flag
    

    In order to delete a cookie, you could use the following code:

    delete cookie "cookie_name"
    

    or to delete all cookies in the same domain:-

    delete all cookies
    

    To get the underlying Selenium cookie, you can use underlying:

    cookie("cookie_name").underlying.validate()  // call the validate() method on underlying Selenium cookie
    

    Other useful element properties

    All element types (textField, textArea, radioButton, checkbox, singleSel, multiSel) support the following useful properties:

    MethodDescription
    location The XY location of the top-left corner of this Element.
    size The width/height size of this Element.
    isDisplayed Indicates whether this Element is displayed.
    isEnabled Indicates whether this Element is enabled.
    isSelected Indicates whether this Element is selected.
    tagName The tag name of this element.
    underlying The underlying WebElement wrapped by this Element.
    attribute(name: String) The attribute value of the given attribute name of this element, wrapped in a Some, or None if no such attribute exists on this Element.
    text Returns the visible (i.e., not hidden by CSS) text of this element, including sub-elements, without any leading or trailing whitespace.

    Implicit wait

    To set Selenium's implicit wait timeout, you can call the implicitlyWait method:

    implicitlyWait(Span(10, Seconds))
    

    Invoking this method sets the amount of time the driver will wait when searching for an element that is not immediately present. For more information, see the documentation for method implicitlyWait.

    Page source and current URL

    It is possible to get the html source of currently loaded page, using:

    pageSource
    

    and if needed, get the current URL of currently loaded page:

    currentUrl
    

    Screen capture

    You can capture screen using the following code:

    val file = capture
    

    By default, the captured image file will be saved in temporary folder (returned by java.io.tmpdir property), with random file name ends with .png extension. You can specify a fixed file name:

    capture to "MyScreenShot.png"
    

    or

    capture to "MyScreenShot"
    

    Both will result in a same file name MyScreenShot.png.

    You can also change the target folder screenshot file is written to, by saying:

    setCaptureDir("/home/your_name/screenshots")
    

    If you want to capture a screenshot when something goes wrong (e.g. test failed), you can use withScreenshot:

    withScreenshot {
      assert("Gold" == "Silver", "Expected gold, but got silver")
    }
    

    In case the test code fails, you'll see the screenshot location appended to the error message, for example:

    Expected gold but got silver; screenshot capture in /tmp/AbCdEfGhIj.png
    

    Using the page object pattern

    If you use the page object pattern, mixing trait Page into your page classes will allow you to use the go to syntax with your page objects. Here's an example:

    class HomePage extends Page {
      val url = "http://localhost:9000/index.html"
    }
    
    val homePage = new HomePage
    go to homePage
    

    Executing JavaScript

    To execute arbitrary JavaScript, for example, to test some JavaScript functions on your page, pass it to executeScript:

    go to (host + "index.html")
    val result1 = executeScript("return document.title;")
    result1 should be ("Test Title")
    val result2 = executeScript("return 'Hello ' + arguments[0]", "ScalaTest")
    result2 should be ("Hello ScalaTest")
    

    To execute an asynchronous bit of JavaScript, pass it to executeAsyncScript. You can set the script timeout with setScriptTimeout:

    val script = """
      var callback = arguments[arguments.length - 1];
      window.setTimeout(function() {callback('Hello ScalaTest')}, 500);
    """
    setScriptTimeout(1 second)
    val result = executeAsyncScript(script)
    result should be ("Hello ScalaTest")
    

    Querying for elements

    You can query for arbitrary elements via find and findAll. The find method returns the first matching element, wrapped in a Some, or None if no element is found. The findAll method returns an immutable IndexedSeq of all matching elements. If no elements match the query, findAll returns an empty IndexedSeq. These methods allow you to perform rich queries using for expressions. Here are some examples:

    val ele: Option[Element] = find("q")
    
    val eles: colection.immutable.IndexedSeq[Element] = findAll(className("small"))
    for (e <- eles; if e.tagName != "input")
      e should be ('displayed)
    val textFields = eles filter { tf.isInstanceOf[TextField] }
    

    Cleaning up

    To close the current browser window, and exit the driver if the current window was the only one remaining, use close:

    close()
    

    To close all windows, and exit the driver, use quit:

    quit()
    

    Alternate forms

    Although statements like “delete all cookies” fit well with matcher statements like “title should be ("Cheese!")”, they do not fit as well with the simple method call form of assertions. If you prefer, you can avoid operator notation and instead use alternatives that take the form of plain-old method calls. Here's an example:

    goTo("http://www.google.com")
    clickOn("q")
    textField("q").value = "Cheese!"
    submit()
    // Google's search is rendered dynamically with JavaScript.
    eventually(assert(pageTitle === "Cheese! - Google Search"))
    

    Here's a table showing the complete list of alternatives:

    operator notationmethod call
    go to (host + "index.html") goTo(host + "index.html")
    click on "aButton" clickOn("aButton")
    switch to activeElement switchTo(activeElement)
    add cookie ("cookie_name", "cookie_value") addCookie("cookie_name", "cookie_value")
    delete cookie "cookie_name" deleteCookie("cookie_name")
    delete all cookies deleteAllCookies()
    capture to "MyScreenShot" captureTo("MyScreenShot")

    Definition Classes
    selenium
  • ActiveElementTarget
  • AlertTarget
  • Checkbox
  • ClassNameQuery
  • ColorField
  • CookiesNoun
  • CssSelectorQuery
  • DateField
  • DateTimeField
  • DateTimeLocalField
  • DefaultContentTarget
  • Dimension
  • Element
  • EmailField
  • FrameElementTarget
  • FrameIndexTarget
  • FrameNameOrIdTarget
  • FrameWebElementTarget
  • IdQuery
  • LinkTextQuery
  • MonthField
  • MultiSel
  • MultiSelOptionSeq
  • NameQuery
  • NumberField
  • PartialLinkTextQuery
  • PasswordField
  • Point
  • Query
  • RadioButton
  • RadioButtonGroup
  • RangeField
  • SearchField
  • SingleSel
  • SwitchTarget
  • TagNameQuery
  • TelField
  • TextArea
  • TextField
  • TimeField
  • UrlField
  • ValueElement
  • WeekField
  • WindowTarget
  • WrappedCookie
  • XPathQuery
  • add
  • capture
  • click
  • delete
  • go
  • switch
c

org.scalatest.selenium.WebBrowser

MultiSelOptionSeq

class MultiSelOptionSeq extends IndexedSeq[String]

This class is part of ScalaTest's Selenium DSL. Please see the documentation for WebBrowser for an overview of the Selenium DSL.

This class enables syntax such as the following:

multiSel("select2").values += "option5"
                           ^

Instances of this class are returned from the values method of MultiSel. MultiSelOptionSeq is an immutable IndexedSeq[String] that wraps an underlying immutable IndexedSeq[String] and adds two methods, + and -, to facilitate the += syntax for setting additional options of the MultiSel. The Scala compiler will rewrite:

multiSel("select2").values += "option5"

To:

multiSel("select2").values = multiSel("select2").values + "option5"

Thus, first a new MultiSelOptionSeq is created by invoking the + method on the MultiSelOptionSeq returned by values, and that result is passed to the values_= method.

For symmetry, this class also offers a - method, which can be used to deselect an option, like this:

multiSel("select2").values -= "option5"
                           ^

Source
WebBrowser.scala
Linear Supertypes
IndexedSeq[String], IndexedSeq[String], IndexedSeqLike[String, IndexedSeq[String]], Seq[String], Seq[String], SeqLike[String, IndexedSeq[String]], GenSeq[String], GenSeqLike[String, IndexedSeq[String]], PartialFunction[Int, String], (Int) ⇒ String, Iterable[String], Iterable[String], IterableLike[String, IndexedSeq[String]], Equals, GenIterable[String], GenIterableLike[String, IndexedSeq[String]], Traversable[String], Immutable, Traversable[String], GenTraversable[String], GenericTraversableTemplate[String, IndexedSeq], TraversableLike[String, IndexedSeq[String]], GenTraversableLike[String, IndexedSeq[String]], Parallelizable[String, ParSeq[String]], TraversableOnce[String], GenTraversableOnce[String], FilterMonadic[String, IndexedSeq[String]], HasNewBuilder[String, scala.collection.immutable.IndexedSeq[String] @scala.annotation.unchecked.uncheckedVariance], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MultiSelOptionSeq
  2. IndexedSeq
  3. IndexedSeq
  4. IndexedSeqLike
  5. Seq
  6. Seq
  7. SeqLike
  8. GenSeq
  9. GenSeqLike
  10. PartialFunction
  11. Function1
  12. Iterable
  13. Iterable
  14. IterableLike
  15. Equals
  16. GenIterable
  17. GenIterableLike
  18. Traversable
  19. Immutable
  20. Traversable
  21. GenTraversable
  22. GenericTraversableTemplate
  23. TraversableLike
  24. GenTraversableLike
  25. Parallelizable
  26. TraversableOnce
  27. GenTraversableOnce
  28. FilterMonadic
  29. HasNewBuilder
  30. AnyRef
  31. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MultiSelOptionSeq(underlying: IndexedSeq[String])

Type Members

  1. class Elements extends AbstractIterator[A] with BufferedIterator[A] with Serializable
    Attributes
    protected
    Definition Classes
    IndexedSeqLike
    Annotations
    @SerialVersionUID()
  2. type Self = IndexedSeq[String]
    Attributes
    protected[this]
    Definition Classes
    TraversableLike
  3. class WithFilter extends FilterMonadic[A, Repr]
    Definition Classes
    TraversableLike

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(value: String): MultiSelOptionSeq

    Appends a string element to this sequence, if it doesn't already exist in the sequence.

    Appends a string element to this sequence, if it doesn't already exist in the sequence.

    If the string element already exists in this sequence, this method returns itself. If not, this method returns a new MultiSelOptionSeq with the passed value appended to the end of the original MultiSelOptionSeq.

    returns

    a MultiSelOptionSeq that contains the passed string value

  4. def ++[B >: String, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  5. def ++:[B >: String, That](that: Traversable[B])(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike
  6. def ++:[B >: String, That](that: TraversableOnce[B])(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike
  7. def +:[B >: String, That](elem: B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  8. def -(value: String): MultiSelOptionSeq

    Removes a string element to this sequence, if it already exists in the sequence.

    Removes a string element to this sequence, if it already exists in the sequence.

    If the string element does not already exist in this sequence, this method returns itself. If the element is contained in this sequence, this method returns a new MultiSelOptionSeq with the passed value removed from the the original MultiSelOptionSeq, leaving any other elements in the same order.

    returns

    a MultiSelOptionSeq that contains the passed string value

  9. def /:[B](z: B)(op: (B, String) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  10. def :+[B >: String, That](elem: B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  11. def :\[B](z: B)(op: (String, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  12. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def addString(b: StringBuilder): StringBuilder
    Definition Classes
    TraversableOnce
  14. def addString(b: StringBuilder, sep: String): StringBuilder
    Definition Classes
    TraversableOnce
  15. def addString(b: StringBuilder, start: String, sep: String, end: String): StringBuilder
    Definition Classes
    TraversableOnce
  16. def aggregate[B](z: ⇒ B)(seqop: (B, String) ⇒ B, combop: (B, B) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  17. def andThen[C](k: (String) ⇒ C): PartialFunction[Int, C]
    Definition Classes
    PartialFunction → Function1
  18. def apply(idx: Int): String

    Selects an element by its index in the sequence.

    Selects an element by its index in the sequence.

    This method invokes apply on the underlying immutable IndexedSeq[String], passing in idx, and returns the result.

    idx

    the index to select

    returns

    the element of this sequence at index idx, where 0 indicates the first element

    Definition Classes
    MultiSelOptionSeq → SeqLike → GenSeqLike → Function1
  19. def applyOrElse[A1 <: Int, B1 >: String](x: A1, default: (A1) ⇒ B1): B1
    Definition Classes
    PartialFunction
  20. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  21. def canEqual(that: Any): Boolean
    Definition Classes
    IterableLike → Equals
  22. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. def collect[B, That](pf: PartialFunction[String, B])(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  24. def collectFirst[B](pf: PartialFunction[String, B]): Option[B]
    Definition Classes
    TraversableOnce
  25. def combinations(n: Int): Iterator[IndexedSeq[String]]
    Definition Classes
    SeqLike
  26. def companion: GenericCompanion[IndexedSeq]
    Definition Classes
    IndexedSeq → IndexedSeq → Seq → Seq → GenSeq → Iterable → Iterable → GenIterable → Traversable → Traversable → GenTraversable → GenericTraversableTemplate
  27. def compose[A](g: (A) ⇒ Int): (A) ⇒ String
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  28. def contains[A1 >: String](elem: A1): Boolean
    Definition Classes
    SeqLike
  29. def containsSlice[B](that: GenSeq[B]): Boolean
    Definition Classes
    SeqLike
  30. def copyToArray[B >: String](xs: Array[B], start: Int, len: Int): Unit
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  31. def copyToArray[B >: String](xs: Array[B]): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  32. def copyToArray[B >: String](xs: Array[B], start: Int): Unit
    Definition Classes
    TraversableOnce → GenTraversableOnce
  33. def copyToBuffer[B >: String](dest: Buffer[B]): Unit
    Definition Classes
    TraversableOnce
  34. def corresponds[B](that: GenSeq[B])(p: (String, B) ⇒ Boolean): Boolean
    Definition Classes
    SeqLike → GenSeqLike
  35. def count(p: (String) ⇒ Boolean): Int
    Definition Classes
    TraversableOnce → GenTraversableOnce
  36. def diff[B >: String](that: GenSeq[B]): IndexedSeq[String]
    Definition Classes
    SeqLike → GenSeqLike
  37. def distinct: IndexedSeq[String]
    Definition Classes
    SeqLike → GenSeqLike
  38. def drop(n: Int): IndexedSeq[String]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  39. def dropRight(n: Int): IndexedSeq[String]
    Definition Classes
    IterableLike
  40. def dropWhile(p: (String) ⇒ Boolean): IndexedSeq[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  41. def endsWith[B](that: GenSeq[B]): Boolean
    Definition Classes
    SeqLike → GenSeqLike
  42. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. def equals(that: Any): Boolean
    Definition Classes
    GenSeqLike → Equals → Any
  44. def exists(p: (String) ⇒ Boolean): Boolean
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  45. def filter(p: (String) ⇒ Boolean): IndexedSeq[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  46. def filterNot(p: (String) ⇒ Boolean): IndexedSeq[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  47. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  48. def find(p: (String) ⇒ Boolean): Option[String]
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  49. def flatMap[B, That](f: (String) ⇒ GenTraversableOnce[B])(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  50. def flatten[B](implicit asTraversable: (String) ⇒ GenTraversableOnce[B]): IndexedSeq[B]
    Definition Classes
    GenericTraversableTemplate
  51. def fold[A1 >: String](z: A1)(op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  52. def foldLeft[B](z: B)(op: (B, String) ⇒ B): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  53. def foldRight[B](z: B)(op: (String, B) ⇒ B): B
    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  54. def forall(p: (String) ⇒ Boolean): Boolean
    Definition Classes
    IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  55. def foreach[U](f: (String) ⇒ U): Unit
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike → TraversableOnce → GenTraversableOnce → FilterMonadic
  56. def genericBuilder[B]: Builder[B, IndexedSeq[B]]
    Definition Classes
    GenericTraversableTemplate
  57. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  58. def groupBy[K](f: (String) ⇒ K): Map[K, IndexedSeq[String]]
    Definition Classes
    TraversableLike → GenTraversableLike
  59. def grouped(size: Int): Iterator[IndexedSeq[String]]
    Definition Classes
    IterableLike
  60. def hasDefiniteSize: Boolean
    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  61. def hashCode(): Int
    Definition Classes
    IndexedSeqLike → GenSeqLike → Any
  62. def head: String
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  63. def headOption: Option[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  64. def indexOf[B >: String](elem: B, from: Int): Int
    Definition Classes
    GenSeqLike
  65. def indexOf[B >: String](elem: B): Int
    Definition Classes
    GenSeqLike
  66. def indexOfSlice[B >: String](that: GenSeq[B], from: Int): Int
    Definition Classes
    SeqLike
  67. def indexOfSlice[B >: String](that: GenSeq[B]): Int
    Definition Classes
    SeqLike
  68. def indexWhere(p: (String) ⇒ Boolean, from: Int): Int
    Definition Classes
    SeqLike → GenSeqLike
  69. def indexWhere(p: (String) ⇒ Boolean): Int
    Definition Classes
    GenSeqLike
  70. def indices: Range
    Definition Classes
    SeqLike
  71. def init: IndexedSeq[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  72. def inits: Iterator[IndexedSeq[String]]
    Definition Classes
    TraversableLike
  73. def intersect[B >: String](that: GenSeq[B]): IndexedSeq[String]
    Definition Classes
    SeqLike → GenSeqLike
  74. def isDefinedAt(idx: Int): Boolean
    Definition Classes
    GenSeqLike
  75. def isEmpty: Boolean
    Definition Classes
    SeqLike → IterableLike → TraversableLike → TraversableOnce → GenTraversableOnce
  76. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  77. final def isTraversableAgain: Boolean
    Definition Classes
    TraversableLike → GenTraversableLike → GenTraversableOnce
  78. def iterator: Iterator[String]
    Definition Classes
    IndexedSeqLike → IterableLike → GenIterableLike
  79. def last: String
    Definition Classes
    TraversableLike → GenTraversableLike
  80. def lastIndexOf[B >: String](elem: B, end: Int): Int
    Definition Classes
    GenSeqLike
  81. def lastIndexOf[B >: String](elem: B): Int
    Definition Classes
    GenSeqLike
  82. def lastIndexOfSlice[B >: String](that: GenSeq[B], end: Int): Int
    Definition Classes
    SeqLike
  83. def lastIndexOfSlice[B >: String](that: GenSeq[B]): Int
    Definition Classes
    SeqLike
  84. def lastIndexWhere(p: (String) ⇒ Boolean, end: Int): Int
    Definition Classes
    SeqLike → GenSeqLike
  85. def lastIndexWhere(p: (String) ⇒ Boolean): Int
    Definition Classes
    GenSeqLike
  86. def lastOption: Option[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  87. def length: Int

    The length of this sequence.

    The length of this sequence.

    This method invokes length on the underlying immutable IndexedSeq[String] and returns the result.

    returns

    the number of elements in this sequence

    Definition Classes
    MultiSelOptionSeq → SeqLike → GenSeqLike
  88. def lengthCompare(len: Int): Int
    Definition Classes
    SeqLike
  89. def lift: (Int) ⇒ Option[String]
    Definition Classes
    PartialFunction
  90. def map[B, That](f: (String) ⇒ B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike → FilterMonadic
  91. def max[B >: String](implicit cmp: Ordering[B]): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  92. def maxBy[B](f: (String) ⇒ B)(implicit cmp: Ordering[B]): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  93. def min[B >: String](implicit cmp: Ordering[B]): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  94. def minBy[B](f: (String) ⇒ B)(implicit cmp: Ordering[B]): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  95. def mkString: String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  96. def mkString(sep: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  97. def mkString(start: String, sep: String, end: String): String
    Definition Classes
    TraversableOnce → GenTraversableOnce
  98. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  99. def newBuilder: Builder[String, IndexedSeq[String]]
    Attributes
    protected[this]
    Definition Classes
    GenericTraversableTemplate → HasNewBuilder
  100. def nonEmpty: Boolean
    Definition Classes
    TraversableOnce → GenTraversableOnce
  101. final def notify(): Unit
    Definition Classes
    AnyRef
  102. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  103. def orElse[A1 <: Int, B1 >: String](that: PartialFunction[A1, B1]): PartialFunction[A1, B1]
    Definition Classes
    PartialFunction
  104. def padTo[B >: String, That](len: Int, elem: B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  105. def par: ParSeq[String]
    Definition Classes
    Parallelizable
  106. def parCombiner: Combiner[String, ParSeq[String]]
    Attributes
    protected[this]
    Definition Classes
    Seq → SeqLike → Iterable → TraversableLike → Parallelizable
  107. def partition(p: (String) ⇒ Boolean): (IndexedSeq[String], IndexedSeq[String])
    Definition Classes
    TraversableLike → GenTraversableLike
  108. def patch[B >: String, That](from: Int, patch: GenSeq[B], replaced: Int)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  109. def permutations: Iterator[IndexedSeq[String]]
    Definition Classes
    SeqLike
  110. def prefixLength(p: (String) ⇒ Boolean): Int
    Definition Classes
    GenSeqLike
  111. def product[B >: String](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  112. def reduce[A1 >: String](op: (A1, A1) ⇒ A1): A1
    Definition Classes
    TraversableOnce → GenTraversableOnce
  113. def reduceLeft[B >: String](op: (B, String) ⇒ B): B
    Definition Classes
    TraversableOnce
  114. def reduceLeftOption[B >: String](op: (B, String) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  115. def reduceOption[A1 >: String](op: (A1, A1) ⇒ A1): Option[A1]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  116. def reduceRight[B >: String](op: (String, B) ⇒ B): B
    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  117. def reduceRightOption[B >: String](op: (String, B) ⇒ B): Option[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  118. def repr: IndexedSeq[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  119. def reverse: IndexedSeq[String]
    Definition Classes
    SeqLike → GenSeqLike
  120. def reverseIterator: Iterator[String]
    Definition Classes
    SeqLike
  121. def reverseMap[B, That](f: (String) ⇒ B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  122. def reversed: List[String]
    Attributes
    protected[this]
    Definition Classes
    TraversableOnce
  123. def runWith[U](action: (String) ⇒ U): (Int) ⇒ Boolean
    Definition Classes
    PartialFunction
  124. def sameElements[B >: String](that: GenIterable[B]): Boolean
    Definition Classes
    IterableLike → GenIterableLike
  125. def scan[B >: String, That](z: B)(op: (B, B) ⇒ B)(implicit cbf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  126. def scanLeft[B, That](z: B)(op: (B, String) ⇒ B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
  127. def scanRight[B, That](z: B)(op: (String, B) ⇒ B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    TraversableLike → GenTraversableLike
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The behavior of scanRight has changed. The previous behavior can be reproduced with scanRight.reverse.

  128. def segmentLength(p: (String) ⇒ Boolean, from: Int): Int
    Definition Classes
    SeqLike → GenSeqLike
  129. def seq: IndexedSeq[String]
    Definition Classes
    IndexedSeq → IndexedSeq → IndexedSeqLike → Seq → Seq → GenSeq → GenSeqLike → Iterable → Iterable → GenIterable → Traversable → Traversable → GenTraversable → Parallelizable → TraversableOnce → GenTraversableOnce
  130. def size: Int
    Definition Classes
    SeqLike → GenTraversableLike → TraversableOnce → GenTraversableOnce
  131. def sizeHintIfCheap: Int
    Attributes
    protected[scala.collection]
    Definition Classes
    IndexedSeqLike → GenTraversableOnce
  132. def slice(from: Int, until: Int): IndexedSeq[String]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  133. def sliding(size: Int, step: Int): Iterator[IndexedSeq[String]]
    Definition Classes
    IterableLike
  134. def sliding(size: Int): Iterator[IndexedSeq[String]]
    Definition Classes
    IterableLike
  135. def sortBy[B](f: (String) ⇒ B)(implicit ord: Ordering[B]): IndexedSeq[String]
    Definition Classes
    SeqLike
  136. def sortWith(lt: (String, String) ⇒ Boolean): IndexedSeq[String]
    Definition Classes
    SeqLike
  137. def sorted[B >: String](implicit ord: Ordering[B]): IndexedSeq[String]
    Definition Classes
    SeqLike
  138. def span(p: (String) ⇒ Boolean): (IndexedSeq[String], IndexedSeq[String])
    Definition Classes
    TraversableLike → GenTraversableLike
  139. def splitAt(n: Int): (IndexedSeq[String], IndexedSeq[String])
    Definition Classes
    TraversableLike → GenTraversableLike
  140. def startsWith[B](that: GenSeq[B], offset: Int): Boolean
    Definition Classes
    SeqLike → GenSeqLike
  141. def startsWith[B](that: GenSeq[B]): Boolean
    Definition Classes
    GenSeqLike
  142. def stringPrefix: String
    Definition Classes
    TraversableLike → GenTraversableLike
  143. def sum[B >: String](implicit num: Numeric[B]): B
    Definition Classes
    TraversableOnce → GenTraversableOnce
  144. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  145. def tail: IndexedSeq[String]
    Definition Classes
    TraversableLike → GenTraversableLike
  146. def tails: Iterator[IndexedSeq[String]]
    Definition Classes
    TraversableLike
  147. def take(n: Int): IndexedSeq[String]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  148. def takeRight(n: Int): IndexedSeq[String]
    Definition Classes
    IterableLike
  149. def takeWhile(p: (String) ⇒ Boolean): IndexedSeq[String]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableLike
  150. def thisCollection: IndexedSeq[String]
    Attributes
    protected[this]
    Definition Classes
    IndexedSeqLike → SeqLike → IterableLike → TraversableLike
  151. def to[Col[_]](implicit cbf: CanBuildFrom[Nothing, String, Col[String]]): Col[String]
    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
  152. def toArray[B >: String](implicit arg0: ClassTag[B]): Array[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  153. def toBuffer[A1 >: String]: Buffer[A1]
    Definition Classes
    IndexedSeqLike → TraversableOnce → GenTraversableOnce
  154. def toCollection(repr: IndexedSeq[String]): IndexedSeq[String]
    Attributes
    protected[this]
    Definition Classes
    IndexedSeqLike → SeqLike → IterableLike → TraversableLike
  155. def toIndexedSeq: IndexedSeq[String]
    Definition Classes
    IndexedSeq → TraversableOnce → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  156. def toIterable: Iterable[String]
    Definition Classes
    IterableLike → TraversableOnce → GenTraversableOnce
  157. def toIterator: Iterator[String]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  158. def toList: List[String]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  159. def toMap[T, U](implicit ev: <:<[String, (T, U)]): Map[T, U]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  160. def toSeq: Seq[String]
    Definition Classes
    Seq → SeqLike → GenSeqLike → TraversableOnce → GenTraversableOnce
  161. def toSet[B >: String]: Set[B]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  162. def toStream: Stream[String]
    Definition Classes
    IterableLike → TraversableLike → GenTraversableOnce
  163. def toString(): String
    Definition Classes
    SeqLike → TraversableLike → Any
  164. def toTraversable: Traversable[String]
    Definition Classes
    TraversableLike → TraversableOnce → GenTraversableOnce
    Annotations
    @deprecatedOverriding( ... , "2.11.0" )
  165. def toVector: Vector[String]
    Definition Classes
    TraversableOnce → GenTraversableOnce
  166. def transpose[B](implicit asTraversable: (String) ⇒ GenTraversableOnce[B]): IndexedSeq[IndexedSeq[B]]
    Definition Classes
    GenericTraversableTemplate
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) transpose throws an IllegalArgumentException if collections are not uniformly sized.

  167. def union[B >: String, That](that: GenSeq[B])(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  168. def unzip[A1, A2](implicit asPair: (String) ⇒ (A1, A2)): (IndexedSeq[A1], IndexedSeq[A2])
    Definition Classes
    GenericTraversableTemplate
  169. def unzip3[A1, A2, A3](implicit asTriple: (String) ⇒ (A1, A2, A3)): (IndexedSeq[A1], IndexedSeq[A2], IndexedSeq[A3])
    Definition Classes
    GenericTraversableTemplate
  170. def updated[B >: String, That](index: Int, elem: B)(implicit bf: CanBuildFrom[IndexedSeq[String], B, That]): That
    Definition Classes
    SeqLike → GenSeqLike
  171. def view(from: Int, until: Int): SeqView[String, IndexedSeq[String]]
    Definition Classes
    SeqLike → IterableLike → TraversableLike
  172. def view: SeqView[String, IndexedSeq[String]]
    Definition Classes
    SeqLike → IterableLike → TraversableLike
  173. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  174. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  175. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  176. def withFilter(p: (String) ⇒ Boolean): FilterMonadic[String, IndexedSeq[String]]
    Definition Classes
    TraversableLike → FilterMonadic
  177. def zip[A1 >: String, B, That](that: GenIterable[B])(implicit bf: CanBuildFrom[IndexedSeq[String], (A1, B), That]): That
    Definition Classes
    IterableLike → GenIterableLike
  178. def zipAll[B, A1 >: String, That](that: GenIterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[IndexedSeq[String], (A1, B), That]): That
    Definition Classes
    IterableLike → GenIterableLike
  179. def zipWithIndex[A1 >: String, That](implicit bf: CanBuildFrom[IndexedSeq[String], (A1, Int), That]): That
    Definition Classes
    IterableLike → GenIterableLike

Inherited from IndexedSeq[String]

Inherited from IndexedSeq[String]

Inherited from IndexedSeqLike[String, IndexedSeq[String]]

Inherited from Seq[String]

Inherited from Seq[String]

Inherited from SeqLike[String, IndexedSeq[String]]

Inherited from GenSeq[String]

Inherited from GenSeqLike[String, IndexedSeq[String]]

Inherited from PartialFunction[Int, String]

Inherited from (Int) ⇒ String

Inherited from Iterable[String]

Inherited from Iterable[String]

Inherited from IterableLike[String, IndexedSeq[String]]

Inherited from Equals

Inherited from GenIterable[String]

Inherited from GenIterableLike[String, IndexedSeq[String]]

Inherited from Traversable[String]

Inherited from Immutable

Inherited from Traversable[String]

Inherited from GenTraversable[String]

Inherited from GenericTraversableTemplate[String, IndexedSeq]

Inherited from TraversableLike[String, IndexedSeq[String]]

Inherited from GenTraversableLike[String, IndexedSeq[String]]

Inherited from Parallelizable[String, ParSeq[String]]

Inherited from TraversableOnce[String]

Inherited from GenTraversableOnce[String]

Inherited from FilterMonadic[String, IndexedSeq[String]]

Inherited from HasNewBuilder[String, scala.collection.immutable.IndexedSeq[String] @scala.annotation.unchecked.uncheckedVariance]

Inherited from AnyRef

Inherited from Any

Ungrouped