Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 years ago.
Improve this question
In my application when I click on save a reference no will be generated.it will keep on changing on every time application runs.I want to get this reference no in qtp report
Reference no is shown on a webelement.I stored the webelement in object repository with name 'reference'
My code is
Dim refernceno,test
test="001"
refernceno=browser("abc").page("abc"). Webelement ("reference"). Getroproperty ("reference")
Reporter.ReportEvent micpass,"Test passed"&test,"Reference"&refernceno
But the result shown is only Test passed 001
No reference no is showing
Kindly suggest how to use getroproperty
GetROProperty is used to fetch the set of properties defined by UFT from the object in the application. You can see these properties by using the object spy.
UFT allows you to access the Web DOM attributes by using the attribute/ syntax in GetROProperty (and other places).
Try:
refernceno = Browser("abc").Page("abc").Webelement("Reference").GetROProperty("attribute/reference")
Related
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 months ago.
Improve this question
Please help me. The website works fine in the local host, but it is having error in the C panel. How to solve?
the path is:
app/config/app.php
you can use Process Component of Symfony that is already in Laravel
http://symfony.com/doc/current/components/process.html
use Symfony\Component\Process\Process;
use Symfony\Component\Process\Exception\ProcessFailedException;
inside your elcdetails use
$macAddr = new Process('getmac');
$macAddr->run();
// executes after the command finishes
if (!$macAddr->isSuccessful()) {
throw new ProcessFailedException($macAddr;
}
//or whatever you want to do with the output.
echo $macAddr->getOutput();
note that, if you are trying to get the client mac address, short answer is you cannot.
From your image, I'm supposing you defined the public function exec() function somewhere above or below in your controller. You cannot reference to it that way since its a method in your controller class.
So change it to this instead. $macAddr = $this->exec('getmac');
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
ASP.NET BOILERPLATE: I have a table Asset for which I have created AssetApplicationService with base class CRUDAsync; I have wired up AssetController, & appropriate DTO's, I am able to retrieve data and show on the list as similar to user list.
when I click on Create New Asset,I am able to bring the modal dailog as well until now it is all good, I have copied the user\index.js and tailored to call my asset application service from javascript...this is where i am struck
var _assetService = abp.services.app.asset; //line1
var _$modal = $('#AssetCreateModal');
var _$form = _$modal.find('form');
line 1 returns me undefined when I debug through alert(_assetService), not sure why...where as abp.services.app.user, role works fine.
AssetApplicationService must be implemented by IApplicationService.
public interface IAssetApplicationService : IApplicationService
{
}
public class AssetApplicationService : IAssetApplicationService
{
}
Note: I've replied your previous question. Please mark the answer as solution if that worked for you.
I am facing an issue in which on the jsff page, we have an af:inputText component and we need to restrict user to typing just (0-9 and a - sign) in the component. This has to be done while the user is typing and not on changing the focus to other UI component triggering a validation. I have tried the following things so far, but can't get around this issue.
1)Using javascript-> https://blogs.oracle.com/jdevotnharvest/sample-code:-how-to-prevent-character-input-in-a-rich-inputtext-field
2)Using f:convertNumber and af:convertNumber making the maxFractionDigits and minFractionDigits to 0, but still it is accepting .
3)Using af:inputText property of converter and setting it to javax.faces.Integer to accept only integers, but still able to type the .(period)
4)Using af:validateRegExp and using the following regex [0-9]{1,4}
Any ADF Expert kindly provide any known resolution to this problem without using javascript on the page itself.
If you need to prevent it while the user types then the Javascript solution is the only way to go.
What didn't work for you in the blog your pointed to?
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I am using the Mechanize gem to parse through the webpage
http://www.opentable.com/rest_profile_menu.aspx?rid=116320&scpref=96&tab=1
To get the contents inside .menu class but it fetches only the name of the restaurant
When I type the commands:
require 'mechanize'
agent = Mechanize.new
agent.get("http://www.opentable.com/rest_profile_menu.aspx?rid=116320&scpref=96&tab=1").link_with(:text =>"Menu").click.search(".menu")
I get the output as:
"Sorry, we have no menus available for this restaurant at this time. Please check back later" ;where as I can see a lot of output in browser.
Please help me find a solution to get the contents.
The web page you're using uses an AJAX request to load the menu details.
Nokogiri and Mechanize do not support AJAX request pages.
I had the same situation in my project. I used phantomjs with Nodejs.
If you are trying to get the HTML contents of all elements with class "menu", then you might want to adjust your code a bit.
If you want to access the HTML response from the page in question, I find it easier to assign a variable to your get request:
page = agent.get("http://www.opentable.com/rest_profile_menu.aspx?rid=116320&scpref=96&tab=1")
.link_with(:text =>"Menu").click.search(".menu") may not be exactly what you want to use for "filtering through the HTML elements". Instead you want to use a method on your page.body string called parser.
object_mapped_html = page.parser
parser object maps all the HTML elements for you so that you can search through them with ease. I prefer using the css command, however I would recommend looking at the Nokogiri tutorial on how to parse through a HTML/XML webpage. An example of what you are looking to accomplish is this:
require 'mechanize'
agent = Mechanize.new
page = agent.get("http://www.opentable.com/rest_profile_menu.aspx?rid=116320&scpref=96&tab=1")
html_data_you_are_looking_for = page.parser.css("div.menu")
That div with the class you specified does have the HTML data as follows:
1.9.3-p429 :046 > page.parser.css("div.menu").text
=> "\r\n\t\t\t\t\t\t\t!AY CHIWOWA Menu\r\n\t\t\t\t\t\t\t\r\n\r\n\tSee the current menu for !AY CHIWOWA in Chicago.\r\n\tRestaurantProfileMenu.OnLoad({FailedText: \"Sorry, we have no menus available for this restaurant at this time. Please check back later.\"});\r\n\r\n\t\t\t\t\t\t"
I'm not 100% sure what you are trying to accomplish but I looked at the webpage with a web inspector and the class for a majority of the items on the menu are locu-menu-item or locu-menus. Perhaps if you searched through .locu-menus or .locu-menu-items you might find what you are looking for.
I am using two different datasets to populate datagridview my project using visual studio using vb.net. It is windows forms application which is used to display information from the database based on user inputs. Once the information is displayed the user can save the information into a table specifically created to store the report information in order for it to be recalled at a later date. I am now trying to recall this information so have created my dataset in the same way as before and am now trying to invoke a new occurrence of it and this is where the probelm begins. The code is below.
Dim dv2 As New System.Data.DataView
dv2 = New System.Data.DataView(DataSet2.Tables(0), "Status <> ''", "",
DataViewRowState.CurrentRows)
DataTable2TableAdapter.fill(DataSet2.DataTable2, f5.ComboBox2.SelectedValue)
I am getting two issues.
For DataSet2.Tables(0): Reference to a non-shared member requires an object reference
For DataTable2TableAdapter: ’DataTable2TableAdapter’ is not declared. It may be inaccessible due to its protection level.
I dont know why this is happening as I have written the same code here as for my previous data set other than changing the SQL statement behind the dataset at set up. Any thoughts would be welcome as I am totally out of ideas. All questions are welcomed.
Thanks
Try the following code to fix your error number 1....
Dim tablezero as System.Data.DataTable
'
tablezero = DataSet2.Tables(0)
The reason your getting the error is because you are trying to access an object (Table(0)) and it is not visible to the code that is trying to access it, if it was SHARED then it would be visible.
So you can resolve it by defining and object instance/reference to it and then accessing that reference, which in this case i have called "tablezero" (or by making table(0) SHARED - usually not the best bet unlessits neccesary - no point in having something accessible to the whole class it is declared in unless absolutelty neccessary)
It is quite possible the second error may dissapear after just fixing above, then again its difficult to tell without your code for Dataset2
Hope it helps.