2

I'm new to selenium so I've been using the IDE to create tests. I have this problem where Selenium sees a button associated with a drop down menu, but it won't click the button. To get around this i want Selenium to type the URL (for the button i want clicked) into the address bar of fire fox, or I want selenium to just go to said URL via some command, but i can't find said command, and i can't get Selenium to click and type in the address bar.

3 Answers 3

7

You can use open command and type the expected url. Just right click on the command window and Insert New Command and follow the screenshot. However, you should find a better way to click the button instead. enter image description here

Sign up to request clarification or add additional context in comments.

Comments

1

I found the open(url) command after i posted this.

1 Comment

Great! Yap it matches my answer as well.
0

The open command would be the way to go here, but might I reccomend also adding in a store command, rather than having the script reference the URL directly. If for any reason the URL on the button changed it would mean amending the script, however if for example you went with

<tr>
    <td>storeAttribute</td>
    <td>id=Button-Locator@href</td>
    <td>url</td>
</tr>
<tr>
    <td>open</td>
    <td>${url}</td>
    <td></td>
</tr>

It would mean less upkeep on the script in the event of URL changes

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.