# Trying to select a disabled class

**URL:** <https://forums.distill.io/t/trying-to-select-a-disabled-class/2281>\
**Category:** Help and Support\
**Created:** [July 20, 2023, 2:46pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281 "2023-07-20T14:46:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![armadillon](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@armadillon](https://forums.distill.io/u/armadillon)\
**Post date:** [July 20, 2023, 2:46pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/1 "2023-07-20T14:46:23Z")

</div>

Site is: [Recreation.gov - Camping, Cabins, RVs, Permits, Passes & More](https://www.recreation.gov/permits/233262/registration/detailed-availability?date=2023-07-22&type=overnight-permit)

I have a macro that runs and selects options on the calendar: Type of Camping (overnight), Date (7/22), Guests (2)

Currently there are no reservations, and there is no element to select in the visual selector. In Chrome I inspect it, and it’s a disabled class.

If you could help me out with what exactly to type…I just need to get notified if that button becomes available to select/becomes something other than zero.

Thank you!

I’m not much of a coder, so this is a bit difficult for me.

 ![2023-07-20 09_42_06-Recreation.gov - Camping, Cabins, RVs, Permits, Passes & More](https://forums.distill.io/uploads/default/original/1X/c8189e5ec561144a6423d3559d9c1b0bd46dae75.png)

![2023-07-20 09_44_02-Untitled - Paint](https://forums.distill.io/uploads/default/original/1X/086cc31ba35fdcbb6352a81a7da3312aa8effad4.png)

---

<div class="post-metadata">

**Author:** ![ajitk](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/ec9cab/32.png) [@ajitk](https://forums.distill.io/u/ajitk)\
**Post date:** [July 20, 2023, 4:32pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/2 "2023-07-20T16:32:08Z")

</div>

Hello @armadillon, welcome to the forum.

When using the Visual Selector, are you able to select the element that contains the disabled button? If yes, can you save that selection and share the config with me? I can then try to show you how to modify the selection and its settings.

---

<div class="post-metadata">

**Author:** ![armadillon](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@armadillon](https://forums.distill.io/u/armadillon)\
**Post date:** [July 20, 2023, 5:15pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/3 "2023-07-20T17:15:12Z")

</div>

I could only select the following (John Muir):

 ![2023-07-20 09_42_06-Recreation.gov - Camping, Cabins, RVs, Permits, Passes & More](https://forums.distill.io/uploads/default/original/1X/0ca2868f6b79d7989238454a17100d9d54bb3911.png)  
`(//div[@id='page-content']//div//div[contains(@class,'sarsa-stack')]/div[@class='sarsa-box']//div//div[@role='grid']/div[@role='row']/div[@role='gridcell'])[133]`

**Then I expanded once like so (entire row selected):**

 ![2023-07-20 09_44_02-Untitled - Paint](https://forums.distill.io/uploads/default/original/1X/8bcdcd7675d9b2204f395b5c563aa6e2cfb92432.png)  
`(//div[@id='page-content']//div//div[contains(@class,'sarsa-stack')]/div[@class='sarsa-box']//div//div[@role='grid']/div[@role='row'])[13]`

---

<div class="post-metadata">

**Author:** ![armadillon](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@armadillon](https://forums.distill.io/u/armadillon)\
**Post date:** [July 20, 2023, 5:19pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/4 "2023-07-20T17:19:45Z")

</div>

This is the button next to it, which IS selectable, but this is **not** the date I need:

 ![2023-07-20 12_16_51-Recreation.gov - Camping, Cabins, RVs, Permits, Passes & More](https://forums.distill.io/uploads/default/original/1X/7cf55c2243d9d0a8bb04da4455937ec457ed71b3.png)  
`(//div[@id='page-content']//div//div[contains(@class,'sarsa-stack')]/div[@class='sarsa-box']//div//div[@role='grid']/div[@role='row']/div[contains(@class,'available')]//button[contains(@class,'sarsa-button')])[102]`

For the data I need, my cursor shows that I am unable to select the element I need, the grey box with the zero:

 ![2023-07-20 12_19_16-Recreation.gov - Camping, Cabins, RVs, Permits, Passes & More](https://forums.distill.io/uploads/default/original/1X/a12cb5199f16b494fd3dc3c48f5caa4e372e30ad.png)

---

<div class="post-metadata">

**Author:** ![armadillon](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@armadillon](https://forums.distill.io/u/armadillon)\
**Post date:** [July 20, 2023, 5:28pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/5 "2023-07-20T17:28:24Z")

</div>

Hopefully not an overload of information/images, but did an inspect on the boxes in Chrome for you:

 ![2023-07-20 12_25_10-Recreation.gov - Camping, Cabins, RVs, Permits, Passes & More](https://forums.distill.io/uploads/default/original/1X/18aa8c085dd63a86833c45d0f014b492bafa2e1f.png)

 ![2023-07-20 12_26_38-](https://forums.distill.io/uploads/default/original/1X/a99ab00de22463b3a7b4d95632bc7b3aef1e8eb4.png)

---

<div class="post-metadata">

**Author:** ![ajitk](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/ec9cab/32.png) [@ajitk](https://forums.distill.io/u/ajitk)\
**Post date:** [July 21, 2023, 1:20am UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/6 "2023-07-21T01:20:47Z")

</div>

Thanks for the detailed information.

> [@armadillon](#):
>
> This is the button next to it, which IS selectable, but this is **not** the date I need:
> 
> `(//div[@id='page-content']//div//div[contains(@class,'sarsa-stack')]/div[@class='sarsa-box']//div//div[@role='grid']/div[@role='row']/div[contains(@class,'available')]//button[contains(@class,'sarsa-button')])[102]`
> 
> For the data I need, my cursor shows that I am unable to select the element I need, the grey box with the zero:

I changed the number `102` in the XPath to `101` to update the XPath to the following:

`(//div[@id='page-content']//div//div[contains(@class,'sarsa-stack')]/div[@class='sarsa-box']//div//div[@role='grid']/div[@role='row']/div[contains(@class,'available')]//button[contains(@class,'sarsa-button')])[101]`

This selects the disabled button and monitor’s its count of available slots for changes. Can you try using this and see if this works for your use case?

We will also look into making selecting disabled buttons easier.

---

<div class="post-metadata">

**Author:** ![armadillon](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/90db22/32.png) [@armadillon](https://forums.distill.io/u/armadillon)\
**Post date:** [July 21, 2023, 4:35pm UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/7 "2023-07-21T16:35:34Z")

</div>

I THINK it’s working, but I really won’t know unless a spot opens up, of course. Which, it may never actually open up OR a spot may open up in the permit reservation system and then it would quickly get booked.

I’ve tested my Macro out and it works, but hopefully it does see the button.

I really appreciate your assistance on this! It’s truly a clever Chrome extension.

---

<div class="post-metadata">

**Author:** ![ajitk](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/ec9cab/32.png) [@ajitk](https://forums.distill.io/u/ajitk)\
**Post date:** [July 25, 2023, 4:38am UTC](https://forums.distill.io/t/trying-to-select-a-disabled-class/2281/8 "2023-07-25T04:38:11Z")

</div>

As a test, try monitoring a larger section. Selecting the full row or multiple rows could trigger a change sooner.
