Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/types/src/browser-proxy/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const enum BrowserProxyActions {
getText = 'getText',
elementIdSelected = 'elementIdSelected',
makeScreenshot = 'makeScreenshot',
makeElementScreenshot = 'makeElementScreenshot',
uploadFile = 'uploadFile',
end = 'end',
kill = 'kill',
Expand Down
8 changes: 5 additions & 3 deletions core/types/src/browser-proxy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export type ShadowCssSelector = {
isShadowElement: true;
};

export type Selector =
export type Selector =
| XpathSelector
| ShadowCssSelector;

export const isXpathSelector = (selector: Selector): selector is XpathSelector =>
export const isXpathSelector = (selector: Selector): selector is XpathSelector =>
selector.type === 'xpath';

export const isShadowCssSelector = (selector: Selector): selector is ShadowCssSelector =>
export const isShadowCssSelector = (selector: Selector): selector is ShadowCssSelector =>
selector.type === 'shadow-css';

export interface IBrowserProxyController {
Expand Down Expand Up @@ -175,6 +175,8 @@ export interface IBrowserProxyPlugin {

makeScreenshot(applicant: string): Promise<string | void>;

makeElementScreenshot(applicant: string, selector: Selector, scroll?: boolean): Promise<string | void>;

uploadFile(applicant: string, filePath: string): Promise<string | void>;

getCssProperty(
Expand Down
Loading