Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

base url does not update #495

Closed
lukeis opened this issue Mar 2, 2016 · 10 comments
Closed

base url does not update #495

lukeis opened this issue Mar 2, 2016 · 10 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 495

Hi,

we have exactly the same issue like already reported in issue #342.

Additionally we were observing the behavior that when opening a previously
recorded test the base URL won't change also.

Firefox 3.5.6 with Selenium IDE 1.0.4 / 1.0.5 / 1.0.6
Firefox 3.6 with Selenium IDE 1.0.4 / 1.0.5 / 1.0.6

Please increase priority to medium / high.

Thanks in advance!

Reported by ameurer85 on 2010-04-29 08:28:47

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi,

I think this is related to my problem:

I have parametrized test cases that have a specificially set base.url in the html
file of the test. Whenever I open thee testcase and try to run it, Selenium IDE does
not use the URL contained in the test source.

Steps to reproduce:
- Record arbitrary testcase
- Make sure the link with rel="selenium.base" is set to a meaningful value
- Make sure to untick options-general-Remeber Base URL
- Close selenium
- Naivagte to any site e.g. www.google.com
- Open Selenium IDE
- Open the testcase
- Run single testcase

Expected result:
- Selenium detects that currently the base.url field in the UI is empty (because we

told Selenium IDE not to remember the last value)
- Selenium detects that the testcase _does_ specify a value for selenium.base
- selenium usees the value specified in the testcase

Observed result:
- Selenium simply tries to run the test on the site currently opened in browser
- Tests fail in case the currently opened site is not identical to the one encoded
in the testcase

Firefox 3.6.3 with Selenium IDE 1.0.7

Reported by linux.ninj4 on 2010-05-28 08:03:41

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by jeremy.herault on 2010-06-13 18:40:49

  • Status changed: Fixed

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

jeremy, could you elaborate on that a bit?
How can I get the fixed version?

Reported by linux.ninj4 on 2010-06-13 18:45:16

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

:), sorry for the lack of communication. You can add yourself the modifications if you
want (see revision r9144). In the toggleView method of the Editor object, a notification
is now done to the Application object to change the Base URL: editor.js line 729 (you
only have to add 'this.app.notify("baseURLChanged");'). Now, the Application object
return the baseURL of its testCase if it has one, if not, it conserves its original
behaviour: application.js line 46 (you only have to change the return statement 'return
this.testCase && this.testCase.baseURL ? this.testCase.baseURL : this.baseURL;' ).
This two files are in the chrome/content/ directory in the install directory of Se-IDE.
You can find it in your Firefox profile folder.

Reported by jeremy.herault on 2010-06-13 19:00:46

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Thanks a bunch. That is a lot much clearer ;-)

Reported by linux.ninj4 on 2010-06-13 19:51:14

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Sorry, jeremy. I could not verify the fix. I checked out r9144 and copied the files
(application.js and editor.js) to my SIDE extension directory chrome/content. Unfortunately
the behavior is unchanged. I attached the file I used to test this.

Win 7, SIDE 1.0.7, Firefox 3.6.3

Reported by linux.ninj4 on 2010-06-14 09:03:33


- _Attachment: [SQL-Injection.html](https://storage.googleapis.com/google-code-attachments/selenium/issue-495/comment-6/SQL-Injection.html)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi,
Okay, I haven't tried exactly with your steps. How did you produce this file ? Because
the "rel" and "href" attribute of "<link href="http://10.9.10.100" rel="selenium.base"/>"
are reversed. You should have "<link rel="selenium.base" href="http://10.9.10.100"/>"
and it should work fine. Let me know if I'm rigth.

Reported by jeremy.herault on 2010-06-14 10:18:52

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi jeremy. I can verify this. The link was produced while "parametrizing" the testcase:
I have all testcases stored on a central server. There you can choose on what system
you would like to run the test. My web application then sets the href Attribute appropriately.

While I can confirm, that all works once you switch the order of attributes, I can
not deem this good. In XML the order of attributes should have no effect on the result.
Do you access the attributes by index? Could you access them by name?

I put this up for discussion:
http://stackoverflow.com/questions/3037780/is-the-order-of-attributes-in-a-certain-tag-releveant

Reported by linux.ninj4 on 2010-06-14 19:55:47

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Hi, the source of the testcase is parsed with RegExp. You can see how we do it in the
file html.js in the format folder, line 145. I agree that the order of XML attribute
have no effect on the result normally but in our case it is. Sorry if it bother you.
Initially, Selenium IDE only reads the files it produces. If it has files that it didn't
produced, it seems *logical* to propose it in a format identical to those it produces.
For now it works if the file is in the expected format, so the bug is fixed. If however
it doesn't always suit you, you can always submit a patch.

Reported by jeremy.herault on 2010-06-14 20:35:49

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 17:49:18

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant