GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
GenerallyPositive.RESTClient Class Reference

Fluent REST client for making API calls with a chained interface. Supports defining workflows, executing them in loops, and accessing results. Results are accessed via a non-generic indexer, requiring casting to the desired type. More...

Inheritance diagram for GenerallyPositive.RESTClient:
GenerallyPositive.IRESTClient GenerallyPositive.IAllowToGPALObject< TResult > GenerallyPositive.IAllowRestMethods GenerallyPositive.IAllowRangeValue GenerallyPositive.IAllowRESTCaptureOptions GenerallyPositive.IAllowRESTStorageOptions GenerallyPositive.IAllowRESTWithUploadFilename GenerallyPositive.IAllowRESTWithDownloadFilename GenerallyPositive.IAllowSelectOptions GenerallyPositive.IAllowRESTWorkflow GenerallyPositive.IAllowRESTInputText GenerallyPositive.IAllowRESTParameters GenerallyPositive.IAllowRESTAttribute GenerallyPositive.IAllowCheckNetworkIdleOrExecution GenerallyPositive.IAllowRESTParametersOrExecution GenerallyPositive.IAllowRESTExecution GenerallyPositive.IAllowRESTDragAndDrop GenerallyPositive.IAllowRESTScrollElement GenerallyPositive.IAllowRESTMethod GenerallyPositive.IAllowRESTEndpointDetails GenerallyPositive.IAllowRESTEndpoint

Public Member Functions

IAllowRESTEndpointDetails WithAPIBase (string url)
 Sets the API base URL with download path.
IAllowRESTEndpointDetails WithAPIBase (string url, TimeSpan httpTimeout)
IAllowRESTParametersOrExecution WithEndpoint (string endpoint)
 Sets the endpoint as a string.
IAllowRESTParametersOrExecution WithEndpoint (ApiEndpoint endpoint)
 Sets the endpoint from an ApiEndpoint enum.
IAllowRESTEndpointDetails LoadOpenAPIMap (string yamlOrUrl)
IAllowRESTEndpointDetails LoadOpenAPIMap (GPALFile openApiMapFile)
void LoadOpenApiRulesInternal (string yamlContent)
IAllowRESTEndpointDetails ListOpenAPIEndPoints ()
IAllowRESTParametersOrExecution WithResultName (string name)
 Sets the result name for the next execution.
IAllowRESTParametersOrExecution WithUrl (string url)
 Sets the URL parameter.
IAllowRESTParametersOrExecution WithUrlFromResult (int resultIndex)
 Sets the URL from a result by index.
IAllowRESTParametersOrExecution WithUrlFromResult (string name)
 Sets the URL from a result by name.
IAllowRESTParametersOrExecution WithTabId (int tabId)
 Sets the tab ID parameter.
IAllowRESTParametersOrExecution WithTabIdFromResult (int resultIndex)
 Sets the tab ID from a result by index.
IAllowRESTParametersOrExecution WithTabIdFromResult (string name)
 Sets the tab ID from a result by name.
IAllowRESTParametersOrExecution WithScript (string script)
 Sets the script parameter.
IAllowRESTParametersOrExecution WithKey (string key)
 Sets the key parameter.
IAllowRESTParametersOrExecution WithKeyFromResult (int resultIndex)
 Sets the key from a result by index.
IAllowRESTParametersOrExecution WithKeyFromResult (string name)
 Sets the key from a result by name.
IAllowRESTEndpointDetails WithName (string name)
 Sets the client name.
IAllowRESTParametersOrExecution WithCss (string css)
 Sets the CSS parameter.
IAllowRESTParametersOrExecution WithCssFromResult (int resultIndex)
 Sets the CSS from a result by index.
IAllowRESTParametersOrExecution WithCssFromResult (string name)
 Sets the CSS from a result by name.
IAllowRESTParametersOrExecution WithElement (IGPALElement gPALElement)
 Sets the element parameter.
IAllowRESTParametersOrExecution WithElementIdFromResult (int resultIndex)
 Sets the element from a result by index.
IAllowRESTParametersOrExecution WithElementIdFromResult (string name)
 Sets the element from a result by name.
IAllowCheckNetworkIdleOrExecution WithTimeoutMs (int timeoutMs)
 Sets the timeout in milliseconds.
IAllowCheckNetworkIdleOrExecution WithPruneMs (int pruneMs)
 Sets the prune interval in milliseconds.
IAllowCheckNetworkIdleOrExecution WithMaxConnections (int maxConnections)
 Sets the maximum connections.
IAllowRESTExecution WithUploadFile (string uploadPath)
 Sets the timeout in milliseconds.
IAllowRESTExecution WithUploadFiles (GPALFile uploadPaths)
 Sets the timeout in milliseconds.
IAllowRESTParametersOrExecution WithXPath (string xpath)
 Sets the XPath parameter.
IAllowRESTParametersOrExecution WithXPathFromResult (int resultIndex)
 Sets the XPath from a result by index.
IAllowRESTParametersOrExecution WithXPathFromResult (string name)
 Sets the XPath from a result by name.
IAllowRESTParametersOrExecution WithParameters (params object[] parameters)
 Sets parameters as a variable argument list.
IAllowRESTParametersOrExecution WithParameters (object parameters)
 Sets parameters as a single object.
IAllowRESTParametersOrExecution WithParametersFromResult (int resultIndex)
 Sets parameters from a result by index.
IAllowRESTParametersOrExecution WithParametersFromResult (string name)
 Sets parameters from a result by name.
IAllowRESTStorageOptions WithData (string data)
 Sets the set storage data parameter.
IAllowRESTStorageOptions WithStorageStoreName (string storeName)
 Sets the storage domain parameter.
IAllowRESTStorageOptions WithStorageDomain (string domain)
 Sets the storage domain parameter.
IAllowRESTStorageOptions WithStoragePath (string path)
 Sets the storage path parameter.
IAllowRESTStorageOptions WithStorageType (WebsiteStorageType storageType)
 Sets the storage path parameter.
IAllowRESTStorageOptions WithStorageKey (string key)
 Sets the storage key parameter.
IAllowRESTStorageOptions WithDeleteAcrossOrigins (bool crossOrigin)
IAllowRESTParametersOrExecution WithPixels (int pixels)
 Sets the pixels parameter.
IAllowRESTParametersOrExecution WithPixelsFromResult (int resultIndex)
 Sets the pixels from a result by index.
IAllowRESTParametersOrExecution WithPixelsFromResult (string name)
 Sets the pixels from a result by name.
IAllowRESTParametersOrExecution WithReferrer (string url)
 Sets the referrer parameter.
IAllowRESTParametersOrExecution WithReferrerFromResult (int resultIndex)
 Sets the referrer from a result by index.
IAllowRESTParametersOrExecution WithReferrerFromResult (string name)
 Sets the referrer from a result by name.
IAllowRESTExecution WithText (string text)
 Sets the text parameter.
IAllowRESTExecution WithTextFromResult (int resultIndex)
 Sets the text from a result by index.
IAllowRESTExecution WithTextFromResult (string name)
 Sets the text from a result by name.
IAllowRESTParametersOrExecution DownloadTo (GPALFile downloadPath)
 Where a file the browser downloads should end up.
Not SaveTo, which is GPAL writing a file it already has. This is a request the browser carries out, and what it can honor differs by engine: the extension names the download but cannot place it, so the file arrives in the browser's own download directory and the download watcher moves it here. client.WithEndpoint(ApiEndpoint.RightClickAndDownload).DownloadTo(file).Execute();.
IAllowRESTParametersOrExecution SaveResultsTo (GPALFile file)
 Saves the response to a file if the endpoint returns a downloadable content client.WithEndpoint(ApiEndpoint.RightClickAndDownload).SaveResultsTo(file).Execute();.
IAllowRESTExecution WithHttpMethod (string method)
 Sets the HTTP method.
IAllowRESTAttribute WithIndex (int index)
 Specifies the option index for select menu operations client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.
IAllowRESTExecution WithDeviceName (string sinkName)
 Sets the CSS parameter.
string Execute (bool publishEvent=true)
 Executes the request synchronously.
Execute< T > (bool publishEvent=true)
 Executes the request synchronously with type.
IRESTClient AndThen (bool publishEvent=true)
 Executes and chains the request.
IRESTClient AndThen< T > (bool publishEvent=true)
 Executes and chains the request with type.
async Task< string > ExecuteAsync (bool publishEvent=true)
 Executes the request asynchronously and returns the raw response await client.ExecuteAsync();.
async Task< T > ExecuteAsync< T > (bool publishEvent=true)
 Executes the request asynchronously with type.
IRESTClient ToGPALObject ()
 Converts the client to a GPAL object.
ResultCollection GetExecutionResults ()
 Gets the execution results.
IAllowRESTWorkflow WithWorkflow (Action< RESTClient > workflow)
 Adds a workflow definition client.WithWorkflow(c => c.WithEndpoint(...).Execute()).While(...);.
IAllowRESTParametersOrExecution While (Func< bool > condition)
 Executes workflows while condition holds client.While(() => someCondition).Execute();.
IAllowRESTParametersOrExecution Until (Func< bool > condition)
 Executes workflows until condition holds.
IAllowRESTParametersOrExecution WithElementId (string elementId)
 Sets the element ID parameter.
IAllowRESTParametersOrExecution WithEncoding (ContentEncoding encoding)
 Specifiy the encoiding type for posted parameters: json or urlencoded.
IAllowRESTExecution WithHeader (string name, string value)
 Adds an HTTP header to the request client.WithHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN").Execute();.
IAllowRESTExecution WithHeaderFromResult (int resultIndex)
 Sets the header from a result by index.
IAllowRESTExecution WithHeaderFromResult (string name)
 Sets the header from a result by name.
IAllowRESTDragAndDrop WithDeltaX (int deltaX)
 Sets the horizontal drop offset for a drag-and-drop operation.
IAllowRESTDragAndDrop WithDeltaY (int deltaY)
 Sets the vertical drop offset for a drag-and-drop operation.
IAllowRESTDragAndDrop WithOffsetX (int offsetX)
 Sets the horizontal grab offset within the element for a drag-and-drop operation.
IAllowRESTDragAndDrop WithOffsetY (int offsetY)
 Sets the vertical grab offset within the element for a drag-and-drop operation.
IAllowRESTScrollElement WithHPixels (int hPixels)
 Sets the horizontal pixels parameter.
IAllowRESTScrollElement WithHPixelsFromResult (int resultIndex)
 Sets the horizontal pixels from a result by index.
IAllowRESTScrollElement WithHPixelsFromResult (string name)
 Sets the horizontal pixels from a result by name.
IAllowRESTScrollElement WithVPixels (int vPixels)
 Sets the vertical pixels parameter.
IAllowRESTScrollElement WithVPixelsFromResult (int resultIndex)
 Sets the vertical pixels from a result by index.
IAllowRESTScrollElement WithVPixelsFromResult (string name)
 Sets the vertical pixels from a result by name.
IAllowRESTExecution CaptureVisibleTab (ImageFormat imageFormat=ImageFormat.JPEG)
 Get a screenshot of the current tab visble contents.
IAllowRESTExecution SetDownloadFilename (string downloadPath)
 Sets the download filename for the current session client.SetDownloadFilename("/path/to/file").Execute();.
IAllowRESTExecution WithDownloadFile (string downloadPath)
IAllowRESTExecution Evaluate (string xpath)
 Evaluates an XPath expression client.Evaluate("//div").Execute();.
IAllowRESTExecution EvaluateAll (string xpath)
 Evaluates an XPath expression for multiple elements client.EvaluateAll("//div").Execute<string[]>();.
IAllowRESTExecution EvaluatePersistent (string xpath)
 Evaluates an XPath expression client.Evaluate("//div").Execute();.
IAllowRESTExecution EvaluateAllPersistent (string xpath)
 Evaluates an XPath expression for multiple elements client.EvaluateAll("//div").Execute<string[]>();.
IAllowRESTExecution ClearReferrer ()
 Clears the referrer client.ClearReferrer().Execute();.
IAllowRESTExecution FireChangeEvent (string elementId)
 Fires a change event on an element by ID client.FireChangeEvent("element123").Execute();.
IAllowRESTExecution Focus (string elementId)
 Focuses an element by ID client.Focus("element123").Execute();.
IAllowRESTExecution GetBoundingClientRect (string elementId)
 Gets the bounding client rect of an element by ID client.GetBoundingClientRect("element123").Execute<string>();.
IAllowRESTExecution ElementFromPoint (string elementId, int x, int y)
 Asks whether a click at this viewport point would reach the element, rather than land on whatever is covering it there.
IAllowRESTExecution GetWindowRectangle ()
IAllowRESTExecution GetContentAndCss (string elementId)
IAllowRESTExecution GetCssAttributes (string elementId)
IAllowRESTExecution GetDomAttributes (string elementId)
IAllowRESTExecution GetDomProperties (string elementId)
IAllowRESTExecution GetElementAttributeHash (string elementId)
 Gets the attribute hash of an element client.GetElementAttributeHash().Execute<string>();.
IAllowRESTExecution GetOptions (string elementId)
 Get the options in a Select manue.
IAllowRESTExecution GetPageSource ()
IAllowRESTExecution GetParentNode (string elementId)
 Gets the parent node of an element by ID client.GetParentNode("element123").Execute<string>();.
IAllowRESTExecution HideElement (string elementId)
 Hides an element by ID client.HideElement("element123").Execute();.
IAllowRESTExecution IsClickable (string elementId)
 Checks if an element is clickable by ID client.IsClickAble("element123").Execute<bool>();.
IAllowRESTExecution IsDisplayed (string elementId)
 Checks if an element is displayed by ID client.IsDisplayed("element123").Execute<bool>();.
IAllowRESTExecution IsEnabled (string elementId)
 Checks if an element is enabled by ID client.IsEnabled("element123").Execute<bool>();.
IAllowRESTExecution IsEndOfPage ()
 Checks if the page is at the end client.IsEndOfPage().Execute<bool>();.
IAllowRESTExecution IsVisibleInViewport (string elementId)
 Checks if an element is visible in viewport by ID client.IsVisibleInViewport("element123").Execute<bool>();.
IAllowRESTExecution LeftClick (string elementId)
 Performs a left click on an element by ID client.LeftClick("element123").Execute();.
IAllowRESTExecution LeftDoubleClick (string elementId)
 Performs a left double click on an element by ID client.LeftDoubleClick("element123").Execute();.
IAllowRESTExecution MiddleClick (string elementId)
 Performs a left click on an element by ID client.LeftClick("element123").Execute();.
IAllowRESTExecution QuerySelector (string css)
 Queries a single element using a CSS selector client.QuerySelector(".class").Execute();.
IAllowRESTExecution QuerySelectors (string css)
 Queries multiple elements using a CSS selector client.QuerySelectors(".class").Execute<string[]>();.
IAllowRESTExecution QueryPersistentSelector (string css)
 Queries a single element using a CSS selector client.QuerySelector(".class").Execute();.
IAllowRESTExecution QueryPersistentSelectors (string css)
 Queries multiple elements using a CSS selector client.QuerySelectors(".class").Execute<string[]>();.
IAllowRESTExecution RightClick (string elementId)
 Performs a right click on an element by ID client.RightClick("element123").Execute();.
IAllowRESTExecution ScrollIntoView (string elementId)
 Scrolls an element into view by ID client.ScrollIntoView("element123").Execute();.
IAllowRESTExecution ScrollElement (int hPixels, int vPixels)
 Scrolls an element by horizontal and vertical pixels client.ScrollElement(100, 200).Execute();.
IAllowRESTAttribute GetAttribute (string elementId)
 Starts getting an attribute of an element by ID client.GetAttribute("element123").WithAttribute("value").Execute<string>();.
IAllowRESTAttribute SetAttribute (string elementId)
 Starts setting an attribute of an element by ID client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.
IAllowRESTExecution TopBrowser ()
 Top the browser, bring it into focus. Used before performing any actions on the browser.
IAllowRESTAttribute WithAttribute (string attribute)
 Specifies the attribute name for get or set operation client.GetAttribute("element123").WithAttribute("value").Execute<string>();.
IAllowRangeValue SetRange (string elementId)
 Starts setting an attribute of an element by ID client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.
IAllowRESTExecution WithRangeValue (int rangeValue)
 Specifies the value for SetRange operation client.SetRange("element123").WithRangeValue(63).Execute();.
IAllowRESTAttribute WithValue (string value)
 Specifies the value for set operation client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.
IAllowRESTExecution WindowInnerHeight ()
 Gets the window inner height client.WindowInnerHeight().Execute<int>();.
IAllowRESTExecution WindowInnerWidth ()
 Gets the window inner width client.WindowInnerWidth().Execute<int>();.
IAllowRESTExecution WindowOuterHeight ()
 Gets the window outer height client.WindowOuterHeight().Execute<int>();.
IAllowRESTExecution WindowOuterWidth ()
 Gets the window outer width client.WindowOuterWidth().Execute<int>();.
IAllowRESTParametersOrExecution Fetch (string url)
 Issue an API request from inside the page, so it carries the session the browser has already earned: its cookies, TLS fingerprint, header order and any anti-bot clearance. A relative url resolves against wherever the browser currently is. client.Fetch("/api/search?page=1").Execute();.
IAllowRESTParametersOrExecution WithVerb (string method)
 Sets the verb of the request being fetched. Not .WithHttpMethod, which is the verb of the REST call itself. GET when nothing was said. client.Fetch(url).WithVerb("POST").Execute();.
IAllowRESTParametersOrExecution WithBody (string body)
 Sets the body of the request being fetched. client.Fetch(url).WithVerb("POST").WithBody(json).Execute();.
IAllowRESTParametersOrExecution WithContentType (string contentType)
 Sets the content type of the body of the request being fetched. client.Fetch(url).WithContentType("application/json").Execute();.
IAllowRESTParametersOrExecution WithHeaders (string[] headers)
 Sets extra headers for the request being fetched, flattened to name, value, name, value. client.Fetch(url).WithHeaders(new[] { "Accept", "application/json" }).Execute();.
IAllowRESTParametersOrExecution WithBytes (bool bytes)
 True to bring the fetched response body back base64 encoded, which is what a file needs. Text is the default, and reading a file as text would put a replacement character wherever a byte is not valid utf-8. client.Fetch(url).WithBytes(true).Execute();.
IAllowRESTExecution WindowPageOffsetX ()
 Gets the window page offset X client.WindowPageOffsetX().Execute<int>();.
IAllowRESTExecution WindowPageOffsetY ()
 Gets the window page offset Y client.WindowPageOffsetY().Execute<int>();.
IAllowRESTExecution WindowScreenLeft ()
 Gets the window screen left position client.WindowScreenLeft().Execute<int>();.
IAllowRESTExecution WindowScreenTop ()
 Gets the window screen top position client.WindowScreenTop().Execute<int>();.
IAllowRESTExecution Hover (string elementId)
 Hovers over an element by ID client.Hover("element123").Execute();.
IAllowRESTExecution Back ()
 Navigates browser history back client.Back().Execute();.
IAllowRESTExecution CheckNetworkIdle (int maxConnections=0)
 Checks if network is idle with max connections client.CheckNetworkIdle(5).Execute<bool>();.
IAllowRESTExecution CloseTab (int tabId)
 Closes a tab by tab ID client.CloseTab(1).Execute();.
IAllowRESTExecution CloseTab (GPALUrl url=null)
 Closes a tab by URL client.CloseTab("https://example.com").Execute();.
IAllowRESTParameters ExecuteJavaScript (string script)
 Executes JavaScript code client.ExecuteJavaScript("return document.title").Execute<string>();.
IAllowRESTParameters InjectScript (string script)
 Registers a script to run on every new document load. Persists until ClearInjectedScripts is called.
IAllowRESTParameters ClearInjectedScripts ()
 Removes all scripts previously registered via InjectScript(string).
IAllowRESTExecution Forward ()
 Navigates browser history forward client.Forward().Execute();.
IAllowRESTExecution FullScreen ()
 Sets browser to full screen client.FullScreen().Execute();.
IAllowRESTExecution GetBrowserSettings ()
 Gets browser settings client.GetBrowserSettings().Execute();.
IAllowRESTExecution GetCurrentUrl ()
 Gets the current URL client.GetCurrentUrl().Execute<string>();.
IAllowRESTExecution GetGpalSettings ()
 Gets GPAL settings client.GetGpalSettings().Execute();.
IAllowRESTExecution GetReadyStatus ()
 Gets the ready status client.GetReadyStatus().Execute<string>();.
IAllowRESTExecution GetSettings ()
 Gets settings client.GetSettings().Execute();.
IAllowRESTExecution GetShadowRoot (string css)
 Gets the shadow root for a CSS selector client.GetShadowRoot(".class").Execute();.
IAllowRESTExecution GetLanguages ()
 Gets the browser's preferred languages, most preferred first client.GetLanguages().Execute<string>();.
IAllowRESTCaptureOptions CaptureCalls (bool capture=true)
 Starts or stops recording what the page asks for. Narrow it with WithCallFilter and start from nothing with WithClearCalls. client.CaptureCalls(true).WithCallFilter("/api/search").Execute();.
IAllowRESTCaptureOptions WithCallFilter (string urlFragment)
 Records only the calls whose url holds this, so a page that talks to a dozen places narrows to the one worth having.
IAllowRESTCaptureOptions WithClearCalls (bool clear=true)
 Forgets what was already recorded before starting, so a second capture is not read as the first.
IAllowRESTExecution GetCapturedCalls ()
 Everything recorded so far, oldest first, as the json the extension keeps. string json = client.GetCapturedCalls().Execute();.
IAllowRESTExecution GetUserAgent ()
 Gets the user agent client.GetUserAgent().Execute<string>();.
IAllowRESTExecution GetWorkflow ()
 Gets the workflow client.GetWorkflow().Execute();.
IAllowRESTExecution GoTo (GPALUrl url)
 Navigates to a URL client.Goto("https://example.com").Execute();.
IAllowRESTExecution GoToTab (int tabId)
 Navigates to a tab by tab ID client.GotoTab(1).Execute();.
IAllowRESTExecution GoToTab (GPALUrl url)
 Navigates to a tab by URL client.GotoTab("https://example.com").Execute();.
IAllowRESTInputText FillInAppend (string elementId)
 Appends text to an element client.FillInAppend("input123").WithText("Hello").Execute();.
IAllowRESTInputText FillInInsert (string elementId)
 Appends text to an element client.FillInAppend("input123").WithText("Hello").Execute();.
IAllowRESTInputText FillInOverwrite (string elementId)
 Appends text to an element client.FillInAppend("input123").WithText("Hello").Execute();.
IAllowRESTWithDownloadFilename LeftClickAndDownload (string elementId)
 Performs a left click and download on an element client.LeftClickAndDownload("element123").SetDownloadFileName(fileName).Execute();.
IAllowRESTWithUploadFilename LeftClickAndUpload (string elementId)
 Purely headless mode, attaches the file to the input[type=file] client.LeftClickAndUpload("element123").WithUploadFile(filePath).Execute();.
IAllowRESTExecution Maximize ()
 Maximizes the browser window client.Maximize().Execute();.
IAllowRESTExecution Minimize ()
 Minimizes the browser window client.Minimize().Execute();.
IAllowRESTExecution MoveTo (string elementId)
 Moves to an element client.MoveTo("element123").Execute();.
IAllowRESTExecution NewTab (GPALUrl url)
 Opens a new tab with optional URL client.NewTab("https://example.com").Execute();.
IAllowRESTExecution NextTab ()
 Switches to the next tab client.NextTab().Execute();.
IAllowRESTExecution TabCount ()
 How many tabs the browser actually has open, which is not the same as how many GPAL opened. A tab can close itself, which is what a browser does with a tab whose first navigation turns into a download. int tabs = client.TabCount().Execute<int>();.
IAllowRESTExecution NextWindow ()
 Switches to the next window client.NextTab().Execute();.
IAllowRESTExecution Normal ()
 Restores the browser window to normal client.Normal().Execute();.
IAllowRESTExecution OverrideReferrer (string referrer)
 Overrides the referrer URL client.OverrideReferrr("https://google.com").Execute();.
IAllowRESTExecution SetUserAgent (string userAgent)
 Overrides the browser's user agent string client.SetUserAgent("Mozilla/5.0 ...").Execute();.
IAllowRESTExecution PageDown (int pagesToScroll=1)
 Scrolls the page down by pages client.PageDown(1).Execute();.
IAllowRESTExecution PageEnd ()
 Scrolls to the page end client.PageEnd().Execute();.
IAllowRESTExecution PageTop ()
 Scrolls to the page top client.PageTop().Execute();.
IAllowRESTExecution PageUp (int pagesToScroll=1)
 Scrolls the page up by pages client.PageUp(1).Execute();.
IAllowRESTExecution PressModifierKey (ModifierKeys modifierKeys)
 Press the modifier keys specified. Keep pressed until a release is sent.
IAllowRESTExecution PreviousTab ()
 Switches to the previous tab client.PreviousTab().Execute();.
IAllowRESTExecution PreviousWindow ()
 Switches to the next window client.NextTab().Execute();.
IAllowRESTExecution Refresh ()
 Refreshes the current page client.Refresh().Execute();.
IAllowRESTExecution ReleaseModifierKey (ModifierKeys modifierKeys)
 Press the modifier keys specified. Keep pressed until a release is sent.
IAllowRESTExecution Restore ()
 Restores the browser window client.Restore().Execute();.
IAllowRESTDragAndDrop DragAndDrop (string elementId)
 Drags an element from its current position by the given offset and drops it client.DragAndDrop("element123").WithDeltaX(100).WithDeltaY(50).Execute();.
IAllowRESTWithDownloadFilename RightClickAndDownload (string elementId)
 Performs a right click and download on an element client.RightClickAndDownload("element123").Execute();.
IAllowRESTScrollElement ScrollElement (string elementId)
 Starts scrolling an element by ID client.ScrollElement("element123").WithHPixels(100).WithVPixels(200).Execute();.
IAllowRESTExecution ScrollWindow (int hPixels, int vPixels)
IAllowRESTExecution ScrollWindowByHorizontal (int hPixels)
 Scrolls the window horizontally by pixels client.ScrollWindowByHorizontal(100).Execute();.
IAllowRESTExecution ScrollWindowByVertical (int vPixels)
 Scrolls the window vertically by pixels client.ScrollWindowByVertical(100).Execute();.
IAllowSelectOptions SelectClick (string elementId)
 Click a Select menu option.
IAllowRESTExecution WithSelectValue (string selectValue)
 Set the value to choose from the Select menu.
IAllowRESTExecution WithSelectIndex (int selectIndex)
IAllowRESTExecution SendKey (byte vkcode)
 Sends a key client.SendKey("Enter").Execute();.
IAllowRESTExecution SendString (string text, int delayMs=0)
 Sends a string client.SendString("Hello").Execute();.
IAllowRESTExecution SetValueFrom (string destSelector)
 Sets the value of the destination element identified by destSelector from the source element identified by the preceding WithCss(string) or WithElementId(string) call. client.WithElementId("srcSelector").SetValueFrom("destSelector").Execute();.
IAllowRESTExecution StealthOverrideReferrer ()
 Overrides referrer stealthily - sets to google.com client.StealthOverrideReferrer().Execute();.
IAllowRESTExecution SubmitForm (string elementId)
 Submits a form client.SubmitForm("form123").Execute();.
IAllowRESTExecution SwitchToDefaultContent ()
 Switches to default content client.SwitchToDefaultContent().Execute();.
IAllowRESTParametersOrExecution WithWindowId (int windowId)
 Sets the window ID parameter client.CloseWindow(123).Execute<WindowTuple>();.
IAllowRESTParametersOrExecution WithWindowIdFromResult (int resultIndex)
 Sets the window ID from a result by index client.GoToWindow().WithWindowIdFromResult(0).Execute<WindowTuple>();.
IAllowRESTParametersOrExecution WithWindowIdFromResult (string name)
 Sets the window ID from a result by name client.GoToWindow().WithWindowIdFromResult("windowResult").Execute<WindowTuple>();.
IAllowRESTExecution OpenWindow (GPALUrl url)
 Opens a new window with the specified URL client.OpenWindow("https://example.com").Execute<WindowTuple>();.
IAllowRESTExecution GoToWindow (GPALUrl url)
 Switches to a window by URL client.GoToWindow("https://example.com").Execute<WindowTuple>();.
IAllowRESTExecution GoToWindow (int windowId)
 Switches to a window by window ID client.GoToWindow(123).Execute<WindowTuple>();.
IAllowRESTExecution CloseBrowser ()
 Closes every window the browser has, which is how it is asked to quit client.CloseBrowser().Execute();.
IAllowRESTExecution CloseWindow (GPALUrl url)
 Closes a window by URL, optionally switching to the main window client.CloseWindow("https://example.com").Execute<WindowTuple>();.
IAllowRESTExecution CloseWindow (int windowId)
 Closes a window by window ID, optionally switching to the main window client.CloseWindow(123).Execute<WindowTuple>();.
IAllowRESTStorageOptions DeleteStorage (WebsiteStorageType storageType)
 Delete the specified storage type.
IAllowRESTStorageOptions GetStorage (WebsiteStorageType storageType)
 Get the specified storage type.
IAllowRESTStorageOptions SetStorage (WebsiteStorageType storageType)
 Set data for the specified storage type.
IAllowRESTExecution GetCurrentWindow ()
 Gets the current window's ID and URL client.GetCurrentWindow().Execute<WindowTuple>();.
IAllowRESTExecution SwitchToElement (string elementId)
 Switches to an element to search for selectors contained client.SwitchToElement("div123").Execute();.
IAllowRESTExecution SwitchToFrame (string elementId)
 Switches to a frame client.SwitchToFrame("frame123").Execute();.
IAllowRESTExecution SwitchToShadowRoot (string elementId)
 Switches to a shadow root client.SwitchToShadowRoot("shadow123").Execute();.
Public Member Functions inherited from GenerallyPositive.IAllowRESTParameters
IAllowRESTParametersOrExecution WithEncoding (Enums.ContentEncoding encoding)

Properties

int StatusCode [get]
string Name [get, set]
 Gets or sets the client name.

Detailed Description

Fluent REST client for making API calls with a chained interface. Supports defining workflows, executing them in loops, and accessing results. Results are accessed via a non-generic indexer, requiring casting to the desired type.

.WithAPIBase(browser.RestApiBaseUrl)
.WithName("JavaScriptClient")
// Execute JavaScript to get the page title and store it as "pageTitle"
.WithEndpoint(ApiEndpoint.ExecuteJavaScript) // Uses RESTHelper.Endpoints to map to "/execute-javascript"
.WithParameters("return document.title", new object[] { }) // Pass the JavaScript code and arguments
.WithResultName("pageTitle")
.AndThen<string>()
// Chain the result: use the page title in an input text operation
.WithEndpoint(ApiEndpoint.InputText) // Uses RESTHelper.Endpoints to map to "/input-text"
.WithXPath("//input[@id='search']")
.WithTextFromResult("pageTitle") // Uses the stored "pageTitle" result
.Execute();
var results = client.GetExecutionResults();
GPAL.PublishSimpleEvent(GPALEventType.NOTICE, $"Page Title: [{(string)results["pageTitle"]}]");
GPAL.PublishSimpleEvent(GPALEventType.NOTICE, $"Page Title from iteration 0: [{(string)results["pageTitle", 0]}]");
Everything starts here, all the GPAL controls and global settings using fluent syntax are here....
Definition GPAL.cs:49
static IAllowRESTEndpoint RESTClient
Instantiate a new fluent RESTClient.
Definition GPAL.cs:914
static void PublishSimpleEvent(GPALEventType gPALEventType, string msg, dynamic gPALObject=null, Enums.GPALObjectType gPALObjectType=GPALObjectType.None, Exception ex=null)
Publish a message to either the information channel or exception channel (if exception passed in) Pub...
Definition GPAL.cs:2406
Fluent REST client for making API calls with a chained interface. Supports defining workflows,...
Definition RESTClient.cs:57
IAllowRESTParametersOrExecution WithResultName(string name)
Sets the result name for the next execution.
ResultCollection GetExecutionResults()
Gets the execution results.
IAllowRESTParametersOrExecution WithEndpoint(string endpoint)
Sets the endpoint as a string.

Definition at line 56 of file RESTClient.cs.

Member Function Documentation

◆ AndThen()

IRESTClient GenerallyPositive.RESTClient.AndThen ( bool publishEvent = true)

Executes and chains the request.

Returns

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1483 of file RESTClient.cs.

◆ AndThen< T >()

IRESTClient GenerallyPositive.RESTClient.AndThen< T > ( bool publishEvent = true)

Executes and chains the request with type.

Template Parameters
TThe result type
Returns

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1496 of file RESTClient.cs.

◆ Back()

IAllowRESTExecution GenerallyPositive.RESTClient.Back ( )

Navigates browser history back client.Back().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2763 of file RESTClient.cs.

◆ CaptureCalls()

IAllowRESTCaptureOptions GenerallyPositive.RESTClient.CaptureCalls ( bool capture = true)

Starts or stops recording what the page asks for. Narrow it with WithCallFilter and start from nothing with WithClearCalls. client.CaptureCalls(true).WithCallFilter("/api/search").Execute();.

Parameters
captureTrue to record, false to stop
Returns
Fluent interface to narrow what is recorded, or to execute

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2957 of file RESTClient.cs.

◆ CaptureVisibleTab()

IAllowRESTExecution GenerallyPositive.RESTClient.CaptureVisibleTab ( ImageFormat imageFormat = ImageFormat::JPEG)

Get a screenshot of the current tab visble contents.

Returns
Base64 string

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2035 of file RESTClient.cs.

◆ CheckNetworkIdle()

IAllowRESTExecution GenerallyPositive.RESTClient.CheckNetworkIdle ( int maxConnections = 0)

Checks if network is idle with max connections client.CheckNetworkIdle(5).Execute<bool>();.

Parameters
maxConnectionsMaximum connections allowed
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2775 of file RESTClient.cs.

◆ ClearInjectedScripts()

IAllowRESTParameters GenerallyPositive.RESTClient.ClearInjectedScripts ( )

Removes all scripts previously registered via InjectScript(string).

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2843 of file RESTClient.cs.

◆ ClearReferrer()

IAllowRESTExecution GenerallyPositive.RESTClient.ClearReferrer ( )

Clears the referrer client.ClearReferrer().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2122 of file RESTClient.cs.

◆ CloseBrowser()

IAllowRESTExecution GenerallyPositive.RESTClient.CloseBrowser ( )

Closes every window the browser has, which is how it is asked to quit client.CloseBrowser().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3679 of file RESTClient.cs.

◆ CloseTab() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.CloseTab ( GPALUrl url = null)

Closes a tab by URL client.CloseTab("https://example.com").Execute();.

Parameters
urlThe URL (optional)
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2799 of file RESTClient.cs.

◆ CloseTab() [2/2]

IAllowRESTExecution GenerallyPositive.RESTClient.CloseTab ( int tabId)

Closes a tab by tab ID client.CloseTab(1).Execute();.

Parameters
tabIdThe tab ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2787 of file RESTClient.cs.

◆ CloseWindow() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.CloseWindow ( GPALUrl url)

Closes a window by URL, optionally switching to the main window client.CloseWindow("https://example.com").Execute<WindowTuple>();.

Parameters
urlThe window URL
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3691 of file RESTClient.cs.

◆ CloseWindow() [2/2]

IAllowRESTExecution GenerallyPositive.RESTClient.CloseWindow ( int windowId)

Closes a window by window ID, optionally switching to the main window client.CloseWindow(123).Execute<WindowTuple>();.

Parameters
windowIdThe window ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3707 of file RESTClient.cs.

◆ DeleteStorage()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.DeleteStorage ( WebsiteStorageType storageType)

Delete the specified storage type.

Parameters
storageType
Returns
fluent interface to chain parameters

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3718 of file RESTClient.cs.

◆ DownloadTo()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.DownloadTo ( GPALFile downloadPath)

Where a file the browser downloads should end up.
Not SaveTo, which is GPAL writing a file it already has. This is a request the browser carries out, and what it can honor differs by engine: the extension names the download but cannot place it, so the file arrives in the browser's own download directory and the download watcher moves it here. client.WithEndpoint(ApiEndpoint.RightClickAndDownload).DownloadTo(file).Execute();.

Parameters
downloadPathWhere the downloaded file is to end up
Returns
Fluent interface to continue building the request

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1240 of file RESTClient.cs.

◆ DragAndDrop()

IAllowRESTDragAndDrop GenerallyPositive.RESTClient.DragAndDrop ( string elementId)

Drags an element from its current position by the given offset and drops it client.DragAndDrop("element123").WithDeltaX(100).WithDeltaY(50).Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3391 of file RESTClient.cs.

◆ ElementFromPoint()

IAllowRESTExecution GenerallyPositive.RESTClient.ElementFromPoint ( string elementId,
int x,
int y )

Asks whether a click at this viewport point would reach the element, rather than land on whatever is covering it there.

Parameters
elementIdThe element that should receive the click
xViewport x
yViewport y
Returns
Fluent interface to continue building the request

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2172 of file RESTClient.cs.

◆ Evaluate()

IAllowRESTExecution GenerallyPositive.RESTClient.Evaluate ( string xpath)

Evaluates an XPath expression client.Evaluate("//div").Execute();.

Parameters
xpathThe XPath expression
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2075 of file RESTClient.cs.

◆ EvaluateAll()

IAllowRESTExecution GenerallyPositive.RESTClient.EvaluateAll ( string xpath)

Evaluates an XPath expression for multiple elements client.EvaluateAll("//div").Execute<string[]>();.

Parameters
xpathThe XPath expression
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2087 of file RESTClient.cs.

◆ EvaluateAllPersistent()

IAllowRESTExecution GenerallyPositive.RESTClient.EvaluateAllPersistent ( string xpath)

Evaluates an XPath expression for multiple elements client.EvaluateAll("//div").Execute<string[]>();.

Parameters
xpathThe XPath expression
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2111 of file RESTClient.cs.

◆ EvaluatePersistent()

IAllowRESTExecution GenerallyPositive.RESTClient.EvaluatePersistent ( string xpath)

Evaluates an XPath expression client.Evaluate("//div").Execute();.

Parameters
xpathThe XPath expression
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2099 of file RESTClient.cs.

◆ Execute()

string GenerallyPositive.RESTClient.Execute ( bool publishEvent = true)

Executes the request synchronously.

Returns
The result string

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1330 of file RESTClient.cs.

◆ Execute< T >()

T GenerallyPositive.RESTClient.Execute< T > ( bool publishEvent = true)

Executes the request synchronously with type.

Template Parameters
TThe result type
Returns
The typed result

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1402 of file RESTClient.cs.

◆ ExecuteAsync()

async Task< string > GenerallyPositive.RESTClient.ExecuteAsync ( bool publishEvent = true)

Executes the request asynchronously and returns the raw response await client.ExecuteAsync();.

Returns
The response string

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1509 of file RESTClient.cs.

◆ ExecuteAsync< T >()

async Task< T > GenerallyPositive.RESTClient.ExecuteAsync< T > ( bool publishEvent = true)

Executes the request asynchronously with type.

Template Parameters
TThe result type
Returns
The typed result

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1576 of file RESTClient.cs.

◆ ExecuteJavaScript()

IAllowRESTParameters GenerallyPositive.RESTClient.ExecuteJavaScript ( string script)

Executes JavaScript code client.ExecuteJavaScript("return document.title").Execute<string>();.

Parameters
scriptThe JavaScript code
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2814 of file RESTClient.cs.

◆ Fetch()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.Fetch ( string url)

Issue an API request from inside the page, so it carries the session the browser has already earned: its cookies, TLS fingerprint, header order and any anti-bot clearance. A relative url resolves against wherever the browser currently is. client.Fetch("/api/search?page=1").Execute();.

Parameters
urlUrl to request, relative or absolute
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2595 of file RESTClient.cs.

◆ FillInAppend()

IAllowRESTInputText GenerallyPositive.RESTClient.FillInAppend ( string elementId)

Appends text to an element client.FillInAppend("input123").WithText("Hello").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3079 of file RESTClient.cs.

◆ FillInInsert()

IAllowRESTInputText GenerallyPositive.RESTClient.FillInInsert ( string elementId)

Appends text to an element client.FillInAppend("input123").WithText("Hello").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3091 of file RESTClient.cs.

◆ FillInOverwrite()

IAllowRESTInputText GenerallyPositive.RESTClient.FillInOverwrite ( string elementId)

Appends text to an element client.FillInAppend("input123").WithText("Hello").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3103 of file RESTClient.cs.

◆ FireChangeEvent()

IAllowRESTExecution GenerallyPositive.RESTClient.FireChangeEvent ( string elementId)

Fires a change event on an element by ID client.FireChangeEvent("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2134 of file RESTClient.cs.

◆ Focus()

IAllowRESTExecution GenerallyPositive.RESTClient.Focus ( string elementId)

Focuses an element by ID client.Focus("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2146 of file RESTClient.cs.

◆ Forward()

IAllowRESTExecution GenerallyPositive.RESTClient.Forward ( )

Navigates browser history forward client.Forward().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2855 of file RESTClient.cs.

◆ FullScreen()

IAllowRESTExecution GenerallyPositive.RESTClient.FullScreen ( )

Sets browser to full screen client.FullScreen().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2866 of file RESTClient.cs.

◆ GetAttribute()

IAllowRESTAttribute GenerallyPositive.RESTClient.GetAttribute ( string elementId)

Starts getting an attribute of an element by ID client.GetAttribute("element123").WithAttribute("value").Execute<string>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2458 of file RESTClient.cs.

◆ GetBoundingClientRect()

IAllowRESTExecution GenerallyPositive.RESTClient.GetBoundingClientRect ( string elementId)

Gets the bounding client rect of an element by ID client.GetBoundingClientRect("element123").Execute<string>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2158 of file RESTClient.cs.

◆ GetBrowserSettings()

IAllowRESTExecution GenerallyPositive.RESTClient.GetBrowserSettings ( )

Gets browser settings client.GetBrowserSettings().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2877 of file RESTClient.cs.

◆ GetCapturedCalls()

IAllowRESTExecution GenerallyPositive.RESTClient.GetCapturedCalls ( )

Everything recorded so far, oldest first, as the json the extension keeps. string json = client.GetCapturedCalls().Execute();.

Returns
Fluent interface to execute the request

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3005 of file RESTClient.cs.

◆ GetContentAndCss()

IAllowRESTExecution GenerallyPositive.RESTClient.GetContentAndCss ( string elementId)

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2187 of file RESTClient.cs.

◆ GetCssAttributes()

IAllowRESTExecution GenerallyPositive.RESTClient.GetCssAttributes ( string elementId)

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2196 of file RESTClient.cs.

◆ GetCurrentUrl()

IAllowRESTExecution GenerallyPositive.RESTClient.GetCurrentUrl ( )

Gets the current URL client.GetCurrentUrl().Execute<string>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2888 of file RESTClient.cs.

◆ GetCurrentWindow()

IAllowRESTExecution GenerallyPositive.RESTClient.GetCurrentWindow ( )

Gets the current window's ID and URL client.GetCurrentWindow().Execute<WindowTuple>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3753 of file RESTClient.cs.

◆ GetDomAttributes()

IAllowRESTExecution GenerallyPositive.RESTClient.GetDomAttributes ( string elementId)

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2205 of file RESTClient.cs.

◆ GetDomProperties()

IAllowRESTExecution GenerallyPositive.RESTClient.GetDomProperties ( string elementId)

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2214 of file RESTClient.cs.

◆ GetElementAttributeHash()

IAllowRESTExecution GenerallyPositive.RESTClient.GetElementAttributeHash ( string elementId)

Gets the attribute hash of an element client.GetElementAttributeHash().Execute<string>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2228 of file RESTClient.cs.

◆ GetExecutionResults()

ResultCollection GenerallyPositive.RESTClient.GetExecutionResults ( )

Gets the execution results.

Returns
The result collection

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1650 of file RESTClient.cs.

◆ GetGpalSettings()

IAllowRESTExecution GenerallyPositive.RESTClient.GetGpalSettings ( )

Gets GPAL settings client.GetGpalSettings().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2899 of file RESTClient.cs.

◆ GetLanguages()

IAllowRESTExecution GenerallyPositive.RESTClient.GetLanguages ( )

Gets the browser's preferred languages, most preferred first client.GetLanguages().Execute<string>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2944 of file RESTClient.cs.

◆ GetOptions()

IAllowRESTExecution GenerallyPositive.RESTClient.GetOptions ( string elementId)

Get the options in a Select manue.

Parameters
elementId
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2239 of file RESTClient.cs.

◆ GetPageSource()

IAllowRESTExecution GenerallyPositive.RESTClient.GetPageSource ( )

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2244 of file RESTClient.cs.

◆ GetParentNode()

IAllowRESTExecution GenerallyPositive.RESTClient.GetParentNode ( string elementId)

Gets the parent node of an element by ID client.GetParentNode("element123").Execute<string>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2255 of file RESTClient.cs.

◆ GetReadyStatus()

IAllowRESTExecution GenerallyPositive.RESTClient.GetReadyStatus ( )

Gets the ready status client.GetReadyStatus().Execute<string>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2910 of file RESTClient.cs.

◆ GetSettings()

IAllowRESTExecution GenerallyPositive.RESTClient.GetSettings ( )

Gets settings client.GetSettings().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2921 of file RESTClient.cs.

◆ GetShadowRoot()

IAllowRESTExecution GenerallyPositive.RESTClient.GetShadowRoot ( string css)

Gets the shadow root for a CSS selector client.GetShadowRoot(".class").Execute();.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2933 of file RESTClient.cs.

◆ GetStorage()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.GetStorage ( WebsiteStorageType storageType)

Get the specified storage type.

Parameters
storageType
Returns
fluent interface to chain parameters

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3730 of file RESTClient.cs.

◆ GetUserAgent()

IAllowRESTExecution GenerallyPositive.RESTClient.GetUserAgent ( )

Gets the user agent client.GetUserAgent().Execute<string>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3016 of file RESTClient.cs.

◆ GetWindowRectangle()

IAllowRESTExecution GenerallyPositive.RESTClient.GetWindowRectangle ( )

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2182 of file RESTClient.cs.

◆ GetWorkflow()

IAllowRESTExecution GenerallyPositive.RESTClient.GetWorkflow ( )

Gets the workflow client.GetWorkflow().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3027 of file RESTClient.cs.

◆ GoTo()

IAllowRESTExecution GenerallyPositive.RESTClient.GoTo ( GPALUrl url)

Navigates to a URL client.Goto("https://example.com").Execute();.

Parameters
urlThe URL
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3039 of file RESTClient.cs.

◆ GoToTab() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.GoToTab ( GPALUrl url)

Navigates to a tab by URL client.GotoTab("https://example.com").Execute();.

Parameters
urlThe URL
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3067 of file RESTClient.cs.

◆ GoToTab() [2/2]

IAllowRESTExecution GenerallyPositive.RESTClient.GoToTab ( int tabId)

Navigates to a tab by tab ID client.GotoTab(1).Execute();.

Parameters
tabIdThe tab ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3055 of file RESTClient.cs.

◆ GoToWindow() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.GoToWindow ( GPALUrl url)

Switches to a window by URL client.GoToWindow("https://example.com").Execute<WindowTuple>();.

Parameters
urlThe window URL
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3656 of file RESTClient.cs.

◆ GoToWindow() [2/2]

IAllowRESTExecution GenerallyPositive.RESTClient.GoToWindow ( int windowId)

Switches to a window by window ID client.GoToWindow(123).Execute<WindowTuple>();.

Parameters
windowIdThe window ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3668 of file RESTClient.cs.

◆ HideElement()

IAllowRESTExecution GenerallyPositive.RESTClient.HideElement ( string elementId)

Hides an element by ID client.HideElement("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2267 of file RESTClient.cs.

◆ Hover()

IAllowRESTExecution GenerallyPositive.RESTClient.Hover ( string elementId)

Hovers over an element by ID client.Hover("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2732 of file RESTClient.cs.

◆ InjectScript()

IAllowRESTParameters GenerallyPositive.RESTClient.InjectScript ( string script)

Registers a script to run on every new document load. Persists until ClearInjectedScripts is called.

Parameters
scriptThe JavaScript code to inject
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2829 of file RESTClient.cs.

◆ IsClickable()

IAllowRESTExecution GenerallyPositive.RESTClient.IsClickable ( string elementId)

Checks if an element is clickable by ID client.IsClickAble("element123").Execute<bool>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2279 of file RESTClient.cs.

◆ IsDisplayed()

IAllowRESTExecution GenerallyPositive.RESTClient.IsDisplayed ( string elementId)

Checks if an element is displayed by ID client.IsDisplayed("element123").Execute<bool>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2291 of file RESTClient.cs.

◆ IsEnabled()

IAllowRESTExecution GenerallyPositive.RESTClient.IsEnabled ( string elementId)

Checks if an element is enabled by ID client.IsEnabled("element123").Execute<bool>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2303 of file RESTClient.cs.

◆ IsEndOfPage()

IAllowRESTExecution GenerallyPositive.RESTClient.IsEndOfPage ( )

Checks if the page is at the end client.IsEndOfPage().Execute<bool>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2314 of file RESTClient.cs.

◆ IsVisibleInViewport()

IAllowRESTExecution GenerallyPositive.RESTClient.IsVisibleInViewport ( string elementId)

Checks if an element is visible in viewport by ID client.IsVisibleInViewport("element123").Execute<bool>();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2326 of file RESTClient.cs.

◆ LeftClick()

IAllowRESTExecution GenerallyPositive.RESTClient.LeftClick ( string elementId)

Performs a left click on an element by ID client.LeftClick("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2338 of file RESTClient.cs.

◆ LeftClickAndDownload()

IAllowRESTWithDownloadFilename GenerallyPositive.RESTClient.LeftClickAndDownload ( string elementId)

Performs a left click and download on an element client.LeftClickAndDownload("element123").SetDownloadFileName(fileName).Execute();.

Parameters
elementIdThe element ID
Returns
Interace chaining to SetDownloadFileName

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3115 of file RESTClient.cs.

◆ LeftClickAndUpload()

IAllowRESTWithUploadFilename GenerallyPositive.RESTClient.LeftClickAndUpload ( string elementId)

Purely headless mode, attaches the file to the input[type=file] client.LeftClickAndUpload("element123").WithUploadFile(filePath).Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3127 of file RESTClient.cs.

◆ LeftDoubleClick()

IAllowRESTExecution GenerallyPositive.RESTClient.LeftDoubleClick ( string elementId)

Performs a left double click on an element by ID client.LeftDoubleClick("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2350 of file RESTClient.cs.

◆ ListOpenAPIEndPoints()

IAllowRESTEndpointDetails GenerallyPositive.RESTClient.ListOpenAPIEndPoints ( )

Implements GenerallyPositive.IAllowRESTEndpointDetails.

Definition at line 450 of file RESTClient.cs.

◆ LoadOpenAPIMap() [1/2]

IAllowRESTEndpointDetails GenerallyPositive.RESTClient.LoadOpenAPIMap ( GPALFile openApiMapFile)

Implements GenerallyPositive.IAllowRESTEndpoint.

Definition at line 377 of file RESTClient.cs.

◆ LoadOpenAPIMap() [2/2]

IAllowRESTEndpointDetails GenerallyPositive.RESTClient.LoadOpenAPIMap ( string yamlOrUrl)

Implements GenerallyPositive.IAllowRESTEndpoint.

Definition at line 324 of file RESTClient.cs.

◆ LoadOpenApiRulesInternal()

void GenerallyPositive.RESTClient.LoadOpenApiRulesInternal ( string yamlContent)

Definition at line 393 of file RESTClient.cs.

◆ Maximize()

IAllowRESTExecution GenerallyPositive.RESTClient.Maximize ( )

Maximizes the browser window client.Maximize().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3138 of file RESTClient.cs.

◆ MiddleClick()

IAllowRESTExecution GenerallyPositive.RESTClient.MiddleClick ( string elementId)

Performs a left click on an element by ID client.LeftClick("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2361 of file RESTClient.cs.

◆ Minimize()

IAllowRESTExecution GenerallyPositive.RESTClient.Minimize ( )

Minimizes the browser window client.Minimize().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3149 of file RESTClient.cs.

◆ MoveTo()

IAllowRESTExecution GenerallyPositive.RESTClient.MoveTo ( string elementId)

Moves to an element client.MoveTo("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3161 of file RESTClient.cs.

◆ NewTab()

IAllowRESTExecution GenerallyPositive.RESTClient.NewTab ( GPALUrl url)

Opens a new tab with optional URL client.NewTab("https://example.com").Execute();.

Parameters
urlThe URL (optional)
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3173 of file RESTClient.cs.

◆ NextTab()

IAllowRESTExecution GenerallyPositive.RESTClient.NextTab ( )

Switches to the next tab client.NextTab().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3189 of file RESTClient.cs.

◆ NextWindow()

IAllowRESTExecution GenerallyPositive.RESTClient.NextWindow ( )

Switches to the next window client.NextTab().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3212 of file RESTClient.cs.

◆ Normal()

IAllowRESTExecution GenerallyPositive.RESTClient.Normal ( )

Restores the browser window to normal client.Normal().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3223 of file RESTClient.cs.

◆ OpenWindow()

IAllowRESTExecution GenerallyPositive.RESTClient.OpenWindow ( GPALUrl url)

Opens a new window with the specified URL client.OpenWindow("https://example.com").Execute<WindowTuple>();.

Parameters
urlThe URL to open (optional, defaults to "https://google.com")
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3641 of file RESTClient.cs.

◆ OverrideReferrer()

IAllowRESTExecution GenerallyPositive.RESTClient.OverrideReferrer ( string referrer)

Overrides the referrer URL client.OverrideReferrr("https://google.com").Execute();.

Parameters
referrerThe referrer URL
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3235 of file RESTClient.cs.

◆ PageDown()

IAllowRESTExecution GenerallyPositive.RESTClient.PageDown ( int pagesToScroll = 1)

Scrolls the page down by pages client.PageDown(1).Execute();.

Parameters
pagesToScrollNumber of pages to scroll
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3263 of file RESTClient.cs.

◆ PageEnd()

IAllowRESTExecution GenerallyPositive.RESTClient.PageEnd ( )

Scrolls to the page end client.PageEnd().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3278 of file RESTClient.cs.

◆ PageTop()

IAllowRESTExecution GenerallyPositive.RESTClient.PageTop ( )

Scrolls to the page top client.PageTop().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3289 of file RESTClient.cs.

◆ PageUp()

IAllowRESTExecution GenerallyPositive.RESTClient.PageUp ( int pagesToScroll = 1)

Scrolls the page up by pages client.PageUp(1).Execute();.

Parameters
pagesToScrollNumber of pages to scroll
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3301 of file RESTClient.cs.

◆ PressModifierKey()

IAllowRESTExecution GenerallyPositive.RESTClient.PressModifierKey ( ModifierKeys modifierKeys)

Press the modifier keys specified. Keep pressed until a release is sent.

Parameters
modifierKeys
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3316 of file RESTClient.cs.

◆ PreviousTab()

IAllowRESTExecution GenerallyPositive.RESTClient.PreviousTab ( )

Switches to the previous tab client.PreviousTab().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3330 of file RESTClient.cs.

◆ PreviousWindow()

IAllowRESTExecution GenerallyPositive.RESTClient.PreviousWindow ( )

Switches to the next window client.NextTab().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3341 of file RESTClient.cs.

◆ QueryPersistentSelector()

IAllowRESTExecution GenerallyPositive.RESTClient.QueryPersistentSelector ( string css)

Queries a single element using a CSS selector client.QuerySelector(".class").Execute();.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2397 of file RESTClient.cs.

◆ QueryPersistentSelectors()

IAllowRESTExecution GenerallyPositive.RESTClient.QueryPersistentSelectors ( string css)

Queries multiple elements using a CSS selector client.QuerySelectors(".class").Execute<string[]>();.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2409 of file RESTClient.cs.

◆ QuerySelector()

IAllowRESTExecution GenerallyPositive.RESTClient.QuerySelector ( string css)

Queries a single element using a CSS selector client.QuerySelector(".class").Execute();.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2373 of file RESTClient.cs.

◆ QuerySelectors()

IAllowRESTExecution GenerallyPositive.RESTClient.QuerySelectors ( string css)

Queries multiple elements using a CSS selector client.QuerySelectors(".class").Execute<string[]>();.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2385 of file RESTClient.cs.

◆ Refresh()

IAllowRESTExecution GenerallyPositive.RESTClient.Refresh ( )

Refreshes the current page client.Refresh().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3352 of file RESTClient.cs.

◆ ReleaseModifierKey()

IAllowRESTExecution GenerallyPositive.RESTClient.ReleaseModifierKey ( ModifierKeys modifierKeys)

Press the modifier keys specified. Keep pressed until a release is sent.

Parameters
modifierKeys
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3364 of file RESTClient.cs.

◆ Restore()

IAllowRESTExecution GenerallyPositive.RESTClient.Restore ( )

Restores the browser window client.Restore().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3379 of file RESTClient.cs.

◆ RightClick()

IAllowRESTExecution GenerallyPositive.RESTClient.RightClick ( string elementId)

Performs a right click on an element by ID client.RightClick("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2421 of file RESTClient.cs.

◆ RightClickAndDownload()

IAllowRESTWithDownloadFilename GenerallyPositive.RESTClient.RightClickAndDownload ( string elementId)

Performs a right click and download on an element client.RightClickAndDownload("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3403 of file RESTClient.cs.

◆ SaveResultsTo()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.SaveResultsTo ( GPALFile file)

Saves the response to a file if the endpoint returns a downloadable content client.WithEndpoint(ApiEndpoint.RightClickAndDownload).SaveResultsTo(file).Execute();.

Parameters
fileThe GPAL file defining the save location
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1261 of file RESTClient.cs.

◆ ScrollElement() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.ScrollElement ( int hPixels,
int vPixels )

Scrolls an element by horizontal and vertical pixels client.ScrollElement(100, 200).Execute();.

Parameters
hPixelsThe horizontal pixels
vPixelsThe vertical pixels
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2446 of file RESTClient.cs.

◆ ScrollElement() [2/2]

IAllowRESTScrollElement GenerallyPositive.RESTClient.ScrollElement ( string elementId)

Starts scrolling an element by ID client.ScrollElement("element123").WithHPixels(100).WithVPixels(200).Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3415 of file RESTClient.cs.

◆ ScrollIntoView()

IAllowRESTExecution GenerallyPositive.RESTClient.ScrollIntoView ( string elementId)

Scrolls an element into view by ID client.ScrollIntoView("element123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2433 of file RESTClient.cs.

◆ ScrollWindow()

IAllowRESTExecution GenerallyPositive.RESTClient.ScrollWindow ( int hPixels,
int vPixels )

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3421 of file RESTClient.cs.

◆ ScrollWindowByHorizontal()

IAllowRESTExecution GenerallyPositive.RESTClient.ScrollWindowByHorizontal ( int hPixels)

Scrolls the window horizontally by pixels client.ScrollWindowByHorizontal(100).Execute();.

Parameters
pixelsThe horizontal pixels
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3432 of file RESTClient.cs.

◆ ScrollWindowByVertical()

IAllowRESTExecution GenerallyPositive.RESTClient.ScrollWindowByVertical ( int vPixels)

Scrolls the window vertically by pixels client.ScrollWindowByVertical(100).Execute();.

Parameters
pixelsThe vertical pixels
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3446 of file RESTClient.cs.

◆ SelectClick()

IAllowSelectOptions GenerallyPositive.RESTClient.SelectClick ( string elementId)

Click a Select menu option.

Parameters
elementId
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3459 of file RESTClient.cs.

◆ SendKey()

IAllowRESTExecution GenerallyPositive.RESTClient.SendKey ( byte vkcode)

Sends a key client.SendKey("Enter").Execute();.

Parameters
keyThe key to send
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3493 of file RESTClient.cs.

◆ SendString()

IAllowRESTExecution GenerallyPositive.RESTClient.SendString ( string text,
int delayMs = 0 )

Sends a string client.SendString("Hello").Execute();.

Parameters
textThe text to send
delayMsInter-character pacing delay in milliseconds. 0 sends the whole string atomically; greater than 0 dispatches character-by-character with this delay between characters.
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3518 of file RESTClient.cs.

◆ SetAttribute()

IAllowRESTAttribute GenerallyPositive.RESTClient.SetAttribute ( string elementId)

Starts setting an attribute of an element by ID client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2470 of file RESTClient.cs.

◆ SetDownloadFilename()

IAllowRESTExecution GenerallyPositive.RESTClient.SetDownloadFilename ( string downloadPath)

Sets the download filename for the current session client.SetDownloadFilename("/path/to/file").Execute();.

Parameters
downloadPathThe download path
Returns

Names where the next download the browser starts should be saved, without clicking anything.

client.SetDownloadFilename("c: emp ile.pdf").Execute();</example> <param name="downloadPath">Where the file is to be saved

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2053 of file RESTClient.cs.

◆ SetRange()

IAllowRangeValue GenerallyPositive.RESTClient.SetRange ( string elementId)

Starts setting an attribute of an element by ID client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2507 of file RESTClient.cs.

◆ SetStorage()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.SetStorage ( WebsiteStorageType storageType)

Set data for the specified storage type.

Parameters
storageType
Returns
fluent interface to chain parameters

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3742 of file RESTClient.cs.

◆ SetUserAgent()

IAllowRESTExecution GenerallyPositive.RESTClient.SetUserAgent ( string userAgent)

Overrides the browser's user agent string client.SetUserAgent("Mozilla/5.0 ...").Execute();.

Parameters
userAgentThe user agent string to use
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3247 of file RESTClient.cs.

◆ SetValueFrom()

IAllowRESTExecution GenerallyPositive.RESTClient.SetValueFrom ( string destSelector)

Sets the value of the destination element identified by destSelector from the source element identified by the preceding WithCss(string) or WithElementId(string) call. client.WithElementId("srcSelector").SetValueFrom("destSelector").Execute();.

Parameters
destSelectorCSS selector identifying the destination element whose value is set
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 3536 of file RESTClient.cs.

◆ StealthOverrideReferrer()

IAllowRESTExecution GenerallyPositive.RESTClient.StealthOverrideReferrer ( )

Overrides referrer stealthily - sets to google.com client.StealthOverrideReferrer().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3551 of file RESTClient.cs.

◆ SubmitForm()

IAllowRESTExecution GenerallyPositive.RESTClient.SubmitForm ( string elementId)

Submits a form client.SubmitForm("form123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3563 of file RESTClient.cs.

◆ SwitchToDefaultContent()

IAllowRESTExecution GenerallyPositive.RESTClient.SwitchToDefaultContent ( )

Switches to default content client.SwitchToDefaultContent().Execute();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3578 of file RESTClient.cs.

◆ SwitchToElement()

IAllowRESTExecution GenerallyPositive.RESTClient.SwitchToElement ( string elementId)

Switches to an element to search for selectors contained client.SwitchToElement("div123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3765 of file RESTClient.cs.

◆ SwitchToFrame()

IAllowRESTExecution GenerallyPositive.RESTClient.SwitchToFrame ( string elementId)

Switches to a frame client.SwitchToFrame("frame123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3781 of file RESTClient.cs.

◆ SwitchToShadowRoot()

IAllowRESTExecution GenerallyPositive.RESTClient.SwitchToShadowRoot ( string elementId)

Switches to a shadow root client.SwitchToShadowRoot("shadow123").Execute();.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3797 of file RESTClient.cs.

◆ TabCount()

IAllowRESTExecution GenerallyPositive.RESTClient.TabCount ( )

How many tabs the browser actually has open, which is not the same as how many GPAL opened. A tab can close itself, which is what a browser does with a tab whose first navigation turns into a download. int tabs = client.TabCount().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 3201 of file RESTClient.cs.

◆ ToGPALObject()

IRESTClient GenerallyPositive.RESTClient.ToGPALObject ( )

Converts the client to a GPAL object.

Returns
The GPAL object

Implements GenerallyPositive.IAllowToGPALObject< TResult >.

Definition at line 1641 of file RESTClient.cs.

◆ TopBrowser()

IAllowRESTExecution GenerallyPositive.RESTClient.TopBrowser ( )

Top the browser, bring it into focus. Used before performing any actions on the browser.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2480 of file RESTClient.cs.

◆ Until()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.Until ( Func< bool > condition)

Executes workflows until condition holds.

Parameters
conditionThe condition function
Returns

Implements GenerallyPositive.IAllowRESTWorkflow.

Definition at line 1732 of file RESTClient.cs.

◆ While()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.While ( Func< bool > condition)

Executes workflows while condition holds client.While(() => someCondition).Execute();.

Parameters
conditionThe condition function
Returns

Implements GenerallyPositive.IAllowRESTWorkflow.

Definition at line 1682 of file RESTClient.cs.

◆ WindowInnerHeight()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowInnerHeight ( )

Gets the window inner height client.WindowInnerHeight().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2548 of file RESTClient.cs.

◆ WindowInnerWidth()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowInnerWidth ( )

Gets the window inner width client.WindowInnerWidth().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2559 of file RESTClient.cs.

◆ WindowOuterHeight()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowOuterHeight ( )

Gets the window outer height client.WindowOuterHeight().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2570 of file RESTClient.cs.

◆ WindowOuterWidth()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowOuterWidth ( )

Gets the window outer width client.WindowOuterWidth().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2581 of file RESTClient.cs.

◆ WindowPageOffsetX()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowPageOffsetX ( )

Gets the window page offset X client.WindowPageOffsetX().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2687 of file RESTClient.cs.

◆ WindowPageOffsetY()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowPageOffsetY ( )

Gets the window page offset Y client.WindowPageOffsetY().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2698 of file RESTClient.cs.

◆ WindowScreenLeft()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowScreenLeft ( )

Gets the window screen left position client.WindowScreenLeft().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2709 of file RESTClient.cs.

◆ WindowScreenTop()

IAllowRESTExecution GenerallyPositive.RESTClient.WindowScreenTop ( )

Gets the window screen top position client.WindowScreenTop().Execute<int>();.

Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2720 of file RESTClient.cs.

◆ WithAPIBase() [1/2]

IAllowRESTEndpointDetails GenerallyPositive.RESTClient.WithAPIBase ( string url)

Sets the API base URL with download path.

Parameters
urlThe base URL
Returns

Implements GenerallyPositive.IAllowRESTEndpoint.

Definition at line 270 of file RESTClient.cs.

◆ WithAPIBase() [2/2]

IAllowRESTEndpointDetails GenerallyPositive.RESTClient.WithAPIBase ( string url,
TimeSpan httpTimeout )

Implements GenerallyPositive.IAllowRESTEndpoint.

Definition at line 276 of file RESTClient.cs.

◆ WithAttribute()

IAllowRESTAttribute GenerallyPositive.RESTClient.WithAttribute ( string attribute)

Specifies the attribute name for get or set operation client.GetAttribute("element123").WithAttribute("value").Execute<string>();.

Parameters
attributeThe attribute name
Returns

Implements GenerallyPositive.IAllowRESTAttribute.

Definition at line 2492 of file RESTClient.cs.

◆ WithBody()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithBody ( string body)

Sets the body of the request being fetched. client.Fetch(url).WithVerb("POST").WithBody(json).Execute();.

Parameters
bodyRequest body
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2627 of file RESTClient.cs.

◆ WithBytes()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithBytes ( bool bytes)

True to bring the fetched response body back base64 encoded, which is what a file needs. Text is the default, and reading a file as text would put a replacement character wherever a byte is not valid utf-8. client.Fetch(url).WithBytes(true).Execute();.

Parameters
bytesTrue for a base64 encoded body, false for text
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2673 of file RESTClient.cs.

◆ WithCallFilter()

IAllowRESTCaptureOptions GenerallyPositive.RESTClient.WithCallFilter ( string urlFragment)

Records only the calls whose url holds this, so a page that talks to a dozen places narrows to the one worth having.

Parameters
urlFragmentRecord only urls holding this
Returns
Fluent interface to narrow what is recorded, or to execute

Implements GenerallyPositive.IAllowRESTCaptureOptions.

Definition at line 2975 of file RESTClient.cs.

◆ WithClearCalls()

IAllowRESTCaptureOptions GenerallyPositive.RESTClient.WithClearCalls ( bool clear = true)

Forgets what was already recorded before starting, so a second capture is not read as the first.

Parameters
clearTrue to start from nothing
Returns
Fluent interface to narrow what is recorded, or to execute

Implements GenerallyPositive.IAllowRESTCaptureOptions.

Definition at line 2990 of file RESTClient.cs.

◆ WithContentType()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithContentType ( string contentType)

Sets the content type of the body of the request being fetched. client.Fetch(url).WithContentType("application/json").Execute();.

Parameters
contentTypeContent type
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2642 of file RESTClient.cs.

◆ WithCss()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithCss ( string css)

Sets the CSS parameter.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 653 of file RESTClient.cs.

◆ WithCssFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithCssFromResult ( int resultIndex)

Sets the CSS from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 667 of file RESTClient.cs.

◆ WithCssFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithCssFromResult ( string name)

Sets the CSS from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 686 of file RESTClient.cs.

◆ WithData()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithData ( string data)

Sets the set storage data parameter.

Parameters
dataThe data to save in storage
Returns

Implements GenerallyPositive.IAllowRESTStorageOptions.

Definition at line 977 of file RESTClient.cs.

◆ WithDeleteAcrossOrigins()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithDeleteAcrossOrigins ( bool crossOrigin)

Implements GenerallyPositive.IAllowRESTStorageOptions.

Definition at line 1062 of file RESTClient.cs.

◆ WithDeltaX()

IAllowRESTDragAndDrop GenerallyPositive.RESTClient.WithDeltaX ( int deltaX)

Sets the horizontal drop offset for a drag-and-drop operation.

Parameters
deltaXThe horizontal offset, in pixels, from the element's current position
Returns

Implements GenerallyPositive.IAllowRESTDragAndDrop.

Definition at line 1875 of file RESTClient.cs.

◆ WithDeltaY()

IAllowRESTDragAndDrop GenerallyPositive.RESTClient.WithDeltaY ( int deltaY)

Sets the vertical drop offset for a drag-and-drop operation.

Parameters
deltaYThe vertical offset, in pixels, from the element's current position
Returns

Implements GenerallyPositive.IAllowRESTDragAndDrop.

Definition at line 1889 of file RESTClient.cs.

◆ WithDeviceName()

IAllowRESTExecution GenerallyPositive.RESTClient.WithDeviceName ( string sinkName)

Sets the CSS parameter.

Parameters
cssThe CSS selector
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1317 of file RESTClient.cs.

◆ WithDownloadFile()

IAllowRESTExecution GenerallyPositive.RESTClient.WithDownloadFile ( string downloadPath)

Implements GenerallyPositive.IAllowRESTWithDownloadFilename.

Definition at line 2058 of file RESTClient.cs.

◆ WithElement()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithElement ( IGPALElement gPALElement)

Sets the element parameter.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 706 of file RESTClient.cs.

◆ WithElementId()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithElementId ( string elementId)

Sets the element ID parameter.

Parameters
elementIdThe element ID
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1782 of file RESTClient.cs.

◆ WithElementIdFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithElementIdFromResult ( int resultIndex)

Sets the element from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 722 of file RESTClient.cs.

◆ WithElementIdFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithElementIdFromResult ( string name)

Sets the element from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 751 of file RESTClient.cs.

◆ WithEncoding()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithEncoding ( ContentEncoding encoding)

Specifiy the encoiding type for posted parameters: json or urlencoded.

Parameters
encoding
Returns

Definition at line 1796 of file RESTClient.cs.

◆ WithEndpoint() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithEndpoint ( ApiEndpoint endpoint)

Sets the endpoint from an ApiEndpoint enum.

Parameters
endpointThe ApiEndpoint enum value
Returns

Implements GenerallyPositive.IAllowRESTEndpointDetails.

Definition at line 300 of file RESTClient.cs.

◆ WithEndpoint() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithEndpoint ( string endpoint)

Sets the endpoint as a string.

Parameters
endpointThe endpoint string
Returns

Implements GenerallyPositive.IAllowRESTEndpointDetails.

Definition at line 287 of file RESTClient.cs.

◆ WithHeader()

IAllowRESTExecution GenerallyPositive.RESTClient.WithHeader ( string name,
string value )

Adds an HTTP header to the request client.WithHeader("Authorization", "Bearer YOUR_ACCESS_TOKEN").Execute();.

Parameters
nameThe header name
valueThe header value
Returns

Implements GenerallyPositive.IAllowRESTExecution.

Definition at line 1817 of file RESTClient.cs.

◆ WithHeaderFromResult() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.WithHeaderFromResult ( int resultIndex)

Sets the header from a result by index.

Parameters
resultIndexThe result index
Returns

Definition at line 1834 of file RESTClient.cs.

◆ WithHeaderFromResult() [2/2]

IAllowRESTExecution GenerallyPositive.RESTClient.WithHeaderFromResult ( string name)

Sets the header from a result by name.

Parameters
nameThe result name
Returns

Definition at line 1854 of file RESTClient.cs.

◆ WithHeaders()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithHeaders ( string[] headers)

Sets extra headers for the request being fetched, flattened to name, value, name, value. client.Fetch(url).WithHeaders(new[] { "Accept", "application/json" }).Execute();.

Parameters
headersHeader names and values in pairs
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2657 of file RESTClient.cs.

◆ WithHPixels()

IAllowRESTScrollElement GenerallyPositive.RESTClient.WithHPixels ( int hPixels)

Sets the horizontal pixels parameter.

Parameters
hPixelsThe horizontal pixels
Returns

Implements GenerallyPositive.IAllowRESTScrollElement.

Definition at line 1931 of file RESTClient.cs.

◆ WithHPixelsFromResult() [1/2]

IAllowRESTScrollElement GenerallyPositive.RESTClient.WithHPixelsFromResult ( int resultIndex)

Sets the horizontal pixels from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1945 of file RESTClient.cs.

◆ WithHPixelsFromResult() [2/2]

IAllowRESTScrollElement GenerallyPositive.RESTClient.WithHPixelsFromResult ( string name)

Sets the horizontal pixels from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1964 of file RESTClient.cs.

◆ WithHttpMethod()

IAllowRESTExecution GenerallyPositive.RESTClient.WithHttpMethod ( string method)

Sets the HTTP method.

Parameters
methodThe HTTP method
Returns

Implements GenerallyPositive.IAllowRESTMethod.

Definition at line 1277 of file RESTClient.cs.

◆ WithIndex()

IAllowRESTAttribute GenerallyPositive.RESTClient.WithIndex ( int index)

Specifies the option index for select menu operations client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.

Parameters
valueThe attribute value
Returns

Definition at line 1303 of file RESTClient.cs.

◆ WithKey()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithKey ( string key)

Sets the key parameter.

Parameters
keyThe key
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 588 of file RESTClient.cs.

◆ WithKeyFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithKeyFromResult ( int resultIndex)

Sets the key from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 603 of file RESTClient.cs.

◆ WithKeyFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithKeyFromResult ( string name)

Sets the key from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 622 of file RESTClient.cs.

◆ WithMaxConnections()

IAllowCheckNetworkIdleOrExecution GenerallyPositive.RESTClient.WithMaxConnections ( int maxConnections)

Sets the maximum connections.

Parameters
maxConnectionsThe maximum connections
Returns

Implements GenerallyPositive.IAllowCheckNetworkIdleOrExecution.

Definition at line 809 of file RESTClient.cs.

◆ WithName()

IAllowRESTEndpointDetails GenerallyPositive.RESTClient.WithName ( string name)

Sets the client name.

Parameters
nameThe client name
Returns

Implements GenerallyPositive.IAllowRESTEndpointDetails.

Definition at line 642 of file RESTClient.cs.

◆ WithOffsetX()

IAllowRESTDragAndDrop GenerallyPositive.RESTClient.WithOffsetX ( int offsetX)

Sets the horizontal grab offset within the element for a drag-and-drop operation.

Parameters
offsetXHorizontal offset, in pixels, within the element to start the drag from
Returns

Implements GenerallyPositive.IAllowRESTDragAndDrop.

Definition at line 1903 of file RESTClient.cs.

◆ WithOffsetY()

IAllowRESTDragAndDrop GenerallyPositive.RESTClient.WithOffsetY ( int offsetY)

Sets the vertical grab offset within the element for a drag-and-drop operation.

Parameters
offsetYVertical offset, in pixels, within the element to start the drag from
Returns

Implements GenerallyPositive.IAllowRESTDragAndDrop.

Definition at line 1917 of file RESTClient.cs.

◆ WithParameters() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithParameters ( object parameters)

Sets parameters as a single object.

Parameters
parametersThe parameters object
Returns

Implements GenerallyPositive.IAllowRESTParameters.

Definition at line 918 of file RESTClient.cs.

◆ WithParameters() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithParameters ( params object[] parameters)

Sets parameters as a variable argument list.

Parameters
parametersThe parameters
Returns

Implements GenerallyPositive.IAllowRESTParameters.

Definition at line 904 of file RESTClient.cs.

◆ WithParametersFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithParametersFromResult ( int resultIndex)

Sets parameters from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParameters.

Definition at line 932 of file RESTClient.cs.

◆ WithParametersFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithParametersFromResult ( string name)

Sets parameters from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParameters.

Definition at line 954 of file RESTClient.cs.

◆ WithPixels()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithPixels ( int pixels)

Sets the pixels parameter.

Parameters
pixelsThe pixels value
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1077 of file RESTClient.cs.

◆ WithPixelsFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithPixelsFromResult ( int resultIndex)

Sets the pixels from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1091 of file RESTClient.cs.

◆ WithPixelsFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithPixelsFromResult ( string name)

Sets the pixels from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1110 of file RESTClient.cs.

◆ WithPruneMs()

IAllowCheckNetworkIdleOrExecution GenerallyPositive.RESTClient.WithPruneMs ( int pruneMs)

Sets the prune interval in milliseconds.

Parameters
pruneMsThe prune interval in milliseconds
Returns

Implements GenerallyPositive.IAllowCheckNetworkIdleOrExecution.

Definition at line 795 of file RESTClient.cs.

◆ WithRangeValue()

IAllowRESTExecution GenerallyPositive.RESTClient.WithRangeValue ( int rangeValue)

Specifies the value for SetRange operation client.SetRange("element123").WithRangeValue(63).Execute();.

Parameters
rangeValueThe range value
Returns

Implements GenerallyPositive.IAllowRangeValue.

Definition at line 2519 of file RESTClient.cs.

◆ WithReferrer()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithReferrer ( string url)

Sets the referrer parameter.

Parameters
urlThe referrer URL
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1130 of file RESTClient.cs.

◆ WithReferrerFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithReferrerFromResult ( int resultIndex)

Sets the referrer from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1144 of file RESTClient.cs.

◆ WithReferrerFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithReferrerFromResult ( string name)

Sets the referrer from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1163 of file RESTClient.cs.

◆ WithResultName()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithResultName ( string name)

Sets the result name for the next execution.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTEndpointDetails.

Definition at line 463 of file RESTClient.cs.

◆ WithScript()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithScript ( string script)

Sets the script parameter.

Parameters
scriptThe script
Returns

Definition at line 576 of file RESTClient.cs.

◆ WithSelectIndex()

IAllowRESTExecution GenerallyPositive.RESTClient.WithSelectIndex ( int selectIndex)

Implements GenerallyPositive.IAllowSelectOptions.

Definition at line 3479 of file RESTClient.cs.

◆ WithSelectValue()

IAllowRESTExecution GenerallyPositive.RESTClient.WithSelectValue ( string selectValue)

Set the value to choose from the Select menu.

Parameters
value
Returns

Implements GenerallyPositive.IAllowSelectOptions.

Definition at line 3471 of file RESTClient.cs.

◆ WithStorageDomain()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithStorageDomain ( string domain)

Sets the storage domain parameter.

Parameters
domainThe domain
Returns

Implements GenerallyPositive.IAllowRESTStorageOptions.

Definition at line 1007 of file RESTClient.cs.

◆ WithStorageKey()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithStorageKey ( string key)

Sets the storage key parameter.

Parameters
keyThe path
Returns

Implements GenerallyPositive.IAllowRESTStorageOptions.

Definition at line 1052 of file RESTClient.cs.

◆ WithStoragePath()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithStoragePath ( string path)

Sets the storage path parameter.

Parameters
pathThe path
Returns

Implements GenerallyPositive.IAllowRESTStorageOptions.

Definition at line 1022 of file RESTClient.cs.

◆ WithStorageStoreName()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithStorageStoreName ( string storeName)

Sets the storage domain parameter.

Parameters
domainThe domain
Returns

Implements GenerallyPositive.IAllowRESTStorageOptions.

Definition at line 992 of file RESTClient.cs.

◆ WithStorageType()

IAllowRESTStorageOptions GenerallyPositive.RESTClient.WithStorageType ( WebsiteStorageType storageType)

Sets the storage path parameter.

Parameters
pathThe path
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1037 of file RESTClient.cs.

◆ WithTabId()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithTabId ( int tabId)

Sets the tab ID parameter.

Parameters
tabIdThe tab ID
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 525 of file RESTClient.cs.

◆ WithTabIdFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithTabIdFromResult ( int resultIndex)

Sets the tab ID from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 537 of file RESTClient.cs.

◆ WithTabIdFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithTabIdFromResult ( string name)

Sets the tab ID from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 556 of file RESTClient.cs.

◆ WithText()

IAllowRESTExecution GenerallyPositive.RESTClient.WithText ( string text)

Sets the text parameter.

Parameters
textThe text
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1183 of file RESTClient.cs.

◆ WithTextFromResult() [1/2]

IAllowRESTExecution GenerallyPositive.RESTClient.WithTextFromResult ( int resultIndex)

Sets the text from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1197 of file RESTClient.cs.

◆ WithTextFromResult() [2/2]

IAllowRESTExecution GenerallyPositive.RESTClient.WithTextFromResult ( string name)

Sets the text from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1216 of file RESTClient.cs.

◆ WithTimeoutMs()

IAllowCheckNetworkIdleOrExecution GenerallyPositive.RESTClient.WithTimeoutMs ( int timeoutMs)

Sets the timeout in milliseconds.

Parameters
timeoutMsThe timeout in milliseconds
Returns

Implements GenerallyPositive.IAllowCheckNetworkIdleOrExecution.

Definition at line 781 of file RESTClient.cs.

◆ WithUploadFile()

IAllowRESTExecution GenerallyPositive.RESTClient.WithUploadFile ( string uploadPath)

Sets the timeout in milliseconds.

Parameters
timeoutMsThe timeout in milliseconds
Returns

Implements GenerallyPositive.IAllowRESTWithUploadFilename.

Definition at line 823 of file RESTClient.cs.

◆ WithUploadFiles()

IAllowRESTExecution GenerallyPositive.RESTClient.WithUploadFiles ( GPALFile uploadPaths)

Sets the timeout in milliseconds.

Parameters
timeoutMsThe timeout in milliseconds
Returns

Implements GenerallyPositive.IAllowRESTWithUploadFilename.

Definition at line 837 of file RESTClient.cs.

◆ WithUrl()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithUrl ( string url)

Sets the URL parameter.

Parameters
urlThe URL
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 474 of file RESTClient.cs.

◆ WithUrlFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithUrlFromResult ( int resultIndex)

Sets the URL from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 486 of file RESTClient.cs.

◆ WithUrlFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithUrlFromResult ( string name)

Sets the URL from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 505 of file RESTClient.cs.

◆ WithValue()

IAllowRESTAttribute GenerallyPositive.RESTClient.WithValue ( string value)

Specifies the value for set operation client.SetAttribute("element123").WithAttribute("disabled").WithValue("true").Execute();.

Parameters
valueThe attribute value
Returns

Implements GenerallyPositive.IAllowRESTAttribute.

Definition at line 2534 of file RESTClient.cs.

◆ WithVerb()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithVerb ( string method)

Sets the verb of the request being fetched. Not .WithHttpMethod, which is the verb of the REST call itself. GET when nothing was said. client.Fetch(url).WithVerb("POST").Execute();.

Parameters
methodHTTP verb for the fetched request
Returns

Implements GenerallyPositive.IAllowRestMethods.

Definition at line 2612 of file RESTClient.cs.

◆ WithVPixels()

IAllowRESTScrollElement GenerallyPositive.RESTClient.WithVPixels ( int vPixels)

Sets the vertical pixels parameter.

Parameters
vPixelsThe vertical pixels
Returns

Implements GenerallyPositive.IAllowRESTScrollElement.

Definition at line 1984 of file RESTClient.cs.

◆ WithVPixelsFromResult() [1/2]

IAllowRESTScrollElement GenerallyPositive.RESTClient.WithVPixelsFromResult ( int resultIndex)

Sets the vertical pixels from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 1998 of file RESTClient.cs.

◆ WithVPixelsFromResult() [2/2]

IAllowRESTScrollElement GenerallyPositive.RESTClient.WithVPixelsFromResult ( string name)

Sets the vertical pixels from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 2017 of file RESTClient.cs.

◆ WithWindowId()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithWindowId ( int windowId)

Sets the window ID parameter client.CloseWindow(123).Execute<WindowTuple>();.

Parameters
windowIdThe window ID
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 3590 of file RESTClient.cs.

◆ WithWindowIdFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithWindowIdFromResult ( int resultIndex)

Sets the window ID from a result by index client.GoToWindow().WithWindowIdFromResult(0).Execute<WindowTuple>();.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 3602 of file RESTClient.cs.

◆ WithWindowIdFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithWindowIdFromResult ( string name)

Sets the window ID from a result by name client.GoToWindow().WithWindowIdFromResult("windowResult").Execute<WindowTuple>();.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 3621 of file RESTClient.cs.

◆ WithWorkflow()

IAllowRESTWorkflow GenerallyPositive.RESTClient.WithWorkflow ( Action< RESTClient > workflow)

Adds a workflow definition client.WithWorkflow(c => c.WithEndpoint(...).Execute()).While(...);.

Parameters
workflowThe workflow action
Returns

Implements GenerallyPositive.IAllowRESTWorkflow.

Definition at line 1661 of file RESTClient.cs.

◆ WithXPath()

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithXPath ( string xpath)

Sets the XPath parameter.

Parameters
xpathThe XPath
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 851 of file RESTClient.cs.

◆ WithXPathFromResult() [1/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithXPathFromResult ( int resultIndex)

Sets the XPath from a result by index.

Parameters
resultIndexThe result index
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 865 of file RESTClient.cs.

◆ WithXPathFromResult() [2/2]

IAllowRESTParametersOrExecution GenerallyPositive.RESTClient.WithXPathFromResult ( string name)

Sets the XPath from a result by name.

Parameters
nameThe result name
Returns

Implements GenerallyPositive.IAllowRESTParametersOrExecution.

Definition at line 884 of file RESTClient.cs.

Property Documentation

◆ Name

string GenerallyPositive.RESTClient.Name
getset

Gets or sets the client name.

Implements GenerallyPositive.IRESTClient.

Definition at line 259 of file RESTClient.cs.

◆ StatusCode

int GenerallyPositive.RESTClient.StatusCode
get

Definition at line 72 of file RESTClient.cs.


The documentation for this class was generated from the following file: