check title variable using ID in selenium webdriver

When using selenium IDE to test my site, I encountered a challenge on some pages where there is a link with a variable ID. For example: () Every time a user clicks on this link, the site takes them to a process page with a changing number (variable).

Due to this variability, I am unable to use the following code:

<tr>
    <td>click</td>
    <td>link=yourorder.com/135046</td>
</tr>

Can anyone suggest what alternative approach I can take? Any help would be appreciated.

Answer №1

Use the following XPath to find the element:

"//td[contains(text(), 'link=yourorder.com')]"

Answer №2

When using SELENIUM IDE, there are several options available for selecting a target.

The sequence for choosing a target value is as follows:

  1. ID

  2. NAME

  3. LINK

  4. DOM

  5. CSS

  6. XPATH

The structure of an XPATH is //html tag[@property='value']

Feel free to experiment with these options!

Answer №3

tap > //html/body/div[6]/div[3]/div/div/div/table/tbody/tr/td[2]/a

gratitude to all

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the process for modifying a Joomla plugin?

Just starting out with Joomla development and recently installed Joomla 2.5 on my local computer for some practice. I have a question about editing Joomla plugins - specifically the layout of the Content - Pagebreak plugin (the pagination that appears wh ...

New to jQuery: struggling with click event and CSS... What am I missing here?

I have a very simple question for you: $j(".srch-txt").click(function() { $j(this).css("color:" "#155D97") }); $j is used to avoid conflicts It's quite straightforward: I want to change the color of the .srch-txt element to #155D97 when it is click ...

"Encountering the error 'Element is unclickable' while attempting to click on an image using Selenium WebDriver in

As a newcomer to Test Automation and Selenium WebDriver, my current project involves automating the validation system for a private website. Specifically, I am tasked with automating the order management system to streamline the process of confirming multi ...

There seems to be an issue with the fixed navigation menu in Bootstrap 4. I seem to be overlooking something that is causing this problem

I encountered an issue with my fixed navigation while using bootstrap 4. Everything works fine when hovering over non-active nav items, but it displays two bottom borders when hovering over the active nav item. I'm seeking assistance to resolve this i ...

Ways to hide a div element when the size of the window is decreased

I need help with keeping my logo fixed on the header of my website. You can view an example of the issue here: Currently, when the window is resized to a certain height, the logo (The sun) changes position. How can I ensure that it remains fixed in place? ...

Move the Bootstrap modal footer button to the left side

I am trying to align the cancel button to the left of the footer and keep the close and save buttons on the right side at all times. Even after adding the float:left property to the cancel button, it did not solve my issue. I would appreciate any solution ...

What is the correct way to implement a variable in xpath with Selenium WebDriver using Java?

How can I incorporate variables into XPath while using Selenium WebDriver with Java? Below is the snippet of my code: for(int row =1; row<=20; row++) { driver.findElement(By.xpath(“//*[text()=’PickRequest’]/table/tbody/tr[+row+]/td[2] ...

Angular Recursive Bootstrap Breadcrumb Guide

I am looking to implement the bootstrap breadcrumb component (https://getbootstrap.com/docs/4.0/components/breadcrumb/) in my project. My goal is to use the breadcrumb to show the entire path to the current directory within a component that resembles a di ...

Create a customized HTML popup featuring various packages

I am struggling to create an HTML popup within a React component due to some errors Here is the code snippet: <div> <button class="toggle">Button</button> <div id="link-box"> <ul> ...

Combining jQuery within a single container/segment/div tag

Currently, I am experimenting with adding jQuery to my Cargo Collective website: I have been working on a mouse-tracking jQuery effect that I really like, but I am facing an issue where the script does not stay contained in a specific section of the site. ...

Is there a problem with scrolling when using .animate() and .prop() functions?

When scrolling one of two divs with the same class, I want the other div's scroll to reset to 0 with a smooth animation. While achieving this using .prop() is easy, using .animate() only works once and then stops. Any suggestions on how to make the sc ...

Using selenium and rspec with ies4linux

Currently, I am using Selenium primarily with Firefox to test my Rails applications and everything is going smoothly. Now, I want to extend my tests to run on IE6 as well. I am running Ubuntu and utilizing the Ruby selenium-client gem. To use IE6, I have i ...

The Material-UI Select Component is having trouble selecting an option - it timed out and is retrying after 4000ms

During my integration tests for a React component using Cypress, I've hit a roadblock when trying to select an option from a Material-UI Select component within a dialog. The issue arises even though I can successfully log in and open the dialog. Her ...

What could be causing the col-md class to not work within a Bootstrap 4 card element?

Please be aware that I specialize in development, not design. My goal is to split a card div into two columns for desktop view. The text "This should be in Left Side" should be positioned on the left side, while "This should be on right side" should be on ...

Steps to create an iframe that opens in a new window

I'm facing an issue with the iframe sourced from flickr. My website includes an embedded flickr iframe to showcase a gallery without the hassle of creating a slider, resizing images, and extracting thumbnails. Given that this site belongs to a frien ...

Text stretched to its fullest height and rotated using the transform property

check out the demo Here is a demonstration of HTML elements: <div class="controller"> <div><a href="#buttton-1">Special Offer</a></div> </div> And here is the styled CSS for the demo: .controller{ width: 55px; ...

Unable to modify the color of UML state elements within JointJS

I need some help with jointjs as I am in the process of adjusting the color of a UML state diagram graph using this command: graph.getElements()[4].attributes.attrs[".uml-state-body"]["fill"] = "#ff0000"; However, despite trying this, the color of the st ...

The hierarchy of the <div> element within the <ul> element gets altered in Internet Explorer due to the ASP.NET Repeater control

Using a Repeater control, I am displaying a list of elements with the following code snippet: <td id="tdLeftBlock"> <ul id="leftList"> <asp:Repeater ID="rptLatestListingsLeft" runat="server" ...

Is it possible to automate Nunit tests within a Visual Studio project that uses Selenium Webdriver?

I am looking to automate my Selenium Webdriver tests after transitioning from Visual Studio to a VM that only has Nunit installed. I would like to schedule these tests to run daily, ideally before I start work, using Task Scheduler. I am unable to use an ...