You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
is it possible to have a common interface for TestStack.Seleno.PageObjects.Locators.By and TestStack.Seleno.PageObjects.Locators.By+jQueryBy?
The problem is that working with these selectors in a more abstract way is just tedious when we have to implement each functionality twice just to support both types.
We can't have a common interface that both implementations implement, but we could certainly have a wrapper over the top that delegates to either the selenium version or the jQuery version depending on which method you selected. Might be a bit of fiddling around, but it probably would simplify a lot of our code since we have a lot of duplicate implementations currently.
Would be a big breaking change so if we do want to do it then now is the time. Thoughts @MehdiK / @mwhelan / @JakeGinnivan?
...but we could certainly have a wrapper over the top that delegates to either the selenium version or the jQuery version depending on which method you selected.
That is exactly the same as I did now already. The problem here is that every time someone is facing this problem he/she has to do the same thing.
I would prefer to DRY this on the framework side.
Thanks
Hey, I think I have an easy solution to that: jQuery selector can select for css, id and everything else. Why not just offering jQuery usage and thats it? All older usages can be marked as obsolete.
What do you think about that?
Ill be honest; my personal preference is to not do that - I don't want to tie Seleno's search language to jQuery - as much as I love it I think it should also have an ability to be agnostic from it, plus I think the By.Id and By.ClassName are more readable on those situations personally.
Well, using only jQuery does not mean that the method By.ClassName should be removed. It would then just act as jQuery("." + selector) 😄
But you are right, it should play well in all sandboxes, not just on the cool ones.
I personally only use jQuery. The reason is that there are going to be elements I cannot select using Selenium selectors which means I do have to use jQuery. So I just keep it consistent and go all the way jQuery.
WRT working on all sandboxes, if you use jQuery selector, even if you're not using jQuery in your website, we inject it to your page so your selector works.
I personally think there should be one By selector that has everything the current By offers as well as a jQuery method.
Hi @SeriousM. We haven't addressed this issue yet - you will more than likely reference this issue number in the commits when we do :)
We released the 0.8 version this weekend just gone, which includes a version update for selenium web driver and also some new functionality to automatically take screenshots and log a message when there is an error within Seleno. We haven't blogged about it yet to explain the changes, but I imagine one of us will get around to it at some point :)
Not sure when we will address this issue. How important is it for you? If it's causing you a lot of grief we can try and prioritise it higher?
Not sure when we will address this issue. How important is it for you? If it's causing you a lot of grief we can try and prioritise it higher?
we managed to get a common selector-factory to create a by-selector-wrapper but when it comes to get the right underlying by-selector, its just a pain ita. a higher priority would be awesome ;)
Activity
robdmoore commentedon Sep 26, 2013
We can't have a common interface that both implementations implement, but we could certainly have a wrapper over the top that delegates to either the selenium version or the jQuery version depending on which method you selected. Might be a bit of fiddling around, but it probably would simplify a lot of our code since we have a lot of duplicate implementations currently.
Would be a big breaking change so if we do want to do it then now is the time. Thoughts @MehdiK / @mwhelan / @JakeGinnivan?
SeriousM commentedon Sep 26, 2013
That is exactly the same as I did now already. The problem here is that every time someone is facing this problem he/she has to do the same thing.
I would prefer to DRY this on the framework side.
Thanks
MehdiK commentedon Sep 26, 2013
I think this is a good idea that will piss off a lot of users ;) but perhaps a worthwhile breaking change.
SeriousM commentedon Sep 26, 2013
Great! When can we get it? :)
Am 26.09.2013 19:22 schrieb "Mehdi Khalili" notifications@github.com:
SeriousM commentedon Sep 27, 2013
Hey, I think I have an easy solution to that: jQuery selector can select for css, id and everything else. Why not just offering jQuery usage and thats it? All older usages can be marked as obsolete.
What do you think about that?
robdmoore commentedon Sep 27, 2013
Ill be honest; my personal preference is to not do that - I don't want to tie Seleno's search language to jQuery - as much as I love it I think it should also have an ability to be agnostic from it, plus I think the By.Id and By.ClassName are more readable on those situations personally.
Happy for others to disagree with me though...
SeriousM commentedon Sep 27, 2013
Well, using only jQuery does not mean that the method By.ClassName should be removed. It would then just act as
jQuery("." + selector)😄But you are right, it should play well in all sandboxes, not just on the cool ones.
MehdiK commentedon Sep 27, 2013
I personally only use jQuery. The reason is that there are going to be elements I cannot select using Selenium selectors which means I do have to use jQuery. So I just keep it consistent and go all the way jQuery.
WRT working on all sandboxes, if you use jQuery selector, even if you're not using jQuery in your website, we inject it to your page so your selector works.
I personally think there should be one By selector that has everything the current By offers as well as a jQuery method.
SeriousM commentedon Dec 2, 2013
hi! is there any update on this issue? I've noticed there is a new major release 8.1?
robdmoore commentedon Dec 2, 2013
Hi @SeriousM. We haven't addressed this issue yet - you will more than likely reference this issue number in the commits when we do :)
We released the 0.8 version this weekend just gone, which includes a version update for selenium web driver and also some new functionality to automatically take screenshots and log a message when there is an error within Seleno. We haven't blogged about it yet to explain the changes, but I imagine one of us will get around to it at some point :)
Not sure when we will address this issue. How important is it for you? If it's causing you a lot of grief we can try and prioritise it higher?
SeriousM commentedon Dec 2, 2013
we managed to get a common selector-factory to create a by-selector-wrapper but when it comes to get the right underlying by-selector, its just a pain ita. a higher priority would be awesome ;)