_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c178700
test
// MustStringFormatter is equivalent to NewStringFormatter with a call to panic // on error.
{ "resource": "" }
c178701
test
// formatFuncName tries to extract certain part of the runtime formatted // function name to some pre-defined variation. // // This function is known to not work properly if the package path or name // contains a dot.
{ "resource": "" }
c178702
test
// Log implements the Log function required by the Backend interface.
{ "resource": "" }
c178703
test
// LogLevel returns the log level from a string representation.
{ "resource": "" }
c178704
test
// AddModuleLevel wraps a log backend with knobs to have different log levels // for different modules.
{ "resource": "" }
c178705
test
// MultiLogger creates a logger which contain multiple loggers.
{ "resource": "" }
c178706
test
// Log passes the log record to all backends.
{ "resource": "" }
c178707
test
// GetLevel returns the highest level enabled by all backends.
{ "resource": "" }
c178708
test
// SetLevel propagates the same level to all backends.
{ "resource": "" }
c178709
test
// IsEnabledFor returns true if any of the backends are enabled for it.
{ "resource": "" }
c178710
test
// ConvertColors takes a list of ints representing colors for log levels and // converts them into strings for ANSI color formatting
{ "resource": "" }
c178711
test
// NewSyslogBackend connects to the syslog daemon using UNIX sockets with the // given prefix. If prefix is not given, the prefix will be derived from the // launched command.
{ "resource": "" }
c178712
test
// NewSyslogBackendPriority is the same as NewSyslogBackend, but with custom // syslog priority, like syslog.LOG_LOCAL3|syslog.LOG_DEBUG etc.
{ "resource": "" }
c178713
test
// SetBackend replaces the backend currently set with the given new logging // backend.
{ "resource": "" }
c178714
test
// NewCommander returns a new commander with the specified top-level // flags and command name. The Usage function for the topLevelFlags // will be set as well.
{ "resource": "" }
c178715
test
// Execute should be called once the top-level-flags on a Commander // have been initialized. It finds the correct subcommand and executes // it, and returns an ExitStatus with the result. On a usage error, an // appropriate message is printed to os.Stderr, and ExitUsageError is // returned. The additional args are pro...
{ "resource": "" }
c178716
test
// explain prints a brief description of all the subcommands and the // important top-level flags.
{ "resource": "" }
c178717
test
// explainGroup explains all the subcommands for a particular group.
{ "resource": "" }
c178718
test
// explainCmd prints a brief description of a single command.
{ "resource": "" }
c178719
test
// dealias recursivly dealiases a command until a non-aliased command // is reached.
{ "resource": "" }
c178720
test
// Execute should be called once the default flags have been // initialized by flag.Parse. It finds the correct subcommand and // executes it, and returns an ExitStatus with the result. On a usage // error, an appropriate message is printed to os.Stderr, and // ExitUsageError is returned. The additional args are provid...
{ "resource": "" }
c178721
test
// LoadFromData accepts raw data directly from memory // and returns a new configuration representation. // Note that the configuration is written to the system // temporary folder, so your file should not contain // sensitive information.
{ "resource": "" }
c178722
test
// LoadFromReader accepts raw data directly from a reader // and returns a new configuration representation. // You must use ReloadData to reload. // You cannot append files a configfile read this way.
{ "resource": "" }
c178723
test
// ReloadData reloads configuration file from memory
{ "resource": "" }
c178724
test
// SaveConfigData writes configuration to a writer
{ "resource": "" }
c178725
test
// Find finds exactly one element by CSS selector.
{ "resource": "" }
c178726
test
// FindByXPath finds exactly one element by XPath selector.
{ "resource": "" }
c178727
test
// FindByLink finds exactly one anchor element by its text content.
{ "resource": "" }
c178728
test
// FindByLabel finds exactly one element by associated label text.
{ "resource": "" }
c178729
test
// FindByName finds exactly element with the provided name attribute.
{ "resource": "" }
c178730
test
// FindByClass finds exactly one element with a given CSS class.
{ "resource": "" }
c178731
test
// FindByID finds exactly one element that has the given ID.
{ "resource": "" }
c178732
test
// First finds the first element by CSS selector.
{ "resource": "" }
c178733
test
// FirstByXPath finds the first element by XPath selector.
{ "resource": "" }
c178734
test
// FirstByLink finds the first anchor element by its text content.
{ "resource": "" }
c178735
test
// FirstByLabel finds the first element by associated label text.
{ "resource": "" }
c178736
test
// FirstByName finds the first element with the provided name attribute.
{ "resource": "" }
c178737
test
// All finds zero or more elements by CSS selector.
{ "resource": "" }
c178738
test
// AllByXPath finds zero or more elements by XPath selector.
{ "resource": "" }
c178739
test
// AllByLink finds zero or more anchor elements by their text content.
{ "resource": "" }
c178740
test
// AllByLabel finds zero or more elements by associated label text.
{ "resource": "" }
c178741
test
// AllByName finds zero or more elements with the provided name attribute.
{ "resource": "" }
c178742
test
// AllByClass finds zero or more elements with a given CSS class.
{ "resource": "" }
c178743
test
// AllByID finds zero or more elements with a given ID.
{ "resource": "" }
c178744
test
// FirstByClass finds the first element with a given CSS class.
{ "resource": "" }
c178745
test
// Timeout provides an Option for specifying a timeout in seconds.
{ "resource": "" }
c178746
test
// ChromeOptions is used to pass additional options to Chrome via ChromeDriver.
{ "resource": "" }
c178747
test
// JoinPage creates a Page using existing session URL. This method takes Options // but respects only the HTTPClient Option if provided.
{ "resource": "" }
c178748
test
// Destroy closes any open browsers by ending the session.
{ "resource": "" }
c178749
test
// Reset deletes all cookies set for the current domain and navigates to a blank page. // Unlike Destroy, Reset will permit the page to be re-used after it is called. // Reset is faster than Destroy, but any cookies from domains outside the current // domain will remain after a page is reset.
{ "resource": "" }
c178750
test
// Navigate navigates to the provided URL.
{ "resource": "" }
c178751
test
// GetCookies returns all cookies on the page.
{ "resource": "" }
c178752
test
// SetCookie sets a cookie on the page.
{ "resource": "" }
c178753
test
// DeleteCookie deletes a cookie on the page by name.
{ "resource": "" }
c178754
test
// ClearCookies deletes all cookies on the page.
{ "resource": "" }
c178755
test
// URL returns the current page URL.
{ "resource": "" }
c178756
test
// Size sets the current page size in pixels.
{ "resource": "" }
c178757
test
// Screenshot takes a screenshot and saves it to the provided filename. // The provided filename may be an absolute or relative path.
{ "resource": "" }
c178758
test
// Title returns the page title.
{ "resource": "" }
c178759
test
// HTML returns the current contents of the DOM for the entire page.
{ "resource": "" }
c178760
test
// PopupText returns the current alert, confirm, or prompt popup text.
{ "resource": "" }
c178761
test
// EnterPopupText enters text into an open prompt popup.
{ "resource": "" }
c178762
test
// ConfirmPopup confirms an alert, confirm, or prompt popup.
{ "resource": "" }
c178763
test
// CancelPopup cancels an alert, confirm, or prompt popup.
{ "resource": "" }
c178764
test
// SwitchToParentFrame focuses on the immediate parent frame of a frame selected // by Selection.Frame. After switching, all new and existing selections will refer // to the parent frame. All further Page methods will apply to this frame as well. // // This method is not supported by PhantomJS. Please use SwitchToRootF...
{ "resource": "" }
c178765
test
// SwitchToRootFrame focuses on the original, default page frame before any calls // to Selection.Frame were made. After switching, all new and existing selections // will refer to the root frame. All further Page methods will apply to this frame // as well.
{ "resource": "" }
c178766
test
// NextWindow switches to the next available window.
{ "resource": "" }
c178767
test
// CloseWindow closes the active window.
{ "resource": "" }
c178768
test
// WindowCount returns the number of available windows.
{ "resource": "" }
c178769
test
// LogTypes returns all of the valid log types that may be used with a LogReader.
{ "resource": "" }
c178770
test
// MoveMouseBy moves the mouse by the provided offset.
{ "resource": "" }
c178771
test
// DoubleClick double clicks the left mouse button at the current mouse // position.
{ "resource": "" }
c178772
test
// Click performs the provided Click event using the provided Button at the // current mouse position.
{ "resource": "" }
c178773
test
// Click clicks on all of the elements that the selection refers to.
{ "resource": "" }
c178774
test
// DoubleClick double-clicks on all of the elements that the selection refers to.
{ "resource": "" }
c178775
test
// Fill fills all of the fields the selection refers to with the provided text.
{ "resource": "" }
c178776
test
// Tap performs the provided Tap event on each element in the selection.
{ "resource": "" }
c178777
test
// Touch performs the provided Touch event at the location of each element in the // selection.
{ "resource": "" }
c178778
test
// FlickFinger performs a flick touch action by the provided offset and at the // provided speed on exactly one element.
{ "resource": "" }
c178779
test
// ScrollFinger performs a scroll touch action by the provided offset on exactly // one element.
{ "resource": "" }
c178780
test
// NewCapabilities returns a Capabilities instance with any provided features enabled.
{ "resource": "" }
c178781
test
// JSON returns a JSON string representing the desired capabilities.
{ "resource": "" }
c178782
test
// HaveTitle passes when the expected title is equivalent to the // title of the provided page.
{ "resource": "" }
c178783
test
// HaveURL passes when the expected URL is equivalent to the // current URL of the provided page.
{ "resource": "" }
c178784
test
// HavePopupText passes when the expected text is equivalent to the // text contents of an open alert, confirm, or prompt popup.
{ "resource": "" }
c178785
test
// HaveLoggedError passes when all of the expected log messages are logged as // errors in the browser console. If no message is provided, this matcher will // pass if any error message has been logged. When negated, this matcher will // only fail if all of the provided messages are logged.
{ "resource": "" }
c178786
test
// Text returns the entirety of the text content for exactly one element.
{ "resource": "" }
c178787
test
// Active returns true if the single element that the selection refers to is active.
{ "resource": "" }
c178788
test
// Attribute returns an attribute value for exactly one element.
{ "resource": "" }
c178789
test
// CSS returns a CSS style property value for exactly one element.
{ "resource": "" }
c178790
test
// Selected returns true if all of the elements that the selection refers to are selected.
{ "resource": "" }
c178791
test
// Visible returns true if all of the elements that the selection refers to are visible.
{ "resource": "" }
c178792
test
// Enabled returns true if all of the elements that the selection refers to are enabled.
{ "resource": "" }
c178793
test
// HaveCount passes when the expected element count is equal to the actual // number of elements in the selection.
{ "resource": "" }
c178794
test
// HaveAttribute passes when the expected attribute and value are present on the element. // This matcher will fail if the provided selection refers to more than one element.
{ "resource": "" }
c178795
test
// EdgeDriver returns an instance of a EdgeDriver WebDriver. // // Provided Options will apply as default arguments for new pages. // New pages will accept invalid SSL certificates by default. This // may be disabled using the RejectInvalidSSL Option.
{ "resource": "" }
c178796
test
// Selendroid returns an instance of a Selendroid WebDriver. // // Provided Options will apply as default arguments for new pages. // New pages will accept invalid SSL certificates by default. This // may be disabled using the RejectInvalidSSL Option. // // The jarFile is a relative or absolute path to Selendroid JAR f...
{ "resource": "" }
c178797
test
// SwitchToFrame focuses on the frame specified by the selection. All new and // existing selections will refer to the new frame. All further Page methods // will apply to this frame as well.
{ "resource": "" }
c178798
test
// Count returns the number of elements that the selection refers to.
{ "resource": "" }
c178799
test
// EqualsElement returns whether or not two selections of exactly // one element refer to the same element.
{ "resource": "" }