logo
Tags down

shadow

Cannot get the text of nth span element using vba


By : YuMeng
Date : October 14 2020, 02:22 PM
I think the issue was by ths following , Use last-child css pseudo class in descendant combination with parent element class selector.
code :
.description span:last-child
Set availability = ie.document.querySelector(".description span:last-child")
Cells(1,1) = availability.innerText
Set availability = ie.document.querySelectorAll(".description span:last-child")
Cells(1,1) = availability.item(0).innerText
Set availability = ie.document.querySelectorAll(".description span")
Cells(1,1) = availability.item(2).innerText '<==choose your index here
Set availability = ie.document.querySelector(".description span + span + span")  '<==expand as required. This uses [adjacent sibling combinator][4].
Set availability = ie.document.querySelector(".description")
Dim arr() As String
arr = split( availability.innerText, ":")
Cells(1,1) = arr(UBound(arr))


Share : facebook icon twitter icon

How can I vertically align text within a span element, or make the span the same size as the text?


By : MjrHole
Date : March 29 2020, 07:55 AM
this will help Controlling most of the dimensions for inline elements will have no effect and is generally not supported (it would be directly against the intent of being inline). You must modify the display to be either inline-block or block.

How to get the actual text from a span element enclosed within multiple span tags, using Selenium Webdriver with Java


By : Praveen
Date : March 29 2020, 07:55 AM
this one helps. You should use Jsoup - A JAVA HTML parser library for these operations. Your code works as it should be. As per the documentation,
code :
 getText() 

Change element text but leave inner span (or add span back) in jQuery


By : divyanshu bhushan
Date : March 29 2020, 07:55 AM
around this issue I have a bootstrap dropdown where the user selects "Past", "This", or "Next". , Just put text in another span.
code :
  <button type="button" class="btn btn-default dropdown-toggle" id="TPN" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    <span class="text">This</span>
    <span class="caret"></span>
  </button>

inner text of element passed as <span onclick=foo(this) >myText</span>


By : Raghu
Date : March 29 2020, 07:55 AM
To fix this issue You need to call text as function because it's actually jQuery function.
code :
function foo(parameter) {
         alert($(parameter).text());                       
     }
function foo(parameter) {
         alert(parameter.textContent);                       
     }

Need to get the tool tip text from the active span element located inside another span in selenium


By : Olha Petrushenko
Date : March 29 2020, 07:55 AM
this one helps. Use isDisplayed method on following web elements which tell whether that element is visible on the web page or not.
try for Deactivate span tag with following XPATH:
code :
//span[@style="display: inline-block;"  and @data-original-title="Deactivate"]
//span[@style="display: inline-block;"  and @data-original-title="Activate"]
Related Posts Related Posts :
  • Run-time error; Automation Error; Unspecified Error in VBA using UIAutomation
  • Extract span text by next element using CSS Selector
  • What is Proper DAX GROUPBY Syntax In Calculated Column in Power Pivot in Excel in Office 365
  • Extract data from column of selected row in excel vba userform combobox
  • Save as PDF Macro, with dropdown
  • Why empty excel file is 5.5mb large?
  • How do I filter a dataset to matching information in Excel?
  • cell.Value not retrieving the carriage returns in the cell
  • Add in another For Loop in order to have another worksheets data added before the file is saved
  • Recursive Search Through Subfolders BACK to Root Directory
  • Update Chart to include last row data using defined range
  • How to run IW29 with a specific variation and layout and copy its outcome to excel?
  • Color cells right to left in vba loop
  • Please advise to make code more efficient to execute
  • How to process SQL results into a CSV/Excel attachment using JCL?
  • Excel VBA Prompt Message After Sending Outlook Mail
  • VBA "Expected end of statement"
  • Is There a way to recover a severely corrupted EXCEL FILE?
  • VBA: Split sheet on certain rule
  • Excel VBA set default to not split images in two when printing
  • Excel Conditional Formatting For Multiple Matches
  • Cut/paste range of cells into another sheet and send an email
  • VBA runtime error 1004 - vlookup works sometimes
  • Create Column as below
  • Which tool can be used to extract and group rows and do the summation?
  • Find Function in VBA (Excel) won't find the minimum value
  • shadow
    Privacy Policy - Terms - Contact Us © voile276.org