Share
Go down
DLina
Posts : 6
Join date : 2012-05-07
Age : 31
Location : Netherlands, Gouda

Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 3:18 pm
Hello all,

I have read the following topic in this forum and i think it has some similarities with my "problem":
http://seleniumforum.forumotion.net/t1096-cannot-click-on-button

First, I need to indicate that I have no real testing background but I do understand the use of Selenium IDE in basic.
Second, the problem is about the triggering of an event that is behind a button / link.

A scenario description for my problem:
- I do a login (which works marvously by the way Wink)
- I click a menu item (plays well)
- I click a button on the page (which is in a table by the way) and it lights up, but that's it.

The button has a changeonevent behind it and it should load a new page. (it is the beginning of a microflow)

The options I have already tried:

command: click
target: //td/div/div/div/div/span

command: clickAndWait
command: fireOnEvent

Mostly, I use the commands waitForPageToLoad instead of using AndWait.

Also, I tried to use the xpath and other locators but it does light up so it can be found, it just won't "click".

Can anyone help me out? If you need more info, and I guess you do, please ask. I do not know what you all need to hear to figure this one out.

Thank you all in advance!
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 4:26 pm
Try to use clickAt instead of click command.
If it doesn't works then please share HTML of that particular button.

_________________
Radical QA
http://radical-qa.blogspot.in/
DLina
Posts : 6
Join date : 2012-05-07
Age : 31
Location : Netherlands, Gouda

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 5:06 pm
thanks for the quick reply,

what value do i give this clickAt, 0,0 or something else?
EDIT: clickAt with value (0,0) does the same as always, only highlighting the element, not triggering it.

The HTML:
Code:

<tr class="mendixFormView_tableRow " mxid="1433463">
<td class="mendixFormView_tableData mendixFormView_nodeWrapper " style="width:25%;text-align: center;">
<div id="mendix_widget_MxButton_0" class="dijitInline mendix_Button mendix_Button_link MxClient_contentButton MxClient_Focus" mxid="1433465" focusindex="0" title="Indiensttredingsformulier" widgetid="mendix_widget_MxButton_0" tabindex="0" style="-moz-user-select: none;">
<div class="mendix_Button_left">
<div class="mendix_Button_right">
<div class="mendix_Button_content">
<img class="dijitInline mendix_Button_image" dojoattachpoint="imageNode" style="display: none;">
<span class="dijitInline mendix_Button_caption MxClient_Focus" dojoattachpoint="captionNode" style="background-color: transparent;">Indiensttredingsformulier</span>
</div>
</div>
</div>
</div>
</td>


Last edited by DLina on Mon May 07, 2012 5:12 pm; edited 1 time in total (Reason for editing : Code unreadable)
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 5:32 pm
trying to click on button 'Indiensttredingsformulier' ??
If yes then try to use below command

clickAt | //span[text()='Indiensttredingsformulier']

clickAt | //span[contains(text(),'Indiensttredingsformulier')]

_________________
Radical QA
http://radical-qa.blogspot.in/
DLina
Posts : 6
Join date : 2012-05-07
Age : 31
Location : Netherlands, Gouda

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 5:40 pm
Yes correct, I want to click on the button 'Indiensttredingsformulier'.

I tried to two options above and both do light it up again, but still it isn't triggered. The next page isn't loaded. But it seems that there are a lot of options to locate the button.

Is there something else i can try?
avatar
rohit13
Master
Master
Posts : 180
Join date : 2012-03-29
Age : 31
Location : INDIA
http://radical-qa.blogspot.in/

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 5:53 pm
Is it possible for you to share URL of application Or you can email me the URL?

_________________
Radical QA
http://radical-qa.blogspot.in/
DLina
Posts : 6
Join date : 2012-05-07
Age : 31
Location : Netherlands, Gouda

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 6:27 pm
I am sorry, but I can't give you the URL for this. You need to login to get there and because of legal issues I can't give this to you. Nothing personal tough.

But does this mean that it can't be figured out with the html I provided. Maybe some other trigger option?

Is it maybe possible to simulate a click by first finding the element followed by an enter keypress?
ccox
Master
Master
Posts : 205
Join date : 2012-01-06
Age : 32
Location : Denver, CO

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 9:14 pm
Just curious, could you try clicking the button twice?
DLina
Posts : 6
Join date : 2012-05-07
Age : 31
Location : Netherlands, Gouda

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Mon May 07, 2012 10:31 pm
Both the doubleClick command or twice the same click command do not give any result, except that the element is now lighten up twice...
DLina
Posts : 6
Join date : 2012-05-07
Age : 31
Location : Netherlands, Gouda

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

on Tue May 08, 2012 7:00 pm
Hi all,

I have managed to have a test login for our application.
If someone thinks he / she can help us out and has the time to give it a try, please contact me and i will provide you with the URL and login.

The problem occurs with every 'button' and it makes testing the application very tricky/confusing... certainly not 'automated'.
Sponsored content

Re: Using selenium for testing Mendix application, but cannot click a button that triggers a change on event.

Back to top
Permissions in this forum:
You cannot reply to topics in this forum