Closed lukeis closed 8 years ago
Please send questions about test code architecture to the selenium user list [1]
[1] https://groups.google.com/forum/#!forum/selenium-users
Reported by barancev
on 2013-08-08 07:28:48
Invalid
barancev: This code is working fine if I took all function in single fine.
This rule out the fact that code have some issues.
As far as architecture concerned agreed this might not be standard way to develop some
app/project/framework but my concerned is: whatever way I have implemented follows
Java OOPs rule. I am not violating any Java rule and any Java code will run based on
the approached I followed.
Certainly I can follow up with Selenium user forum, but I am not convenience that architecture
issue causing Selenium webdriver to pick another URL rather than expected one.
Actually, once you click on submit button on site, than application is designed to
perform two action on one submit button. And webdriver is picking second url while
expected to pick first url. (Second url option is not visible on UI, so manually none
of the user can not hit second url, but selenium is doing.)
I understand this is open forum and you have control on it.
I can not discuss more on this issue and convince you more as your decision will be
having more weight-age and my issue is a edge case.
Reported by ashv.sharma
on 2013-08-08 10:27:50
You say this is a bug. However, you've not shown us where we can go to reproduce the
same thing.
I'd also kindly ask why are you using an old version of Selenium? You mentioned two
OS'es...which one does this happen on?
You mention the "submitting form gets confused"...by this I assume when you run "SubmitForm()"...so
the first thing to try is to ensure it's the element you expect it and also check there
are no other elements matching the same selector.
So I'd make:
Driver.findElement(By.cssSelector("button.search"));
into:
Driver.findElements(By.cssSelector("button.search"));
and verify what comes back from this .findElements call, is *only* ONE element.
Reported by arran.huxtable
on 2013-08-08 10:51:37
Please attach a complete executable code sample to reproduce the issue. Otherwise the
issue will be closed, sorry.
Reported by barancev
on 2013-08-08 13:26:21
NeedsClarification
Sorry for delay, Please find the attached code to re-produce this issue.
Attached two java file (CommonFunctions.java and TestCaseExecutor.java).
I have removed extra stuff from code to make it simplify.
Note:
-I have confirmed with latest webdriver 2.34 as well, still facing same issue.
-I found same issue with one public site (http://www.nextravel.com/) that I used in
the attached example to re-produce this issue.
Points:
-I am not able to debug it further since its breaking at selenium internal code workflow.
-This is working fine, if I place all called and calling functions in a single file.
However, if I break code in two files (called functions and calling functions) issue
raised.
-Webdriver gets deviate from actual submit url to some other url after placing second
to date value on main page. (i.e. after calling function following //ComFun.LandDatesTo("10/6/2013");
attached in java file.)
Expected output:
After submit button user should get to re-direct to following search page:
http://search.nextravel.com/
Actual results:
After submit button user is getting redirect to following search page:
http://hotelsbycity.hotelplanner.com
Reported by ashv.sharma
on 2013-08-09 20:26:02
When I do the same actions manually on the site http://www.nextravel.com/ I get to the
page http://hotelsbycity.hotelplanner.com/GroupForm.cfm?DestinationSearchString=New%20York%20City,%20NY&CheckInDate1=8/6/2013&OutDate=10/6/2013&Rooms=1&GroupType=170&es=1
Reported by barancev
on 2013-08-10 06:17:43
Please close this issue. I got it.
My BAD. Mark it as invalid, I agreed.
Reported by ashv.sharma
on 2013-08-10 07:43:03
Reported by barancev
on 2013-08-10 08:04:51
Invalid
Reported by luke.semerau
on 2015-09-17 18:17:41
Originally reported on Google Code with ID 6064
Reported by
ashv.sharma
on 2013-08-08 07:13:38