Find element by link text



  • I'm a super noob to using open bullet and selenium so cut me some slack if I come off as clueless. Despite that, I am almost done with my first config.

    The problem I am having, right now, is using the javascript block to find an element by link text. I am currently trying to create a new email account on hotmail using this config and there is a button for getting a new captcha image that I want to press. So far the element action block hasn't been able to select it using any of the already pre-built list of elements in the drop down menu. Most results from my google searches show that the button could be selected by finding an anchor in the html and then selecting the link text using something like:

    driver.findElement(By.linkText("New")).click()

    Here is what the code looks like:

    Hotmail element.PNG

    Sorry again is this is a super noob question and also I hope I posted in the right part of the forum. Thanks.



  • Okay never mind, the full Xpath in an element action block seems to have worked. Don't know how I missed that.

    However, just as an informational query is it possible to find an element using link text by using the JS Block? Thanks


  • Admin



  • Wish I had seen that earlier as well for the sake of not clogging the forum, thanks.


  • Admin

    It's fine ^_^ don't worry, and welcome here


Log in to reply