Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support scLocator strategy #1

Closed
mdiwakar opened this issue Mar 27, 2013 · 6 comments
Closed

Support scLocator strategy #1

mdiwakar opened this issue Mar 27, 2013 · 6 comments
Assignees

Comments

@mdiwakar
Copy link

per selenium2Library document following strategy is supported

|Strategy   |Example    |Description    |
|identifier     |Click Element | identifier=my_element  |Matches by @id or @name attribute  |
|id     |Click Element | id=my_element  |Matches by @id attribute   |
|name   |Click Element | name=my_element    |Matches by @name attribute     |
|xpath  |Click Element | xpath=//div[@id='my_element']  |Matches with arbitrary XPath expression    |
|dom    |Click Element | dom=document.images[56]    |Matches with arbitrary DOM express     |
|link   |Click Element | link=My Link   |Matches anchor elements by their link text     |
|css    |Click Element | css=div.my_class   |Matches by CSS selector    |
|tag    |Click Element | tag=div    |Matches by HTML tag name   |

add support for scLocator

@MarkusBernhardt
Copy link
Owner

Hi,
would it be sufficient to add the "Add Location Strategy" as in the SeleniumLibrary and you define your own scLocator Strategy by specifying the appropriate JavaScript function? Perhaps something like #4 at:
http://forums.smartclient.com/showthread.php?t=21527
Cheers,
Markus

@ghost ghost assigned MarkusBernhardt Mar 27, 2013
@mdiwakar
Copy link
Author

I think that should be fine

On Wed, Mar 27, 2013 at 12:49 PM, Markus Bernhardt <notifications@github.com

wrote:

Hi,
would it be sufficient to add the "Add Location Strategy" as in the
SeleniumLibrary and you define your own scLocator Strategy by specifying
the appropriate JavaScript function? Perhaps something like #4 at:
http://forums.smartclient.com/showthread.php?t=21527
Cheers,
Markus


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-15548924
.

MarkusBernhardt added a commit that referenced this issue Apr 2, 2013
MarkusBernhardt added a commit that referenced this issue Apr 2, 2013
MarkusBernhardt added a commit that referenced this issue Apr 2, 2013
@MarkusBernhardt
Copy link
Owner

Hi mdiwakar,
could you please retests this issue and give some feedback.

example:
Selenium2Library.Add Location Strategy elementById return window.document.getElementById(arguments[0]);
Input Text elementById=firstName Max

@MarkusBernhardt
Copy link
Owner

Closing the issue, because the fix works for me and no more input from reporter.

@mdiwakar
Copy link
Author

mdiwakar commented May 2, 2013

Sorry for late reply, this works perfect, thanks a lot

Add Location Strategy scLocator return AutoTest.getElement(arguments[0]);
Wait Until Page Contains Element ${Login.Username} 20 "element not present"
Input Text ${Login.Username} user_admin

@MarkusBernhardt
Copy link
Owner

Great to hear that!

Am 02.05.2013 um 23:49 schrieb mdiwakar notifications@github.com:

Sorry for late reply, this works perfect, thanks a lot

Add Location Strategy scLocator return AutoTest.getElement(arguments[0]);
Wait Until Page Contains Element ${Login.txtUsername} 20 "element not present"
Input Text ${Login.Username} user_admin


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants