xpath

Unable to type within username field within ProtonMail signup page using Selenium and Python

那年仲夏 提交于 2021-01-13 09:42:42
问题 Hi I was trying to type the username field using Selenium and Python for the website https://mail.protonmail.com/create/new?language=en. From the developer tool, I am able to inspect the item using CSSSelector/Xpath or other way. But when I am running the pthon script its not working. Screenshot attached: My code is like the following: BASE_URL = 'https://mail.protonmail.com/create/new?language=en' driver = webdriver.Chrome(executable_path='./drivers/chromedriver') driver.get(BASE_URL) river

How to load or read an XML file using ConvertTo-Xml and Select-Xml?

让人想犯罪 __ 提交于 2021-01-12 06:11:39
问题 How can I accomplish something like this: PS /home/nicholas/powershell> PS /home/nicholas/powershell> $date=(Get-Date | ConvertTo-Xml) PS /home/nicholas/powershell> PS /home/nicholas/powershell> $date xml Objects --- ------- version="1.0" encoding="utf-8" Objects PS /home/nicholas/powershell> PS /home/nicholas/powershell> $date.OuterXml <?xml version="1.0" encoding="utf-8"?><Objects><Object Type="System.DateTime">12/12/2020 2:43:46 AM</Object></Objects> PS /home/nicholas/powershell> but,

How to select options from 3 interlinked dropdowns with the same class name and different values using Selenium and Java

早过忘川 提交于 2021-01-07 06:57:06
问题 I have 3 options in a home page with the same class name and different values see code bellow: First Option menu <select class="form-control mandatory" tabindex="4" required="" autocomplete="off" name="SearchHome.documentType"> <option value=""></option> <option value="VISA">Visa</option> <option value="EDF">EDF</option> </select> Second Option menu <select class="form-control mandatory" tabindex="5" required="" autocomplete="off" name="SearchHome.documentSubType"> <option value=""></option>

Selenium get value from Unicef material-ui currency TextField

血红的双手。 提交于 2021-01-07 06:31:47
问题 I need to verify a value which is in "Unicef material-ui currency textfield". I use bellow code to get the value within the textbox but the value is empty. var value = driver.FindElement(By.Id("txtCurrency")).Text; If you inspect the input field in bellow sample, you can see even though text is visually displayed, " value " HTML attribute is empty. HTML snapshot: HTML: <input aria-invalid="false" type="text" class="MuiInputBase-input MuiOutlinedInput-input jss493 jss561 MuiInputBase

how to use the cmdlet Select-Xml interactive prompt?

我是研究僧i 提交于 2021-01-07 02:53:38
问题 How is Select-Xml used as below: PS /home/nicholas/powershell> PS /home/nicholas/powershell> Select-Xml cmdlet Select-Xml at command pipeline position 1 Supply values for the following parameters: Xml[0]: ./bookstore.xml Xml[1]: XPath: /bookstore Select-Xml: Cannot bind parameter 'Xml'. Cannot convert the "./bookstore.xml" value of type "System.String" to type "System.Xml.XmlNode". PS /home/nicholas/powershell> by entering the parameters and Xpath through the REPL as above. Certainly: PS

How to use Xpath to filter out date field in Wordpress plugin?

烈酒焚心 提交于 2021-01-07 02:44:46
问题 I am using the WP All Import plugin to import a csv file with thousands of records every day but I don't need all of them, only the ones that have been updated. There is a "last modified" column in the csv file which i'd like to compare to today's date and filter out anything that doesn't match. Wp all import let's you do this using xpath, but I have no idea how to reference today's date in it, can anyone help? WP All Import xpath screen.png Kind Regards, 回答1: XPath 2.0 solution (paste it in

Scrapy does not find text in Xpath or Css

我怕爱的太早我们不能终老 提交于 2021-01-07 02:19:03
问题 I've been at this one for a few days, and no matter how I try, I cannot get scrapy to abstract text that is in one element. to spare you all the code, here are the important pieces. The setup does grab everything else off the page, just not this text. from scrapy.selector import Selector start_url = "https://www.tripadvisor.com/VacationRentalReview-g34416-d12428323-On_the_Beach_Wide_flat_beach_Sunsets_Gulf_view_Sharks_teeth_Shells_Fish-Manasota_Key_F.html" #BASIC ITEM AND SPIDER YADA, SPARE

Scrapy does not find text in Xpath or Css

我与影子孤独终老i 提交于 2021-01-07 02:16:15
问题 I've been at this one for a few days, and no matter how I try, I cannot get scrapy to abstract text that is in one element. to spare you all the code, here are the important pieces. The setup does grab everything else off the page, just not this text. from scrapy.selector import Selector start_url = "https://www.tripadvisor.com/VacationRentalReview-g34416-d12428323-On_the_Beach_Wide_flat_beach_Sunsets_Gulf_view_Sharks_teeth_Shells_Fish-Manasota_Key_F.html" #BASIC ITEM AND SPIDER YADA, SPARE

How can I check if either xpath exists and then return the value if text is present?

自闭症网瘾萝莉.ら 提交于 2021-01-07 01:44:38
问题 I'm having trouble with the second r.html.xpath request. When there is a special deal on an item, the second Xpath changes from //*[@id="priceblock_ourprice"] to //*[@id="priceblock_dealprice"] This causes the script to fail since there the right xpath cannot be returned. How can I include this second xpath that only shows up occasionally? I would like to see if either xpath exists, if so return that, or return N/A. The first url that is searched has the ourprice xpath and the second url has

How can I check if either xpath exists and then return the value if text is present?

对着背影说爱祢 提交于 2021-01-07 01:43:10
问题 I'm having trouble with the second r.html.xpath request. When there is a special deal on an item, the second Xpath changes from //*[@id="priceblock_ourprice"] to //*[@id="priceblock_dealprice"] This causes the script to fail since there the right xpath cannot be returned. How can I include this second xpath that only shows up occasionally? I would like to see if either xpath exists, if so return that, or return N/A. The first url that is searched has the ourprice xpath and the second url has