xpath

Special Character '&' in XPATH Query

不想你离开。 提交于 2021-01-28 19:06:23
问题 Using Windows 7 and Creating a scheduled task based on a trigger. The following line is resulting in "The event log query specified is invalid" [EventData[Data[@Name='Network Client'] and (Data="C:\Program Files (x86)\AT&T Network Client\NetVC.exe")]] I have uncovered the cause to be the ampersand in the path name "AT&T" If I remove the ampersand then the query is understandable, but of course the path name then becomes invalid. Is there some method where the ampersand special char can used

Trouble finding element in Selenium with Python

青春壹個敷衍的年華 提交于 2021-01-28 18:27:41
问题 I have been trying to collect a list of live channels/viewers on Youtube Gaming. I am using selenium with Python to force the website to scroll down the page so it loads more that 11 channels. For reference, this is the webpage I am working on. I have found the location of the data I want, but I am struggling with getting selenium to go there. The part I am having trouble with looks like this: <div class="style-scope ytg-gaming-video-renderer" id="video-metadata"><span class="title ellipsis-2

Select node based on sibling's value

白昼怎懂夜的黑 提交于 2021-01-28 16:20:34
问题 I need XPath syntax (for use in simplexml) for searching the contents of the LayoutPosNo element that matches exactly, say, the number 1001 and returning the text in the sibling Descrip element. The LayoutPosNo 's are all unique, so I only need the first match. Here is the structure of the XML: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <record> <LayoutPosNo>10</LayoutPosNo> <Descrip>This is the red room</Descrip> <

Select node based on sibling's value

和自甴很熟 提交于 2021-01-28 16:17:42
问题 I need XPath syntax (for use in simplexml) for searching the contents of the LayoutPosNo element that matches exactly, say, the number 1001 and returning the text in the sibling Descrip element. The LayoutPosNo 's are all unique, so I only need the first match. Here is the structure of the XML: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <record> <LayoutPosNo>10</LayoutPosNo> <Descrip>This is the red room</Descrip> <

How to click the Continue button within https://in.indeed.com/ website using selenium in python?

故事扮演 提交于 2021-01-28 12:30:17
问题 I am trying to write a code that is able to auto apply on job openings on indeed.com. I have managed to reach the last stage, however, the final click on the application form is giving me a lot of trouble. Please refer the page as below Once logged in to my profile, I go to the relevant search page, click on the listing I am interested in and then on the final page (shown above) I am trying to click on the continue button using xpath. For the previous step (also a page on the same form), the

How to click the Continue button within https://in.indeed.com/ website using selenium in python?

一世执手 提交于 2021-01-28 12:18:43
问题 I am trying to write a code that is able to auto apply on job openings on indeed.com. I have managed to reach the last stage, however, the final click on the application form is giving me a lot of trouble. Please refer the page as below Once logged in to my profile, I go to the relevant search page, click on the listing I am interested in and then on the final page (shown above) I am trying to click on the continue button using xpath. For the previous step (also a page on the same form), the

Selenium's find_elements with two clauses for text?

本小妞迷上赌 提交于 2021-01-28 12:14:04
问题 How can I use selenium's find_elements_by_xpath() based on text, when it may or may not have a word? Example: it can be either #1 here or #1 is here . I want both to be part of the same list, since that func return a list. ATM I have driver.find_elements_by_xpath("//*[contains(text(), '#1 here')]") but that would only find the first case, not the ones with an is . Basically, something like driver.find_elements_by_xpath("//*[contains(text(), '#1 here' or '#1 is here')]") How could I do that? I

how to install perl XML::XPath on Windows?

感情迁移 提交于 2021-01-28 12:10:51
问题 Been running in Google'ish circles trying to install XML::XPath on windows. Windows 10, Perl 5.4 (where perl = /usr/bin/perl). I am running Strawberry perl. "cpan install XML::XPath" fails, > cpan install XML::XPath Can't find E:\Plang\Strawberry_Perl\perl\bin\cpan.bat on PATH, '.' not in PATH. Manual download of xml-xpath-1.44, then unpacking, and run makefile, fails: perl Makefile.PL Expat must be installed prior to building XML::Parser and I can't find it in the standard library

In Hive, how to read through NULL / empty tags present within an XML using explode(XPATH(..)) function?

杀马特。学长 韩版系。学妹 提交于 2021-01-28 11:51:40
问题 In below Hive-query, I need to read the null / empty "string" tags as well, from the XML content. Only the non-null "string" tags are getting considered within the XPATH() list now. with your_data as ( select '<ParentArray> <ParentFieldArray> <Name>ABCD</Name> <Value> <string>111</string> <string></string> <string>222</string> </Value> </ParentFieldArray> <ParentFieldArray> <Name>EFGH</Name> <Value> <string/> <string>444</string> <string></string> <string>555</string> </Value> <

Parsing HTML to text with link-tags remaining in R

﹥>﹥吖頭↗ 提交于 2021-01-28 10:45:56
问题 My problem I am trying to parse a HTML file (downloaded via Google Drive API as text/html ) to a list in R. The HTML looks like this (sorry for the German content): <p style='padding:0;margin:0;color:#000000;font-size:11pt;font- family:"Arial";line-height:1.15;orphans:2;widows:2;text-align:left'> <span>text: Das </span> <span style="color:#1155cc;text-decoration:underline"><a href="https://www.google.com/url?q=http://www.bundesverfassungsgericht.de/SharedDocs/Entscheidungen/DE/2011/10