Selenium cd.FindElementByClass("").Click

tjdrake

New Member
Joined
Aug 2, 2022
Messages
19
Office Version
  1. 2021
Platform
  1. Windows
Greetings! I am struggling with getting proper item to action on my click event.

Context: I have been able to locate, or I think that I have, the appropriate item to click... Looking at the button class "css-z4yfkz", I'm able to click it. However, rather than getting the Day-Of Ops Plan, the Pick Orders gets downloaded... So I noticed while watching the item, when I click the Day-Of Ops Plan button, another class item quickly opens, which I've been able to snag.

So, at the bottom of the page, I'm attempting to click the "Day-Of Ops" Plan button.
1694631579964.png


When using the cd.FindElementByClass ("css-z4yfkz").Click, I'm getting the "Pick Order" button, i.e. downloaded file...

1694631502383.png


What I have found through further review, is that when I click the "Day-Of Ops Plan" button, a subsequent class object appears "css-5ssczt". However, without the click, I'm unable to locate it. So I attempted to sequence consecutive clicks w/o success.
cd.FindElementByClass ("css-z4yfkz").Click
cd.FindElementByClass ("css-5ssczt").Click

1694631891946.png


Is there a method for getting to this item, such that I can click it? I've temporarily generated a workaround using the SeleniumWrapper.Keys, but this is not a good long term solution.

As a note, I got the same result using cd.FindElementByXPath("//button[@class ='css-z4yfkz']").Click

Thank you, in advance, for your time and contribution.
 
Last edited:

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
My temporary answer is to use SendKeys as follows. It works...
  • cd.FindElementByXPath("//button[@class ='css-z4yfkz']").SendKeys("{TAB}{ENTER}").Click
 
Upvote 0
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top