What is the process for inspecting the element within a div using jsname with JS?

Struggling to inspect elements within a DIV without using xpath.

     // Assert.assertEquals("Digite uma senha",driver.findElement(By.xpath("//*[@id=\"view_container\"]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div[2]/div[2]/span")).getText()); 
     // System.out.println(driver.findElement(By.xpath("//*[@id=\"view_container\"]/div/div/div[2]/div/div[1]/div/form/span/section/div/div/div[1]/div[2]/div[2]/span")).getText()); 
             //  driver.close();

}https://i.stack.imgur.com/pujWf.png

Answer №1

The following CSS code can be utilized.

div[jsname='F78HD'] span

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

Borders appear to be missing in the card-like div layout

Despite using the same color for the outer border and inner borders, I am having trouble getting the inner borders to show up. Can anyone provide guidance on how to display both the inside and outside borders? Note: I have attempted changing the color, bu ...

Using a JavaScript class rather than an ID for toggling visibility

As a complete newbie to JavaScript, I've come across similar questions but I'm lost when it comes to coding - help needed! So here's the code I have so far, and I'm hoping someone can assist me. Currently, I have JavaScript set up to s ...

Configuring RSelenium to use PhantomJS as a proxy situation

I am currently utilizing the RSelenium package with the parameter browserName = "phantomjs" in the remoteDriver function. However, I am interested in running a test where I can specify the proxy server type. I have come across examples of proxy authenticat ...

The use of HTML 5 Autofocus causes interference with CSS loading

Whenever I apply the autofocus="autofocus" attribute to an input element, it causes a brief glitch in Firefox. The content briefly appears without the CSS styling applied, resulting in elements not centered and headings rendered in default fonts. If I tak ...

Issue with CSS background images not resizing properly on iPad and iPhone devices

While my site's background image resizes nicely in Chrome and Safari using background-size: cover, I encountered an issue when testing it on an iPad or iPhone. The CSS background image appears to be extremely zoomed in, resulting in a horrible appeara ...

An issue with the font display

I'm having trouble with a specific font on my webpage and jsfiddle, even though it works fine on w3schools website. Here's an example on jsfiddle HTML <div> With CSS3, websites can finally use fonts other than the pre-selected "web-safe" ...

I am getting text content before the input element when I log the parent node. What is causing this issue with the childNodes

Does anyone know why 'text' is showing up as one of the childNodes when I console.log the parent's childNodes? Any tips on how to fix this issue? <div id="inputDiv"> <input type="text" id="name" placeholder="Enter the nam ...

Having trouble with driver.switchTo().alert() on Google Chrome and Firefox?

I have been trying to handle alerts using the driver.switchTo().alert() method, but unfortunately, it seems to be working only for IE11 and not for Google Chrome or Firefox. The error message is being displayed in Eclipse Console which can be seen here, wh ...

Deleting database information using Jquery when a div is clicked

I'm looking to create an alert system where users will see a pop-up alert on their screen. However, I am facing a major issue in removing the div completely. I understand that I need to remove it from the database, but I'm struggling with finding ...

``There seems to be an issue with the alignment of items in the

I am fairly new to using css and bootstrap and I am currently working on integrating a carousel into my angular web app. I copied the code from the bootstrap site but I am facing challenges in aligning everything properly. Additionally, the image slides do ...

The Handsontable popup autocomplete editor is unfortunately truncated by the horizontal scrollbar

I have implemented an autocomplete feature on all columns in my project. However, I am facing an issue where the autocomplete editor gets cut off by the horizontal scrollbar. You can see the problem demonstrated in this jsfiddle link. Here is some code re ...

What is causing the CSS3 tabbed area to be restricted?

Experimenting with CSS tabs found at http://css-tricks.com/examples/CSSTabs/: Sample six .w3c { min-height: 250px; position: relative; width: 100%; } .w3c > div { display: inline; } .w3c > div > a { margin-left: -1px; position: relative; left: 1 ...

Teach me the process of executing mouse movement in Selenium WebDriver with Java and PageFactory integration

I am facing an issue with a hidden link in HTML while using the Page Object pattern for writing scripts with Selenium Webdriver. The problem arises when trying to perform a MouseMove action on the initialized object within pageFactory. Below is the code s ...

Difficulty with the responsiveness of a website due to issues with the bootstrap grid system

I've been working with a Bootstrap grid that you can find at . While it works perfectly on large desktop screens, everything is a bit messy on mobile devices. The "NEW" text specifically is not visible on mobile and doesn't seem to be responsive. ...

Update the parent node in the Google Org Chart

This is my first time working with Google Charts and I have a couple of questions: Is there a method in the API to update the parent of an existing node? I am facing a challenge where I need to build a tree structure top-down, which means that I know the ...

Limitations of HTML and CSS on Android browsers

i have developed a website that can be found at this address : the site is experiencing some issues on android tablets browsers for instance : i suspect that some divs with the property margin:0 auto are not being centered on the page i am curious to k ...

Encountering a problem when using the wait method in Selenium to loop through a list of participants

While troubleshooting the program, I noticed that all three participants are selected during debugging. However, when I run the program, an error is thrown for the second participant: java.lang.IllegalStateException: The Network Member can not be found T ...

In IE8, the :last-child pseudo-class appears to be ineffective

Here is the HTML structure I am working with: <div class="footerMenu"> <ul> <li>Home</li> <li>About</li> <li>Feedback</li> <li>Contact us</li> </ul> ...

Encountering a "session not located" error while using Selenium with FirefoxDriver

Recently delving into the world of Selenium, I decided to follow an example provided on http://docs.seleniumhq.org/docs/03_webdriver.jsp. To my dismay, every attempt at running the code has resulted in a puzzling error message: Exception in thread "main" ...

The issue of app.css and app.js resources not loading in Laravel 8 with nginx, resulting in a 404 not found error, needs to be

Although this question may appear to be a duplicate, I assure you it is different. I have thoroughly searched through Stack Overflow, Laracast, Reddit, and GitHub for a solution. My setup includes a Laravel application on an Ubuntu VM with Nginx. The pro ...