Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+2
person also asked this
people also asked this
Replies
23 replies
Subscribers
11 subscribers
Views
16763 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
FitnesseFor Appian
Anu
over 8 years ago
Hi All,
I have a button before my login page which is nothing but a certificate page . I just want to click that button{I Agree} and proceed to my login screen . Here is my error and script . Please help!!
2016-12-15 16:42:14,473 [main] DEBUG com.appiancorp.ps.automatedtest.tempo.interfaces.TempoButton - WAIT FOR BUTTON [I Agree]
2016-12-15 16:43:15,098 [main] ERROR com.appiancorp.ps.automatedtest.exception.ExceptionBuilder - Wait for Button - I Agree
org.openqa.selenium.TimeoutException: Timed out after 60 seconds waiting for presence of element located by: By.xpath: //button[contains(translate(text(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),'i agree') and not(contains(@class, 'button-disabled'))]
--------------------------------------------------------------------------------
Script:-
!*** CLick on AGree and go to login page
!| script |
|set timeout seconds to|60 |
|click o...
OriginalPostID-253067
Discussion posts and replies are publicly visible
Top Replies
lucasj
over 8 years ago
+2
A Score Level 2
Hi Anushri, Try using "login with terms with username" rather than "login with username". This should work by itself without the need to tell FitNesse to click on the "I Agree" button
0
chandu
A Score Level 2
over 8 years ago
I afraid it wont, Please let me know
| verify button|I Agree| is present| does this test case has been passed. if it is passed then the Click action should perform. I guess this is failed. The button "I Agree" xpath is not captured it seems. need to see work around for that. These type of scenarios are common for specific clients.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Anu
over 8 years ago
Hi chandrasekharg, yes | verify button|I Agree| is present| this test cases failed . Please can you provide a work around . It would be great . Thanku in advance !
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Anu
over 8 years ago
Also, if these type of scenarios are common then how do they handle. do you have any idea or suggestions ?? ? Please advise
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandu
A Score Level 2
over 8 years ago
Well Anushris, This is my assumption only, may the I Agree is not a button instead it might be a link but I'm not sure. but please try this
| verify link | I Agree | is present |
| click on link | I Agree |
Lets check the fortune with the above code. If the verification is passed it sure it will click the link.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Anu
over 8 years ago
Hi chandrasekharg, Tried above code but no luck .. Also, it looks like a button . Below is the HTML which says type = "button"
<input class="btn primary" onclick="acceptTermsOfService()" type="button" value="I Agree">
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Anu
over 8 years ago
Hi bene , One quick question . How do we add our own custom function to the existing Fitnesse appian library? Please suggest .
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Ben Edwards
A Score Level 3
over 8 years ago
I'd agree with Chandra's idea above. Try replacing
| verify link |I Agree| is present |
with
| verify button |I Agree| is present |
Also do the same with the click statement.
As for custom functions, you can create a jar (typically placed in the /lib folder in the Fitnesse folder structure) that can be imported as a Fixture in automated tests that. You can see an example of how the given 'TempoFixture' is imported in the cheat sheet included in your Fitnesse implementation's documentation (typically at
localhost:8980/FitNesseForAppian.CheatSheet)
. Check out the Fitnesse Full Reference Guide to see plenty of examples of source code for Fixtures:
www.fitnesse.org/FitNesse.FullReferenceGuide
.
Hopefully this helps some. If I can think of a good way to show a simple example of writing a Fixture I'll try to share. I'm not sure it's necessary for this scenario though because it seems like you just need to click a button. Did you try the 'screenshot' statement and get a good picture of what was happening at this moment?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandu
A Score Level 2
over 8 years ago
The problem here is FitNesse is not able to Identifying the I Agree button. This happens some times that the object's Xpath cannot be identified in typical cases. In this case its not very complex, its a simple button that is unique through out the web page that is currently displayed.
Anushri, the I Agree button is displayed in popup to the User? If yes Does FitNesse handle popup button. I haven't worked on that. Will do.
The below may be already verified please do check if you missed any.
1.Try executing manually, please note time taking to display the page completely(this includes visible of I Agree button), Add the above noted Wait time+15 seconds in the Script.
2.Please check the Page/URL that is currently under the Test(while performing click action on I Agree button). Are you on the same page while the below script is running(This looks silly but worth checking)
!*** CLick on AGree and go to login page
!| script |
|set timeout seconds to|60 |
|click on button |I Agree|
***!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Anu
over 8 years ago
Hi chandra,
I Agree button is displayed in popup to the User? [Anu]Looks like a page with one button [I Agree] at bottom right corner .
1.Try executing manually, please note time taking to display the page completely(this includes visible of I Agree button), Add the above noted Wait time+15 seconds in the Script.[Anu] No luck
2.Please check the Page/URL that is currently under the Test(while performing click action on I Agree button). Are you on the same page while the below script is running.[Anu] Yes, I am on the same page . URL doesn't change when u hit [I agree] button and go to login Page . Its just the same .
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
chandu
A Score Level 2
over 8 years ago
Seems bit tricky may be we can have a webEx session for this.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
<
>