Package org.jenkinsci.test.acceptance
Class ByFactory
java.lang.Object
org.jenkinsci.test.acceptance.ByFactory
More factories for
By
objects.
To make the code flow, instantiate this object in the variable named "by"
Mainly from Capybara's "selector.rb". To obtain the actual evaluation, I run "bundle exec irb" from selenium-tests, then "require 'xpath'", and just evaluate XPath::HTML.radio_button("XXX").
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.openqa.selenium.By
org.openqa.selenium.By
org.openqa.selenium.By
"/foo/bar" matches div elements with path attribute "/foo/bar" or "/foo/bar[n]".org.openqa.selenium.By
Finds a buttonorg.openqa.selenium.By
Finds checkbox.org.openqa.selenium.By
org.openqa.selenium.By
Link href selector.org.openqa.selenium.By
org.openqa.selenium.By
Finds input fields.org.openqa.selenium.By
Capybara's :link selector.org.openqa.selenium.By
org.openqa.selenium.By
org.openqa.selenium.By
parent()
org.openqa.selenium.By
partialLinkText
(String linkText) org.openqa.selenium.By
Returns the "path" selector that finds an element by following the form-element-path plugin.org.openqa.selenium.By
radioButton
(String locator) Select radio button by its label text.org.openqa.selenium.By
org.openqa.selenium.By
org.openqa.selenium.By
org.openqa.selenium.By
Construct XPath inserting placeholders using String.format.
-
Constructor Details
-
ByFactory
public ByFactory()
-
-
Method Details
-
xpath
-
xpath
Construct XPath inserting placeholders using String.format.- Parameters:
format
- Format specifier for xpath. Only string placeholders are supported - do not put quotes around them.
-
path
Returns the "path" selector that finds an element by following the form-element-path plugin. -
url
-
action
-
name
-
link
Capybara's :link selector.- Parameters:
locator
- Text, id, title, or image alt attribute of the link
-
href
Link href selector.- Parameters:
locator
- href of the link
-
checkbox
Finds checkbox.- Parameters:
locator
- Text
-
radioButton
Select radio button by its label text. -
input
Finds input fields.- Parameters:
locator
- Text, id, title.
-
button
Finds a button -
css
-
tagName
-
option
-
id
-
parent
public org.openqa.selenium.By parent() -
ancestor
-
areaPath
"/foo/bar" matches div elements with path attribute "/foo/bar" or "/foo/bar[n]". Does not match "/foo/bar/baz" or "/foo/bar[1]/baz". -
partialLinkText
- Parameters:
linkText
- The text to match against- Returns:
- a By which locates A elements that contain the given link text
-