New answers tagged

0

Just use keyboard TAB key to switch bitween the elements on the layer and then press the space or enter key to perform the click event.


1

If you want to click the element, then you have use the button tag: the xpath for the highlighted '+' sign is (//div[@class="traveler-selector-room-data target-clone-field"]//button[@class="uitk-step-input-button uitk-step-input-plus"] )[1] you can just change the number to 2, or 3 to get the other two. Approach i took: 1) Find the parent element which ...


0

Welcome to the site. It seems the structure is a bit unclear because with "Adults" there's no "div wrapper" like there's with e.g. "Children": So I found it easier to define it using not(): //div[@class="traveler-selector-room-data target-clone-field"]/div[not(contains(@class, "children")) and not(contains(@class, "infants"))]//button[contains(@class, "...


0

Just as a general advice, try to subdivide your application when lookin for selectors. I'll try to explain using the css selector since those tend to be a) more performant, b) more readable and c) allow you to transfer it to xpath on your own. #traveler-selector-hp-package .traveler-selector-room-data>div:not(.children-wrapper):not(.infants-wrapper) ...


1

I could not interact with the checkbox using click(), but could send the space key to the input element. For example: driver.FindElement(by).SendKeys(Keys.Space)


Top 50 recent answers are included