how to click this button?

69 views
Skip to first unread message

medv...@gmail.com

unread,
Jun 19, 2017, 10:17:40 AM6/19/17
to Geb User Mailing List
hi,

could anyone please help me?

I need to click this button

<span style="padding: 0px 10px;id="abc-customer">
<comp-svg params="{ name: 'user' }class="neo-icon neo-icon--sm neo-icon--white">
<svg data-bind="css: setClasses()class="svg svg--user svg--color-undefined">
<use xlink:href="https://test.abc.com/.resources/abc-ui/webresources/assets/svg/sprite.svg#userdata-bind="attr: { 'xlink:href': getSpriteUrl() }"/>
</svg>
</comp-svg>

but I do not have any success, tried e.g.

userMenuButton (required: false) { $("span", id:"hybris-customer").$("comp-svg").find("use")

using << Keys.ENTER, it does not work.

any idea?

thanks in advance!

Marcin Erdmann

unread,
Jun 21, 2017, 5:00:00 PM6/21/17
to Geb User Mailing List
Hi,

Does your selector even work? Is it returning a non-empty navigator or is it returning an empty one and that's why you have "required: false" in your content definition? What does "I do not have any success" mean? Are you getting an error or does nothing happen?

Marcin

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/7ba1c922-7692-49af-ad1a-5e3f5c6e542c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

medv...@gmail.com

unread,
Jun 22, 2017, 7:48:03 AM6/22/17
to Geb User Mailing List
Hi Marcin,

nothing happens, I do not get any error.

I tried also

   def menuButton = $("span", id:"hybris-customer")

menuButton.click()

interact { click menuButton}

menuButton << Keys.ENTER

but the button is not clicked, although it is displayed.

Do you have any idea what to click seeing the html code?

Thank you very much,
Roland


On Wednesday, June 21, 2017 at 11:00:00 PM UTC+2, Marcin Erdmann wrote:
Hi,

Does your selector even work? Is it returning a non-empty navigator or is it returning an empty one and that's why you have "required: false" in your content definition? What does "I do not have any success" mean? Are you getting an error or does nothing happen?

Marcin
On Mon, Jun 19, 2017 at 3:17 PM, <medv...@gmail.com> wrote:
hi,

could anyone please help me?

I need to click this button

<span style="padding: 0px 10px;id="abc-customer">
<comp-svg params="{ name: 'user' }class="neo-icon neo-icon--sm neo-icon--white">
<svg data-bind="css: setClasses()class="svg svg--user svg--color-undefined">
<use xlink:href="https://test.abc.com/.resources/abc-ui/webresources/assets/svg/sprite.svg#userdata-bind="attr: { 'xlink:href': getSpriteUrl() }"/>
</svg>
</comp-svg>

but I do not have any success, tried e.g.

userMenuButton (required: false) { $("span", id:"hybris-customer").$("comp-svg").find("use")

using << Keys.ENTER, it does not work.

any idea?

thanks in advance!

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.

Marcin Erdmann

unread,
Jun 22, 2017, 5:45:19 PM6/22/17
to geb-...@googlegroups.com
No, I have no idea what to click based on what you posted because what you click on is not an input or a button and I have no idea what your js click events are bound to.

medv...@gmail.com

unread,
Jun 23, 2017, 9:49:04 AM6/23/17
to Geb User Mailing List
I am using chrome now instead of phantomJS, as it seems the redesigned webpage has issues with phantomJS.
userMenuButton (required: false) { $("span", id:"hybris-customer") }

assert(masterModule.userMenuButton.displayed)

is true, but I get the following error message:

groovy.lang.MissingPropertyException: No such property: click for class: geb.navigator.NonEmptyNavigator
    Possible solutions: class
        at geb.navigator.NonEmptyNavigator.propertyMissing(NonEmptyNavigator.groovy:583)
        at geb.content.TemplateDerivedPageContent.propertyMissing(TemplateDerivedPageContent.groovy:88)

when I want to click it:

masterModule.userMenuButton.click

Any idea what is wrong? Why I cannot click this button?

Thank you,
Roland

Marcin Erdmann

unread,
Jun 23, 2017, 1:34:36 PM6/23/17
to geb-...@googlegroups.com
click is not a property, it's a method

Reply all
Reply to author
Forward
0 new messages