Results 1 to 6 of 6

Thread: Clicking on Hyperlink

  1. #1
    Sencha User
    Join Date
    Jun 2017
    Location
    Chennai
    Posts
    11
    Vote Rating
    0
      0  

    Default Clicking on Hyperlink

    HI ,

    I am a newbie to Sencha and we have a hyperlink on my page which is not supported by sencha component locator .Is it possible to click it.?
    Also its inside a grid.

    ViewLink.png


    Bharathy
    Infra Technology Specialist.
    Cognizant.

  2. #2
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    263
    Answers
    35
    Vote Rating
    32
      0  

    Default

    As this is an HTML element (not an Ext JS component), you would need to use the ST.element API to reference the hyperlink.

    The Inspect tool within Sencha Studio should help you to generate a locator, or you can write a CSS selector, or composite locator, as described here: https://docs.sencha.com/sencha_test/.../locators.html

    So you could use a locator like this:

    Code:
    ST.element('#mygrid => a:first-child')
    This would find the first hyperlink within the grid.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  3. #3
    Sencha User
    Join Date
    Jun 2017
    Location
    Chennai
    Posts
    11
    Vote Rating
    0
      0  

    Default

    Hi Daniel,

    This method is not working for me. It click the other element inside the box (CI Name link in the image above)

    Regards,
    Bharathy.

  4. #4
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    263
    Answers
    35
    Vote Rating
    32
      0  

    Default

    This means "CI Name" is the first hyperlink, so you will need to narrow down the locator to the specific hyperlink you're interested in, for example:

    Code:
    ST.element('#mygrid => a[name="view"]')
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

  5. #5
    Sencha User
    Join Date
    Jun 2017
    Location
    Chennai
    Posts
    11
    Vote Rating
    0
      0  

    Default

    Hi Daniel ,

    I tried the above method already , but i get timeout message only.

    Timeout waiting for target (#grid-bbar-link =>a[name="view"]) to be available for ST.future.Element


    Bharathy.

  6. #6
    Sencha - Sales Team daniel.gallo's Avatar
    Join Date
    Apr 2009
    Location
    Redwood City, CA
    Posts
    263
    Answers
    35
    Vote Rating
    32
      0  

    Default

    This means it can't locate the hyperlink within that Ext JS component. Also, "grid-bbar-link" is a CSS class by the looks, not a Component Query.

    You will need to figure out the right locator to use (I'm only going off of the limited screenshot above).

    Try and use the Inspect tool in Sencha Studio, or the Component Locator Chrome extension to figure out what the parent Ext JS component is (and generate its locator), then tag on the DOM query. The "=>" separator allows you to combine an Ext JS Component Query and a DOM Query.
    Daniel Gallo
    Senior Solutions Architect
    Sencha Inc.

Similar Threads

  1. HTMLEditor Hyperlink Button Does Not Add Hyperlink
    By StevenMilneffdc in forum Ext 5: Bugs
    Replies: 1
    Last Post: 4 Apr 2017, 4:17 AM
  2. Replies: 4
    Last Post: 14 Nov 2014, 6:31 PM
  3. Hyperlink
    By xxjt123xx in forum Sencha Architect 3.x: Q&A
    Replies: 2
    Last Post: 5 Dec 2013, 8:08 AM
  4. Hyperlink
    By madhumita.254 in forum Ext: Q&A
    Replies: 3
    Last Post: 6 Sep 2012, 12:52 AM
  5. opening new tab on clicking hyperlink
    By rams128kb in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 29 May 2008, 5:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •