Skip to content

Added keyword 'Get WebElement' - #473

Merged
emanlove merged 5 commits into
masterfrom
get-webelement
Aug 4, 2015
Merged

emanlove merged 5 commits into
masterfrom
get-webelement

Conversation

@just-be-dev

Copy link
Copy Markdown
Contributor

This may or may not be merged.

@emanlove, we briefly discussed this in #356 and I just wanted to broach the issue again. It was raised in #469 that the documentation using Get WebElements was wrong. I've corrected it in #472, but I'm using Get WebElement which obviously doesn't exist.

We could of course just correct the documentation and only keep Get WebElements.

It would be this

@{elements}=   Get WebElements  id=my_element
Click Element  @{elements}[0]

versus

${element}=  Get WebElement  id=my_element
Click Element  ${element}

@pekkaklarck, feel free to jump in on this conversation too.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to do this or follow along with what the other find element keywords do? Something like ...

        return self._element_find(locator, True, True)

where we set the first_only flag to True. I like this a little better if only for the reason that it follows what other find elements are doing and if this changing in the future Get WebElement will do the same thing.

Added extra check for non-existing web element.
Comment thread test/acceptance/keywords/elements.robot Outdated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot and left these logs in here.

We should take those out.

@just-be-dev

Copy link
Copy Markdown
Contributor Author

I'll update this to remove the log statements in the test and I suppose we should add to the changelog as well.

Anything else to add @emanlove?

@emanlove

emanlove commented Aug 3, 2015

Copy link
Copy Markdown
Member

@zephraph Did you remove the logs? Looks like there are still there...

@just-be-dev

Copy link
Copy Markdown
Contributor Author

I haven't even submitted another commit yet. You can go ahead and do it if you'd like.

@emanlove

emanlove commented Aug 3, 2015

Copy link
Copy Markdown
Member

Done

@just-be-dev

Copy link
Copy Markdown
Contributor Author

Sorry, that commit didn't work right.

I was in the middle of committing the same time you did, so I pulled but it ended up doing something wanky.

@just-be-dev

Copy link
Copy Markdown
Contributor Author

Regardless, I think this is good to go. Do you want to look over it? I'll let you merge when you feel it's ready.

emanlove added a commit that referenced this pull request Aug 4, 2015
Added keyword 'Get WebElement'
@emanlove
emanlove merged commit 465610b into master Aug 4, 2015
@just-be-dev
just-be-dev deleted the get-webelement branch August 4, 2015 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants