私信  •  关注

KunduK

KunduK 最近创建的主题
KunduK 最近回复了
4 年前
回复了 KunduK 创建的主题 » Python Selenium使用按钮文本在span标记内单击按钮

使用以下命令 xpath 点击按钮。

driver.find_element(By.XPATH, "//a[.//span[text()='New Database/Server']]").click()

或者使用链接文本

driver.find_element(By.LINK_TEXT, "New Database/Server").click()

使用css选择器检查文本是否包含“COMPANY DESCRIPTION”和其余代码。

代码 :

import requests
from bs4 import BeautifulSoup
def scrape_url(url, method='bs4'):
    session = requests.session()
    page = session.get(url)
    soup = BeautifulSoup(page.text, 'html.parser')
    return soup

urls=['https://jobs.sap.com/job/Kuala-Lumpur-Business-Processes-Consultant-%28FICO%29-Job-14/541909901/','https://jobs.sap.com/job/Mumbai-Senior-Account-Executive-Job-MH/539212101/']

for url in urls:
    print(url)
    soup = scrape_url(url)
    findtag=soup.select_one('p:contains("COMPANY DESCRIPTION")')
    print(findtag.text)
    findnextptag=findtag.find_next_sibling('p')
    for item in findnextptag.find_next_siblings():

         if 'WHAT YOU GET FROM US' in item.text:
             break
         else:
             print(item.text.strip())

    print("======================================")

:

https://jobs.sap.com/job/Kuala-Lumpur-Business-Processes-Consultant-%28FICO%29-Job-14/541909901/
COMPANY DESCRIPTION
SAP started in 1972 as a team of five colleagues with a desire to do something new. Together, they changed enterprise software and reinvented how business was done. Today, as a market leader in enterprise application software, we remain true to our roots. That’s why we engineer solutions to fuel innovation, foster equality and spread opportunity for our employees and customers across borders and cultures.
PURPOSE AND OBJECTIVES

To address requirements in the area of Supply Chain Management Extended Warehouse Management solutions, Build competencies at Solution Delivery Center to deliver solutions especially in areas relating to SAP EWM

EXPECTATIONS AND TASKS

Independently handle large implementation projects with focus on Warehouse Management processes such as inbound, outbound and internal processes. RF Device functions and Barcode support experience is desirable
Able to lead EWM discussions, assessments and detail requirement studies with customers
Leading the team that are assigned to, in functional capacity, adding value to the project and to the final deliverables
Be actively involved in the preparation, conception, realization and Go Live of customer implementation projects
Demonstrate the ability to plan, run, and manage blueprint workshops / meetings with internal and external clients
Responsible for defining the scope of a project / opportunities, estimating efforts and project timelines
Participating in RFP discussions and estimating under guidance from a Bid Manager
Providing a creative source of ideas/solutions to address problems
Delivering billable components that meets a customer’s needs
KEY PERFORMANCE INDICATORS

Customer Feedback/customer satisfaction scores
Productive days/utilization as defined by the organization for projects/assessments/etc.
Knowledge Management and creation of effective reusable components
EXPERIENCE REQUIREMENTS

Minimum of 4+ years industry experience and a minimum of 5 to 6 years of SAP EWM experience
Domain knowledge in Supply Chain Management in the areas of Planning, Manufacturing & warehousing processes is a must
Must have strong ERP implementation experience
Experience in SAP Material Flow Systems (MFS) or any other third party automation tools will be desirable
Experience in EWM technical knowledge will be an added advantage
Knowledge on SAP S/4HANA Public Cloud solution and SAP IOT/Leonardo portfolio will be preferred but not mandatory
Good understanding of S/4HANA Order to Cash and Procure to Pay business processes
Good understanding of SAP ACTIVATE implementation methodology
Use of Solution Manager as a part of implementation life cycle is desirable
Good Communication skill in English.

EDUCATION AND QUALIFICATIONS/SKILLS AND COMPETENCIES

Degree in Engineering or IT
SAP Certification in Extended Warehouse Management (EWM) desirable
Minimum 4 to 5 full life cycle SAP EWM implementations
Strong knowledge in SAP SCM Extended Warehouse Management Solutions and S/4HANA Embedded EWM Solution
Good integration knowledge with other components with SAP S/4HANA (WM, SD, MM, PP) and other SAP or Non-SAP legacy applications
Knowledge of SCOR, APICS certification preferable
Strong client-facing experience and well-developed customer focus
Solid oral and written communication skills, with the demonstrated ability to communicate complex technical topics to management and non-technical audiences
Mobility is must – candidate must be ready to travel to project locations (short term and long term)

======================================
https://jobs.sap.com/job/Mumbai-Senior-Account-Executive-Job-MH/539212101/
COMPANY DESCRIPTION
SAP started in 1972 as a team of five colleagues with a desire to do something new. Together, they changed enterprise software and reinvented how business was done. Today, as a market leader in enterprise application software, we remain true to our roots. That’s why we engineer solutions to fuel innovation, foster equality and spread opportunity for our employees and customers across borders and cultures.
Key Areas of Responsibility and Tasks:

The Account Executive’s primary responsibilities include prospecting, qualifying, selling and closing new business to existing and net new customers. The Account Executive brings a Point of View to Customer engagement; uses all resources to solve customer problems with appropriate SAP products.

1.    Account and Customer Relationship Management, Sales and Software License and Cloud Subscription Revenue.

Annual Revenue - Achieve / exceed quota targets. 
Sales strategies - Develops effective and specific account plans to ensure revenue target delivery and sustainable growth.   Develop relationships in new and existing customers and leverage to drive strategy through organization. 
Trusted advisor - Establishes strong relationships based on knowledge of customer requirements and commitment to value (value of counsel and expertise, the value of solutions, the value of implementation expertise).  Builds a foundation on which to harvest future business opportunities and accurate account information and coaching.
Customer Acumen - Actively understand each customer’s technology footprint, strategic growth plans, technology strategy, and competitive landscape.   Review public information (e.g. new executive appointments, earnings statements, press releases) for the company and its competitors to remain updated on key industry trends and issues impacting the prospect. 
Territory and Account Leadership - Lead designated territory, including accounts, account relationships, prospect profiling, and sales cycles.  Encourage all accounts to become SAP references. 
Business Planning – Develop and deliver comprehensive business plan to address customer and prospects priorities and pain points.   Utilize VE, benchmarking and ROI data to support the customer’s decision process.


2.    Demand Generation, Pipeline and Opportunity Management

Pipeline planning - Follow a disciplined approach to maintaining a rolling pipeline. Keep pipeline current and moving up the pipeline curve.  
Pipeline partnerships – Leverage support organizations including Marketing, Inside sales, Partners and channels to funnel pipeline into the assigned territory.   
Leverage SAP Solutions – Be proficient in and bring all SAP offers to bear on sales pursuits including Industry Solutions, LOB solutions (CRM, SCM, HCM, SRM et. al) and technology solutions (Business Analytics, Mobility, Database and Technology, et. al) 
Advance and close sales opportunities - through the successful execution of the sales strategy and roadmap.
Support all SAP promotions and events in the territory

3.    Sales Excellence

Sell value.   
Maintain White Space analysis and execution of initiatives (up sell and cross sell) on customer base.
Orchestrate resources: deploy appropriate teams to execute winning sales.  Create OneSAP.
Utilize best practice sales models.
Understand SAP’s competition and effectively position solutions against them.
Maintain CRM system with accurate customer and pipeline information.


Experience & Language Requirements

10+ Years of experience in sales of complex business software / IT solutions in Govt/ PSU sector
Proven track record in business application software/ services sales
Experience in the lead role of a team-selling environment. Coordination across multiple internal and external stakeholders and partners. 
Demonstrated success with large transactions and lengthy sales campaigns in a fast-paced, consultative and competitive market.
Business level English: Fluent 
Local language: Fluent, Business Level
Education:

Bachelor equivalent: yes
======================================
7 年前
回复了 KunduK 创建的主题 » Senium Python:理解对“rect”类型元素的访问

使用 Action 类或 JavaScript 执行人。

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.action_chains import ActionChains
elememnt=WebDriverWait(driver, 1).until(ec.presence_of_element_located(("xpath", '//*[@id="id123"]')))
ActionChains(driver).move_to_element(elememnt).click().perform()

或者

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as ec
from selenium.webdriver.common.action_chains import ActionChains
elememnt=WebDriverWait(driver, 1).until(ec.presence_of_element_located(("xpath", '//*[@id="id123"]')))
driver.execute_script("arguments[0].click();",elememnt)

请尝试以下代码。获取行文本并检查其是否 5b

from bs4 import BeautifulSoup
import requests
res=requests.get("http://niwla23.gitlab.io/download/vertreterdemo.html")
soup=BeautifulSoup(res.text,'lxml')

for row in soup.find_all('tr', class_='list even'):
    if '5b' in row.text:
        print(row.text)
7 年前
回复了 KunduK 创建的主题 » 废前100名的工作结果确实使用了美化组python

请尝试下面的代码。它将导航到下一页,最多10页。如果要获取超过100条记录,请替换 while page_num<100: 到 while True:

from bs4 import BeautifulSoup
import pandas as pd
import re
headers = {'User-Agent':
       'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36'}

page = "https://www.indeed.co.in/jobs?q=software+developer&l=Bengaluru%2C+Karnataka"
company_name = []
job_title = []
page_num = 10
session = requests.Session()
while True:
    pageTree = session.get(page, headers=headers)
    pageSoup = BeautifulSoup(pageTree.content, 'html.parser')
    jobs= pageSoup.find_all("a", {"data-tn-element": "jobTitle"})
    Companys = pageSoup.find_all("span", {"class": "company"})
    for Company, job in zip(Companys, jobs):
        companyname=Company.text
        company_name.append(companyname.replace("\n",""))
        job_title.append(job.text)
    if pageSoup.find("span", text=re.compile("Next")):
        page = "https://www.indeed.co.in/jobs?q=software+developer&l=Bengaluru%2C+Karnataka&start={}".format(page_num)
        page_num +=10
    else:
        break

print(company_name)
print(job_title)
df = pd.DataFrame({"company_name":company_name,"job_title":job_title})
print(df.head(1000))

Selenium Grid将通过并行运行测试来帮助您进行扩展。只需使用以下命令设置集线器和节点:

轮毂

java -jar selenium-server-standalone-3.14.0.jar -role hub

对于节点

java -jar selenium-server-standalone-3.14.0.jar -role node  -hub http://localhost:4444/grid/register
7 年前
回复了 KunduK 创建的主题 » selenium python html解析:使用$ctrl访问元素

我试过了 XPath 而且有效。请试着告诉我。

print(driver.find_element_by_xpath("//ui-scoreboard-runner[@class='ui-scoreboard-runner ui-scoreboard-runner__home']/span").text)
7 年前
回复了 KunduK 创建的主题 » 无法单击按钮python selenium

可能是你的 xpath 是错误的。请尝试下面的代码。希望有帮助。

driver.find_element_by_xpath("//input[@name='cardTypeRadio']").click()

或

driver.find_element_by_xpath("//input[@id='VISA']").click()

如果 webdriver 单击“不工作”。尝试使用javascript单击。

driver.execute_script("arguments[0].click();", driver.find_element_by_xpath("//input[@name='cardTypeRadio']"))

driver.execute_script("arguments[0].click();", driver.find_element_by_xpath("//input[@id='VISA']"))
7 年前
回复了 KunduK 创建的主题 » 在python 3.x中解析XML

使用CSS选择器尝试以下代码。

from bs4 import BeautifulSoup

html='''<PubmedArticleSet>
   <PubmedArticle>
       <PMID Version="1">10890875</PMID>
       <Journal>
           <ISSN IssnType="Print">0143-005X</ISSN>
            <Title>Journal of epidemiology and community health</Title>
       </Journal>
       <ArticleTitle>Sources of influence on medical practice. 
       </ArticleTitle>
       <Abstract>
          <AbstractText Label="OBJECTIVES" NlmCategory="OBJECTIVE">
             To explore the opinion of general practitioners on the 
             importance and legitimacy of sources of influence on 
             medical practice.
          </AbstractText>
          <AbstractText Label="METHODS" NlmCategory="METHODS">
             General practitioners (n=723) assigned to Primary Care 
             Teams (PCTs) in two Spanish regions were randomly selected 
             to participate in this study. 
          </AbstractText>
          <AbstractText Label="RESULTS" NlmCategory="RESULTS">
The most important and legitimate sources of influence according to general practitioners were: training courses and scientific articles, designing self developed protocols and discussing with colleagues. 
          </AbstractText>
          <AbstractText Label="CONCLUSIONS" NlmCategory="CONCLUSIONS">
The development of medical practice is determined by many factors, grouped around three big areas: organisational setting, professional system and social setting. </AbstractText>
        </Abstract>
        <Language>eng</Language>
        <PublicationTypeList>
           <PublicationType UI="D016428">Journal Article 
           </PublicationType>
           <PublicationType UI="D013485">Research Support, Non-U.S.Gov't </PublicationType>
        </PublicationTypeList>
    <PubmedData>
         <PublicationStatus>ppublish</PublicationStatus>
         <ArticleIdList>
            <ArticleId IdType="pubmed">10890875</ArticleId>
            <ArticleId IdType="pmc">PMC1731730</ArticleId>
         </ArticleIdList>
     </PubmedData>
   </PubmedArticle>
</PubmedArticleSet>'''

soup = BeautifulSoup(html, 'lxml')

maintag=soup.select_one('Abstract')
for childtag in maintag.select('AbstractText'):
    print(childtag.text.strip())

print(soup.select_one('ArticleId[IdType="pmc"]').text)

输出:

To explore the opinion of general practitioners on the 
             importance and legitimacy of sources of influence on 
             medical practice.
General practitioners (n=723) assigned to Primary Care 
             Teams (PCTs) in two Spanish regions were randomly selected 
             to participate in this study.
The most important and legitimate sources of influence according to general practitioners were: training courses and scientific articles, designing self developed protocols and discussing with colleagues.
The development of medical practice is determined by many factors, grouped around three big areas: organisational setting, professional system and social setting.
PMC1731730