webpage

What's the meaning of page and page.body in Capybara

这一生的挚爱 提交于 2019-12-01 23:26:35
问题 I'm a newbie try to test my Rails project using Capybara, but I'm confused with the meaning of page and page.body, when I try to detect some string from my div: (in :js=>true mode) <div>"some content"</div> Some of my test will pass with page.should have_content "some content" Some will pass with page.body.should have_content "some content" I try to puts the content but only "page.body" will give me some valuable information, the "page" itself will show me nothing, and I can't find any solid

Android - webview cuts off

萝らか妹 提交于 2019-12-01 22:55:56
问题 I currently have a webview that displays a current site. However, it cuts off the side of the page. See the picture below. Is there anyway to fix this? See my code and xml below too. Thanks! Picture: Code: // create alert dialog blogDialog = new AlertDialog.Builder(BlogActivity.this).create(); // add progress bar support getWindow().requestFeature(Window.FEATURE_PROGRESS); // make progress bar visible getWindow().setFeatureInt(Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON);

Clicking in a online js button with python

流过昼夜 提交于 2019-12-01 22:42:04
I'm trying to click on the "Search all flights" button in http://www.priceline.com/ but i'm having some problems. I know that mechanize doesn't work with javascript so I tried so look on the source code trying to do what the button does but i can't find the function. There's any other way to do this? I suggest using selenium ( download link ), which has very heavy support for javascript. All docs here . Here is a quick example of how you can do that: from selenium import webdriver driver = webdriver.Firefox() driver.get("http://www.priceline.com/") driver.find_element_by_id("hotel-btn-submit

What's the meaning of page and page.body in Capybara

醉酒当歌 提交于 2019-12-01 22:02:30
I'm a newbie try to test my Rails project using Capybara, but I'm confused with the meaning of page and page.body, when I try to detect some string from my div: (in :js=>true mode) <div>"some content"</div> Some of my test will pass with page.should have_content "some content" Some will pass with page.body.should have_content "some content" I try to puts the content but only "page.body" will give me some valuable information, the "page" itself will show me nothing, and I can't find any solid explanation about what page and page.body did. Can anyone help me? page is the current Capybara session

How to include PHP file in SHTML pages?

旧街凉风 提交于 2019-12-01 21:42:16
I have a shtml file index.shtml in which I want to include a PHP file which performs some programing and returns HTML data. I am trying to include my PHP file but I don't know how to do that, I tried following but nothing is working, Following line is just printing an error, " [an error occurred while processing this directive] ": <!--#include file="/SSI/test.php"--> This line is displaying some junk characters: <!--#include virtual="/SSI/test.php"--> This line is doing nothing and displaying the command as is in the .shtml page <?PHP include("/SSI/test.php"); ?> Thanks If there is no

Android - webview cuts off

半城伤御伤魂 提交于 2019-12-01 19:03:14
I currently have a webview that displays a current site. However, it cuts off the side of the page. See the picture below. Is there anyway to fix this? See my code and xml below too. Thanks! Picture: Code: // create alert dialog blogDialog = new AlertDialog.Builder(BlogActivity.this).create(); // add progress bar support getWindow().requestFeature(Window.FEATURE_PROGRESS); // make progress bar visible getWindow().setFeatureInt(Window.FEATURE_PROGRESS, Window.PROGRESS_VISIBILITY_ON); setContentView(R.layout.webtab); sdrWebView = (WebView) findViewById(R.id.sdrwebview); sdrWebView.getSettings()

Three.js Screenshot

痴心易碎 提交于 2019-12-01 17:30:50
I need to make screenshot of website. I tried using html2canvas and all and it's working. But problem is i'm using THREE.WebGLRenderer and THREE.CSS3DRenderer (for html in webgl)... So when I make screenshot it makes images only from WebGLRenderer. CSS3DRenderer is ignored and I don't know how to make screenshot image from both renderers. I'm using this solution: Take screenshot of <body> with html2canvas and store img as JS var you can use this code var Render=new THREE.WebGLRenderer({antialias: true, preserveDrawingBuffer: true}); and a function onclick print: $("#btn_print").click(function(

Three.js Screenshot

血红的双手。 提交于 2019-12-01 16:43:11
问题 I need to make screenshot of website. I tried using html2canvas and all and it's working. But problem is i'm using THREE.WebGLRenderer and THREE.CSS3DRenderer (for html in webgl)... So when I make screenshot it makes images only from WebGLRenderer. CSS3DRenderer is ignored and I don't know how to make screenshot image from both renderers. I'm using this solution: Take screenshot of <body> with html2canvas and store img as JS var 回答1: you can use this code var Render=new THREE.WebGLRenderer(

Why is fbevents.js loading on my page?

邮差的信 提交于 2019-12-01 15:48:52
I'm having trouble with fbevents.js, I don't know why but is loading with my page, I'm nor importing it anywhere neither putting it inside a script tags referencing it. Image from my page: What do you guys think could be the problem? Fast Snail http://staticw2.yotpo.com/QxG0HurQF664N9LddhiDMsxHjx9XYsaVgWcDBnme/widget.js above widget.js script load fbevent.js . here is the related code line. view source and search for fbevent .you can find that line. (window,document,"script","//connect.facebook.net/en_US/fbevents.js" I had the same problem and in my case I noticed it is one of the scripts

Why is fbevents.js loading on my page?

守給你的承諾、 提交于 2019-12-01 14:45:21
问题 I'm having trouble with fbevents.js, I don't know why but is loading with my page, I'm nor importing it anywhere neither putting it inside a script tags referencing it. Image from my page: What do you guys think could be the problem? 回答1: http://staticw2.yotpo.com/QxG0HurQF664N9LddhiDMsxHjx9XYsaVgWcDBnme/widget.js above widget.js script load fbevent.js . here is the related code line. view source and search for fbevent .you can find that line. (window,document,"script","//connect.facebook.net