User Profile
Collapse
-
Hi Glenton, I re-structured the code and now its working fine. Thanks for your help! -
How to submit webform using ClientForm
Hi,
After much research and help from forums, i have the following. Using HTMLParser to parse thru html pages and then finally reaching a webpage where i have to check all the checkboxes and then click the 'Deploy' button. Used ClientForm to do this. But i am getting some HTTP version error
...Code:URL = "http://10.47.42.27:8080/cruisecontrol" #from urllib2 import urlopen from HTMLParser import
-
I tried setting parser.data to a variable and then using that. But its the same and empty string. I dont know why it wont pass :(Leave a comment:
-
But it is printing out all the text on that webpage.I've verified if all text appearing on the webpage is printed (print self.data does this). So i am not sure if the code has bugs.
Is there any reason for parser.data to not have the data when out of the class?Leave a comment:
-
No, i picked this piece of code from google. What the below class does is: prints out all the text between <body></body> tags in the HTML of that webpage.
If you see in the output for print self.data --- All text between <body>...Code:class DataParser(HTMLParser): def handle_data(self, data): self.data = data.strip() if data: print self.dataLeave a comment:
-
-
I changed line 32
...Code:# Build url for Deploy page def get_deploy_url(): url = URL + "/buildresults/Poker-TTM_%s_nightly_build" % branch print "Latest build url for this branch is: %s" % url parser = DataParser() parser.feed(urlopen(url).read()) parser.close() parser.data print data.parser, type(data.parser)Leave a comment:
-
Hi,
Below is the code
...Code:URL = "http://10.47.42.27:8080/cruisecontrol" from urllib2 import urlopen from HTMLParser import HTMLParser import re # Fetching links using HTMLParser def get_links(url): parser = MyHTMLParser() parser.feed(urlopen(url).read()) parser.close() return parser.links # #defLeave a comment:
-
Hi,
I tried using that too
...Code:URL = "http://10.47.42.27:8080/cruisecontrol" from urllib2 import urlopen from HTMLParser import HTMLParser import re # Fetching links using HTMLParser def get_links(url): parser = MyHTMLParser() parser.feed(urlopen(url).read()) parser.close() return parser.links #Leave a comment:
-
Hi Glenton,
I tried but it stills gives me output as Build Failed even though the data variable prints outs BUILD COMPLETE.
...Code:[['Branch', ' trunk\n'], ['Destination', ' Test 4\n']] trunk Test 4 http://10.47.42.27:8080/cruisecontrol/buildresults/Poker-TTM_trunk_nightly_build CruiseControl Build Results Project -- STATUS PAGE -- BScreened_trunk
Leave a comment:
-
Help with regular expressions
I am trying to search for a text 'BUILD COMPLETE' on a web page. There is some problem with the RE. Please help. I am new to Python and somehow managed to reach to this point of the program.
...Code:URL = "http://10.47.42.27:8080/cruisecontrol" from urllib2 import urlopen from HTMLParser import HTMLParser import re # Fetching links using HTMLParser def get_links(url):
-
How to select a checkbox on an HTML page
Hi,
The below code extracts the branch number and the test environment to deploy that particular branches build on from a txt file (branch_dest.tx t). Then it parses HTML pages to reach a webpage which contains some checkboxes. I want to check the "Select/Deselect All" checkbox and then click the "Deploy" button on that webpage.
How do i code this? I am basically from QA(Tester). So please help.
... -
How to search text on an html page
Hi,
I want to search for a particular text on an html page ---> Build Complete
Further execution should be only if the build is successful which is denoted by the text 'Build Complete' on the webpage.
...Code:URL = "http://11.12.13.27:8080/cruisecontrol" from urllib2 import urlopen from HTMLParser import HTMLParser import re # Fetching links using HTMLParser
-
help solve error
Hi,
The below code is doing the following
1. Reading the branch name and the destination from a txt file
2. Parsing thru HTML pages
Basically, i want to deploy the build of the branch (supplied thru txt file) on a test environment (supplied thru txt file)
The branch_dest file looks like this
Branch: ltm_7.4
Destination: Test 5
...Code:URL = "http://11.12.13.27:8080/cruisecontrol"
-
How to extract data from a txt file
Hi
My txt file looks something like this:
Branch: ltm_7.4
Destination: Test 5
I need to extract...Code:lines = open("branch_dest.txt").readlines() lines=[x.split() for x in lines] print lines branch = "%s" % lines[0][1].strip(': ') print branch destination = "%s" % lines[1][2].strip(': ') print destination -
How to simulate clicking a link
Hi,
Im basically from QA. I have a piece of code in python that parses HTML pages to reach to a specific link on a webpage. The below code gets me the url of the link which needs to be clicked. What code should i write to simulate clicking a link.
...Code:URL = "http://11.12.13.27:8080/cruisecontrol" BRANCH_FILE = "b.txt" from urllib2 import urlopen from HTMLParser import
-
-
@insertAlias - We do not want to give remote access as there are other confidential information. We just want something which will trigger the script on the machine located at workplace.
@Glenton - Windows XP...Leave a comment:
-
dbphydb started a topic How to trigger a script located on one domain from a machine on another domainin PythonHow to trigger a script located on one domain from a machine on another domain
Hi,
I am basically from QA. What we testers do each day is
1. Open a web browser. Type in http://11.12.13.27.808 0/cruisecontrol (since we are in a particular network, only we can access this)
2. Check if the latest nightly build has been successful. If it is successful, deploy it on a test environment by clicking on 'Deploy this build' link.
This deploying takes around 1-1.5 hours. During this time we cannot use... -
i am basically from QA. So what we do each morning is open a web browser with the address http://11.12.13.27:8080/cruisecontrol. Then we click on the build with last nights date. Then we click on a folder say client. Then in that folder we click on an exe file say game.exe. Then we get a save dialog box to save the exe to our local machine (windows xp..not a home pc). Then we goto the place where we have downloaded that exe file, double click on...Leave a comment:
No activity results to display
Show More
Leave a comment: