# custom$

The `custom$` allows you to use a custom strategy declared by using `browser.addLocatorStrategy`. Read more on custom selector stratgies in the [Selector docs](/docs/selectors.md#custom-selector-strategies).

## Usage[​](#usage "Direct link to Usage")

```
await browser.custom$(strategyName, strategyArguments)
```

## Parameters[​](#parameters "Direct link to Parameters")

| Name                | Type     | Details |
| ------------------- | -------- | ------- |
| `strategyName`      | `string` |         |
| `strategyArguments` | `*`      |         |

## Examples[​](#examples "Direct link to Examples")

customStrategy.js

```
loading...
```

[View on GitHub](https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/customStrategy.js#L2-L11)

example.html

```
loading...
```

[View on GitHub](https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/example.html#L8-L12)

customStrategy.js

```
loading...
```

[View on GitHub](https://github.com/webdriverio/example-recipes/blob/f5730428ec3605e856e90bf58be17c9c9da891de/queryElements/customStrategy.js#L16-L19)

example.js

```
it('should fetch the project title', async () => {
    await browser.url('https://webdriver.io')
    browser.addLocatorStrategy('myStrat', (selector) => {
        return document.querySelectorAll(selector)
    })

    const projectTitle = await browser.custom$('myStrat', '.projectTitle')

    console.log(await projectTitle.getText()) // WEBDRIVER I/O
})
```

## Returns[​](#returns "Direct link to Returns")

* **\<WebdriverIO.Element>**
